Profile Requirements
Courier support sending Apple Push Notifications using single and multiple tokens. To deliver a message to a recipient over Apple Push Notifications, Courier must be provided the recipient's APN registration token. These token should be included in the recipient profile as apn.token
for single tokens and apn.tokens
for multiple.
Single Token
{
"profile": {
"apn": {
"token": "YOUR TOKEN"
}
}
}
Multiple Tokens
{
"profile": {
"apn": {
"tokens": ["YOUR TOKEN 1", "YOUR TOKEN 2"]
}
}
}
Override
You can use a provider override to replace what we send to the Apple Push Notifications API or provide optional data payload for any of the APN alert types.
{
"overrides": {
"apn": {
"body": {
"expiry": "number", // e.g Math.floor(Date.now() / 1000) + 3600 Expires 1 hour from now.
"badge": "Number",
"sound": "String",
"alert": "String or Dictionary",
"payload": "'{\"messageFrom\":\"Courier\"}'",
"topic": "your-app-bundle-id"
}
}
}
}
Everything inside of override.apn.body
will replace what we send to the APN API. Values that are not replaced will still be sent.
Updated 22 days ago