# 消息撤回

# 注意事项

从回调事件 (接收机器人私聊消息 40030 获取字段inner_msg_id)

发送时间超过2分钟的消息无法撤回

按机器人纬度,限制每分钟只能执行30次(从首次撤回发起开始算)

请求方式:POST

请求地址:https://$basehost/gateway/qopen/RecalledMsg

body参数

{
    "robot_id": "机器人id",
    "msg_id": "40030事件中的inner_msg_id"
}
字段 类型 必填 说明
robot_id int 机器人id
msg_id int 40030事件中的inner_msg_id

返回值:

{
    "errcode": 0,
    "errmsg": "",
    "data": {
    }
}
字段 类型 说明
errcode int 错误码
errmsg string 错误描述

处理结果,异步返回值:

{
    "event_type": 400008,
    "err_code": 0,
    "err_msg": "",
    "robot_id": "机器人id",
    "data": {
        "msg_id": "消息Id",
    }
}

说明

字段 类型 说明
event_type int 事件类型,400008
errcode int 错误码
errmsg string 错误描述
robot_id string 机器人id
data.msg_id string 消息Id

完整请求示例:

curl -X POST \
  https://$basehost/gateway/qopen/RecalledMsg \
  -H 'Content-Type: application/json; charset=UTF-8' \
  -H 'Token: c2NdxDHKXIJ5j1zrhJeq2eJEHjh9xxx' \
  -d '{
    "robot_id": "机器人id",
    "msg_id": "40030事件中的inner_msg_id"
}'
最后更新时间: 2024/4/19 11:10:27