App 后台可以通过该回调实时查看黑名单的添加情况。
即时通信 IM 后台收到加黑名单请求,成功添加黑名单后。
以下示例中 App 配置的回调 URL 为 https://www.example.com
。
示例:
https://www.example.com?SdkAppid=$SDKAppID&CallbackCommand=$CallbackCommand&contenttype=json&ClientIP=$ClientIP&OptPlatform=$OptPlatform
参数 | 说明 |
---|---|
https | 请求协议为 HTTPS,请求方式为 POST |
www.example.com | 回调 URL |
SdkAppid | 创建应用时在即时通信 IM 控制台分配的 SDKAppID |
CallbackCommand | 固定为 Sns.CallbackBlackListAdd |
contenttype | 固定值为 JSON |
ClientIP | 客户端 IP,格式如:127.0.0.1 |
OptPlatform | 客户端平台,取值参见 第三方回调简介:回调协议 中 OptPlatform 的参数含义 |
{
"CallbackCommand": "Sns.CallbackBlackListAdd",
"PairList": [
{
"From_Account": "id",
"To_Account": "id1"
},
{
"From_Account": "id",
"To_Account": "id2"
},
{
"From_Account": "id",
"To_Account": "id3"
}
]
}
字段 | 类型 | 说明 |
---|---|---|
CallbackCommand | String | 回调命令 |
PairList | Array | 成功添加的黑名单关系链对 |
From_Account | String | From_Account 的黑名单列表中添加了 To_Account |
To_Account | String | To_Account 被加入到 From_Account 的黑名单列表中 |
{
"ActionStatus": "OK",
"ErrorCode": 0,
"ErrorInfo": ""
}
字段 | 类型 | 属性 | 说明 |
---|---|---|---|
ActionStatus | String | 必填 | 请求处理的结果,OK 表示处理成功,FAIL 表示失败 |
ErrorCode | Integer | 必填 | 错误码,0表示 App 后台处理成功,1表示 App 后台处理失败 |
ErrorInfo | String | 必填 | 错误信息 |
本页内容是否解决了您的问题?