tencent cloud

All product documents
Chat
UserID-Targeted Push
Last updated: 2024-12-30 16:59:16
UserID-Targeted Push
Last updated: 2024-12-30 16:59:16
Feature Overview
Push to the specified recipient account list, which should contain between [1, 500] accounts.
Supports Online Channel, Manufacturer Channel (APNS, Huawei, Honor, OPPO, vivo, Xiaomi, Meizu, Google).
Note:
This interface supports both Online Push and Offline Push. Online Push is supported only in SDK Version ≥ 8.2.6325.

API Calling Description

Sample request URL

https://xxxxxx/v4/timpush/batch?usersig=xxx&identifier=admin&sdkappid=88888888&random=99999999&contenttype=json

Request parameters

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.com
Singapore :adminapisgp.im.qcloud.com
Seoul : adminapikr.im.qcloud.com
Frankfurt :adminapiger.im.qcloud.com
Silicon Valley :adminapiusa.im.qcloud.com
v4/timpush/batch
Request API
usersig
The Signature generated by the App admin account. For details, see Generating UserSig
identifier
You must be an App admin account. For more details, see App Admins
sdkappid
SdkAppid assigned by the Chat console when creating an app
random
32-bit unsigned integer random number
contenttype
Fixed value: json

Call frequency limit

30 times/s

Sample request packets

{
"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"
}
}
Note:
This interface supports both Online Push and Offline Push. Online Push is supported only in SDK Version ≥ 8.2.6325.

Request packet fields

Field
Type
Attribute
Description
From_Account
String
Required
Message Sender Account (supports specifying any existing account)
To_Account
Array
Required
Message recipient user `UserID`
MsgRandom
Integer
Required
Message Random Number (32-bit unsigned integer), used by the backend for deduplication of messages within the same second. Please ensure that this field is filled with random values
OfflinePushInfo
Object
Required
Offline push notification configuration, please refer to OfflinePushInfo description

Sample response packets

{
"ActionStatus": "OK",
"ErrorInfo": "",
"ErrorCode": 0,
"TaskId": "batch_667015d4_537529d8_2000005e80aa873_d03ac87_56f5e750"
}

Response packet field description

Field
Type
Description
ActionStatus
String
Processed Request Result:
OK: Indicates successful processing
FAIL: Indicates failure
ErrorCode
Integer
Error code
ErrorInfo
String
Error message
TaskId
String
Push task ID

Error codes

Unless a network error occurs (e.g., a 502 error), the HTTP status code for this interface will always be 200.The real error codes and messages are indicated in the response body by ErrorCode and ErrorInfo. For common error codes (60000 to 79999), see the Error Code document.
Private error codes for this API are as follows:
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.
91000
Internal service error, please try again.

API Debugging Tool

Use the RESTful API Online Test tool to debug this interface.

Reference



Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
中国香港
+852 800 906 020 (免费)
美国
+1 844 606 0804 (免费)
英国
+44 808 196 4551 (免费)
加拿大
+1 888 605 7930 (免费)
澳大利亚
+61 1300 986 386 (免费)
EdgeOne 热线
+852 300 80699
更多本地服务热线陆续新增中