批量发送指令
POST
/wework/sendRawMessage
1.
请求参数
Query 参数
robotId
string
客户端链接唯一标识
示例值:
{{robot_id}}
Header 参数
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
socketType
integer
必需
list
array [object]
必需
示例
{
"socketType": 2,
"list": [
{
"type": 203,
"titleList": [
"AA"
],
"receivedContent": "第一条发送文本消息指令"
},
{
"type": 203,
"titleList": [
"AA"
],
"receivedContent": "第二条发送文本消息指令"
},
{
"type": 218,
"titleList": [
"BB"
],
"objectName": "logo.png",
"fileUrl": "https://cdn.asrtts.cn/static/image/logo3_180_raw.png",
"fileType": "image",
"extraText": "第三条发送文件消息指令"
}
]
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https://api.worktool.ymdyes.cn/wework/sendRawMessage?robotId=worktool1' \
--header 'Content-Type: application/json' \
--data-raw '{
"socketType":2,
"list":[
{
"type":203,
"titleList":[
"AA"
],
"receivedContent":"第一条发送文本消息指令"
},
{
"type":203,
"titleList":[
"AA"
],
"receivedContent":"第二条发送文本消息指令"
},
{
"type": 218,
"titleList": [
"BB"
],
"objectName": "logo.png",
"fileUrl": "https://cdn.asrtts.cn/static/image/logo3_180_raw.png",
"fileType": "image",
"extraText": "第三条发送文件消息指令"
}
]
}'
返回响应
🟢200成功
application/json
Body
code
number
必需
message
string
必需
data
string
必需
示例
{
"code": 0,
"message": "string",
"data": "string"
}
修改于 2024-03-26 02:21:17