https://xxxxxx/v4/timpush/batch?usersig=xxx&identifier=admin&sdkappid=88888888&random=99999999&contenttype=json
参数 | 说明 |
https | 请求协议:HTTPS 请求方式:POST |
xxxxxx | SDKAppID 所在国家/地区对应的专属域名。 中国: console.tim.qq.com新加坡: adminapisgp.im.qcloud.com首尔: adminapikr.im.qcloud.com法兰克福: adminapiger.im.qcloud.com硅谷: adminapiusa.im.qcloud.com雅加达: adminapiidn.im.qcloud.com |
v4/timpush/batch | 请求接口 |
usersig | |
identifier | |
sdkappid | 创建应用时,即时通信控制台分配的 SdkAppid |
random | 请输入随机的32位无符号整数,取值范围0 - 4294967295。 |
contenttype | 固定值为: json |
{"From_Account": "administrator","To_Account": ["user1","user2"], // 数组大小范围在[1,500]之间"MsgRandom": 3674128,"OfflinePushInfo": {"PushFlag": 0, // 0表示进行离线推送,1表示不进行离线推送"Title": "离线推送标题","Desc": "离线推送内容"}}
字段 | 类型 | 属性 | 说明 |
From_Account | String | 必填 | 发送方账号,支持 UserID 或 RegistrationID。 |
To_Account | Array | 必填 | 接收方账号列表,支持 UserID 或 RegistrationID。 |
MsgRandom | Integer | 必填 | 32位无符号整数随机数,取值范围0 - 4294967295 后台用于同一秒内的消息去重,请确保是随机数。 |
OfflinePushInfo | Object | 必填 | |
DataId | String | 选填 | 客户业务自定义标识,回调会透传该字段给 App 后台。该字段限制不超过64字节。 |
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"TaskId": "batch_667015d4_537529d8_2000005e80aa873_d03ac87_56f5e750"}
字段 | 类型 | 说明 |
ActionStatus | String | 请求处理的结果: OK:表示处理成功 FAIL:表示失败 |
ErrorCode | Integer | 错误码 |
ErrorInfo | String | 错误信息 |
TaskId | String | 推送任务 ID |
错误码 | 含义说明 |
90001 | JSON 格式解析失败,请检查请求包是否符合 JSON 规范。 |
90009 | 请求需要 App 管理员权限。 |
90045 | 未开通全员/标签/单推推送功能。 |
90057 | 客户业务自定义标识 DataId 过长,目前支持最大64字节。 |
91000 | 服务内部错误,请重试。 |
文档反馈