回调消息接口
POST
http://yourcallbackurl/回调消息的请求示例。文档中地址仅为演示。机器人收到消息后会将消息返回到用户配置的地址上。
请求参数
Header 参数
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
id
integer
消息唯一id
ts
integer
时间戳
type
integer
必需
消息类型;1文字,57引用消息,10000系统消息
sender
string
发送者wxid
groupId
integer
群Id
groupCode
string
群编码
content
string
消息内容
isAt
boolean
是否@机器人
isSelf
boolean
必需
是否机器人发送的消息
isGroup
boolean
是否群消息
atUser
array[string]
可选
被@的群用户wxid
referMsgId
integer
引用的消息id
示例
{
"id": 7169067274223235000,
"ts": 1698190646000,
"type": 1,
"sender": "pcstx1",
"groupId": 1,
"groupCode": "#9f34e6a90122489cb4d6092ee49a2d0a",
"content": "@机器人 @好友 你好",
"atUser": [
"wxid_0k***x12",
"wxid_34***22"
],
"isAt": true,
"isSelf": false,
"isGroup": true
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
code
integer
响应编码
msg
string
响应说明
示例
{
"code": 200,
"msg": "成功"
}
修改于 6 个月前