https://xxxxxx/v4/timpush/batch?usersig=xxx&identifier=admin&sdkappid=88888888&random=99999999&contenttype=json
Parameter | Description |
https | Request protocol: HTTPS Request method: POST |
xxxxxx | The dedicated domain corresponding to the country/region of your SDKAppID. China: console.tim.qq.comSingapore : adminapisgp.im.qcloud.comSeoul : adminapikr.im.qcloud.comFrankfurt : adminapiger.im.qcloud.comSilicon Valley : adminapiusa.im.qcloud.comJakarta: adminapiidn.im.qcloud.com |
v4/timpush/batch | Request API |
usersig | |
identifier | |
sdkappid | SdkAppid assigned by the Chat console when creating an app |
random | A random 32-bit unsigned integer ranging from 0 to 4294967295 |
contenttype | Fixed value: json |
{"From_Account": "administrator","To_Account": ["user1","user2"], // Array size range between [1,500]"MsgRandom": 3674128,"OfflinePushInfo": {"PushFlag": 0, // 0 means offline push enabled, 1 means offline push disabled"Title": "Offline Push Title","Desc": "Offline Push Content"}}
Field | Type | Attribute | Description |
From_Account | String | Required | Sender account, support UserID or RegistrationID. |
To_Account | Array | Required | Target user account list, support UserID or RegistrationID. |
MsgRandom | Integer | Required | 32-bit unsigned integer random number, with a value range from 0 to 4294967295 Backend uses message deduplication within the same second. Please ensure it is a random number. |
OfflinePushInfo | Object | Required | |
DataId | String | Optional | The customer's business custom identifier. This field will be passed through to the app backend during the callback. The field is limited to a maximum of 64 bytes. |
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"TaskId": "batch_667015d4_537529d8_2000005e80aa873_d03ac87_56f5e750"}
{"ActionStatus": "FAIL","ErrorInfo": "Invalid format of MsgRandom", // MsgRandom is invalid or not set"ErrorCode": 90001,"TaskId": ""}
{"ActionStatus": "OK","ErrorInfo": "","ErrorCode": 0,"TaskId": "batch_667015d4_537529d8_2000005e80aa873_d03ac87_56f5e750","ErrorList": [{"ErrorCode": 70107, // account does not exist"To_Account": "user"}]}
Field | Type | Description |
ActionStatus | String | Request processing result: OK: means processing is successful. FAIL: processing failed. |
ErrorCode | Integer | Error code. |
ErrorInfo | String | Error message. |
TaskId | String | Push task ID. |
ErrorList | Object Array | Account list with sending failed. If all sent successfully, ErrorList is empty. |
Field | Type | Description |
To_Account | String | Target user account: UserID or RegistrationID. |
ErrorCode | Integer | Error code. |
ErrorInfo | String | Error description, which may be empty. |
Error code | Description |
90001 | Failed to parse the JSON format. Please ensure the request packet conforms to the JSON specification. |
90009 | The request requires App Administrator permissions. |
90045 | All-user/Tags/Single Push is Not Enabled. |
90057 | The provided DataId exceeds the maximum allowed length of 64 bytes. |
91000 | Internal service error, please try again. |
Feedback