飞书机器人参数配置:
1.Webhook 触发:
Webhook 地址(是默认的,要填到钉钉机器人里)
https://www.feishu.cn/flow/api/trigger-webhook/xx
– 钉钉机器人触发
// 参数
{"chatbotCorpId" :"ding8e05045117b97cd7ee0f45d8e4f7c288",
"chatbotUserId":"$:LWCP_v1:$NKgmUQ0y/bZXBwQaYcWrs7L4knVkqT+2" ,
"conversationId":"cidRZc9BoKW6TWO7Hf3Wb80j+gYe+GF5FxNaJ4CzuO+AtT=",
"conversationType":"1" ,
"createAt":1699109450136,
"isAdmin":true,
"msgId":"msg2jtCPjuPTxGeGhIrD08IMQ==",
"msgtype" :"text" ,
"robotCode":"dingdbku2fgvvaynsajq",
"senderCorpId":"ding8e05045117b97cd7ee0f45d8e4f7c288",
"senderTd":"$:LWCP_v1:$/Zcnnv1/A/hmH71hcTbxGA==",
"senderNick":"驿站",
"senderStaffId":"manager5321",
"sessionWebhook":"https://oapi.dingtalk.com/robot/sendBySession?session=64e9b7a60123e083e8bd54a4e12e0a5f",
"sessionWebhookExpiredTime":1699114850340,
"text" : { "content":"你好"}
}
2.发送 HTTP 请求—获取影刀token
请求方式
GET
URL
https://api.yingdao.com/oapi/token/v2/token/create?accessKeyId=xxx&accessKeySecret=xxx
返回值示例
{
"data": {
"accessToken": "",
"expiresIn": 7199
},
"code": 200,
"success": true,
"requestId": ""
}
3.发送 HTTP 请求—连接影刀应用
请求方式
POST
固定URL
https://api.yingdao.com/oapi/dispatch/v2/task/start
请求头示例
步骤2获取的token
Authorization Bearer Token
如下图:
请求体示例
示例1:
{
"scheduleUuid":"1111fae1-111e-1111-1g11-1cca111a1ac1",
"scheduleRelaParams":[
{
"robotUuid":"521114b5-63fq-4289-9533-3e6587e517ae",
"params": [
{"name": "text", "value": "Hello World!", "type": "str"},
{"name": "sender", "value": "XiaoMing", "type": "str"}
]
}
]
}
示例2:
{
"scheduleUuid":"1111faa1-111c-1111-1f11-1caa111a1ac1",
"scheduleRelaParams":[
{
"robotUuid":"521114b5-63fq-4289-9533-3e6587e517ae"},
"params":[
{"name":"text","value":"", "type":"str",},
{"name":"sender","value":,"type":"str",}
]
}]
}
返回值示例
{"data": [{"scheduleUuid": "", "scheduleName": "", "scheduleType": "manual", "cronInterface": {"minimumIntervalSeconds": 60, "type": "manual", "minute": 1, "hour": 1, "dayOfWeeks": [], "month": 1, "time": "", "cronExpress": ""}, "enabled": true, "createTime": "", "updateTime": ""}], "page": {"total": 1, "size": 10, "page": 1, "pages": 1, "offset": 0, "order": "desc"}, "code": 200, "success": true, "msg": ""}