StarBot
  1. 监听回调事件
StarBot
  • 文档必读
    • 文档说明
    • 风控说明
    • 使用说明
    • 版本对比
  • 监听回调事件
    • 登录的机器人->微信启动成功
      POST
    • 微信登录成功事件
      POST
    • 收到私聊消息事件
      POST
    • 收到群聊消息事件
      POST
    • 收到公众号消息事件
      POST
    • 收到转账事件
      POST
    • 收到撤回消息事件
      POST
    • 收到好友申请事件
      POST
    • 二维码收款事件
      POST
  • api请求
    • 获取群聊列表
      POST
    • 获取好友列表
      POST
    • 获取机器人信息
      POST
    • 发送文本消息
      POST
    • 回复引用文本消息
      POST
    • 回复引用文本消息-新
      POST
    • 发送图片消息
      POST
    • 发送xml消息
      POST
    • 发送文件消息
      POST
    • 发送动态表情GIF消息
      POST
    • 发送url卡片消息
      POST
    • 发送小程序消息
      POST
    • 发送音乐分享消息
      POST
    • 发送聊天记录消息
      POST
    • 发送名片消息
      POST
    • 发送名片xml消息
      POST
    • 获取机器人登录状态信息
      POST
    • 获取机器人登录二维码信息(存在bug)请转至买断版本
      POST
    • 同意好友申请
      POST
    • 添加好友
      POST
    • 从群里添加好友
      POST
    • 删除好友
      POST
    • 修改好友/群聊备注
      POST
    • 查询陌生账号信息
      POST
    • 查询好友/群聊信息
      POST
    • 退出群聊
      POST
    • 创建群聊
      POST
    • 查询群聊信息
      POST
    • 添加群成员
      POST
    • 邀请群成员
      POST
    • 移除群成员
      POST
    • 修改机器人群昵称
      POST
    • 查询群聊成员列表
      POST
    • 获取群成员昵称
      POST
    • 确认收款
      POST
    • 退还收款
      POST
    • 打开浏览器
      POST
    • 启动微信
      POST
    • 关闭微信
      POST
    • 获取机器人列表
      POST
    • 删除离线的机器人信息
      POST
    • 根据wxId获取机器人信息
      POST
    • 根据instanceId获取机器人信息
      POST
  1. 监听回调事件

收到撤回消息事件

POST
http://callbackurl

请求参数

Body 参数application/json
event
enum<string> 
事件类型
必需
枚举值:
10006
description
string 
事件描述
必需
示例值:
撤回消息事件
time
integer 
毫秒时间戳
必需
示例值:
1726826627676
data
object 
数据体
必需
instanceId
string 
实例id
必需
示例值:
97554f7c82a1439c86df3143ef4975c5
messageId
string 
消息id
必需
示例值:
7053704521966022857
fromType
string 
消息来源
必需
private 私聊
group 群聊
official 公众号
示例值:
private
messageType
integer 
必需
1 文本
3 图片
34 语音
42 名片
43 视频
47 动态表情
48 地理位置
49 分享链接或附件 2001 红包
2002 小程序
2003 群邀请
10000 系统消息
示例值:
1
fromWxId
string 
必需
fromType=private 时为好友wxid,fromType= group时为群wxid
fromType=official时公众号wxid
示例值:
test
finalFromWxId
string 
必需
群聊中的发送人id,如果是私聊 fromId和finalFromWxId相等
示例值:
test
message
string 
撤回的消息内容
必需
示例值:
测试内容
示例
{
  "event": "10006",
  "description": "撤回消息事件",
  "time": 1726826627676,
  "data": {
    "instanceId": "97554f7c82a1439c86df3143ef4975c5",
    "messageId": "7053704521966022857",
    "fromType": "private",
    "messageType": 1,
    "fromWxId": "test",
    "finalFromWxId": "test",
    "message": "测试内容"
  }
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://callbackurl' \
--header 'Content-Type: application/json' \
--data-raw '{
    "event": "10006",
    "description": "撤回消息事件",
    "time": 1726826627676,
    "data": {
        "instanceId": "97554f7c82a1439c86df3143ef4975c5",
        "messageId": "7053704521966022857",
        "fromType": "private",
        "messageType": 1,
        "fromWxId": "test",
        "finalFromWxId": "test",
        "message": "测试内容"
    }
}'

返回响应

🟢200成功
application/json
Body
object {0}
示例
{}
修改于 2024-09-23 02:40:23
上一页
收到转账事件
下一页
收到好友申请事件
Built with