After you get a batch of user accounts from a third-party data platform or business backend, when launching a marketing campaign for such users, you don't need to call the single account push API separately; instead, you can directly use the batch account push feature to push messages to accounts in batches.
Note:
The abovementioned accounts must be bound with a TPNS token. For detailed directions, please see Binding account (Android) or Binding account (iOS).
Note:
Requirements for the uploaded account package:
- Account package format and size:
.zip\.txt\.csv
file within 100 MB.- The
.zip
package can contain a single.txt
or.csv
file but not folders..txt
file requirements: (1) encoded in UTF-8; (2) one account (2–100 characters) per row..csv
file requirements: (1) one column only; (2) one account (2–100 characters) per row.
Upload your account package file as instructed in Account Package Upload API. After the call succeeds, an upload_id
will be returned, such as 11231.
When you call the push API, set audience_type
(push target) to package_account_push
(account package push), enter the upload_id
obtained in Step 1 such as 11231, and choose to push to the recent or all devices bound to each account by setting the account_push_type
field.
The following sample pushes a message to users who have won prizes in a marketing campaign:
{
"audience_type": "package_account_push",
"upload_id": 11231,
"account_push_type":0,
"message_type": "notify",
"message": {
"title": "Congrats on winning in the campaign",
"content":"Get online to claim your prize!"
},
"platform": "android"
}
Was this page helpful?