注意:使用该接口撤回单聊消息后,被撤回的消息不能恢复,请谨慎调用该接口。
https://xxxxxx/v4/openim/admin_msgwithdraw?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json
下表仅列出调用本接口时涉及修改的参数及其说明,更多参数详情请参考 REST API 简介。
参数 | 说明 |
---|---|
xxxxxx | SDKAppID 所在国家/地区对应的专属域名:console.tim.qq.com adminapisgp.im.qcloud.com adminapikr.im.qcloud.com adminapiger.im.qcloud.com adminapiind.im.qcloud.com adminapiusa.im.qcloud.com |
v4/openim/admin_msgwithdraw | 请求接口 |
sdkappid | 创建应用时即时通信 IM 控制台分配的 SDKAppID |
identifier | 必须为 App 管理员帐号,更多详情请参见 App 管理员 |
usersig | App 管理员帐号生成的签名,具体操作请参见 生成 UserSig |
random | 请输入随机的32位无符号整数,取值范围0 - 4294967295 |
contenttype | 请求格式固定值为json |
200次/秒。
{
"From_Account": "vinson",
"To_Account": "dramon",
"MsgKey": "31906_833502_1572869830"
}
字段 | 类型 | 属性 | 说明 |
---|---|---|---|
From_Account | String | 必填 | 消息发送方 UserID |
To_Account | String | 必填 | 消息接收方 UserID |
MsgKey | String | 必填 | 待撤回消息的唯一标识。该字段由 REST API 接口 单发单聊消息 和 批量发单聊消息 返回 |
正常应答
{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0
}
异常应答
{
"ActionStatus": "FAIL",
"ErrorInfo": "Fail to Parse json data of body, Please check it",
"ErrorCode": 90001
}
字段 | 类型 | 说明 |
---|---|---|
ActionStatus | String | 请求处理的结果,OK 表示处理成功,FAIL 表示失败 |
ErrorCode | Integer | 错误码,0表示成功,非0表示失败 |
ErrorInfo | String | 错误信息 |
除非发生网络错误(例如502错误),否则该接口的 HTTP 返回码均为200。真正的错误码,错误信息是通过应答包体中的 ErrorCode、ErrorInfo 来表示的。
公共错误码(60000到79999)参见 错误码 文档。
本 API 私有错误码如下:
错误码 | 描述 |
---|---|
20022 | 该待撤回的消息不存在,请检查。 |
20023 | 该消息已被撤回。 |
90001 | JSON 格式解析失败,请检查请求包是否符合 JSON 规范 |
90003 | JSON 格式请求包体中缺少 To_Account 字段或者 To_Account 帐号不存在 |
90008 | JSON 格式请求包体中缺少 From_Account 字段或者 From_Account 帐号不存在 |
90009 | 请求需要 App 管理员权限 |
90054 | 撤回请求中的 MsgKey 不合法 |
91000 | 服务内部错误,请重试 |
通过 REST API 在线调试工具 调试本接口。
本页内容是否解决了您的问题?