Skip to main content

Prerequisites

Setup

Open the in Courier and enable it. The integration needs no credentials, because Courier delivers using the Expo push tokens on each recipient’s profile.

Profile requirements

Device tokens live on the user profile rather than on the send, so one profile can hold tokens for several devices and every push provider reads them from the same place. covers the model. Expo addresses the device by Exponent push token, so the profile you send to needs an expo object. Store the token once with , which merges into the profile and creates it if it does not exist:
Pass one device’s token as a string to expo.token.
If you pass both token and tokens, Courier merges token into the tokens array and dedupes it.
Then send to user_id and Courier resolves the address. For a one-off with no stored profile, pass it inline instead: "to": { "expo": { "token": "ExponentPushToken[xxxxxxxxxxxxxxxxxxxxxx]" } }.

Send by user id

The call in every language, and the rest of the profile object.

Send to a recipient

Courier reads expo off the saved profile, so preferences apply and the value can change without touching this code.

Overrides

covers the two levels and which one wins. lists the fields every push provider takes. A provider override changes what Courier sends to Expo’s API. Override keys apply at the top level of the Expo message, not nested under body. This request adds a ttl and turns off the sound:
Each key you set replaces that key outright. Keys you leave out are still generated and sent (title, subtitle, body, and data above). For every option, see Expo’s push notifications docs. To send to specific devices when a user has multiple Expo tokens, see .

Tracking events

Courier includes tracking URL information in the data attribute of the incoming message payload. See

Troubleshooting

Could not find APNs credentials

Expo’s help forum explains how Expo handles APN tokens:
Expo push tokens work quite similarly to how Apple’s tokens work with APN’s, since Expo’s server is a relatively thin service that relays notifications to Apple. Expo needs valid APN credentials to send push notifications. And as with APNs in general (not specific to Expo), it doesn’t matter what APNs credentials you had at the time an iOS device provided a device token - the APN credentials just need to be valid at the time of sending the notification.
So, if you revoke your APNs credentials or clear them from Expo, or if your APNs credentials expire (APN p12 certificates expire after one year), Apple will reject all of your push notifications until you provide Expo with valid APN credentials. To be clear, your Expo push tokens and the underlying iOS device tokens are still valid and will still work once you provide new, valid APN credentials.
In this case, the error Could not find APNs credentials for… means that Expo does not have any copy of your APNs credentials (currently a p12 certificate). You will need to let Expo recreate the credentials for you (recommended in most cases: run exp build:ios -c to clear all of them and then run exp build:ios to let Expo re-provision them) or upload your own credentials from Apple’s developer center (be sure to follow the instructions carefully.
  • Your push key should be correctly configured at https://expo.dev/accounts/[account]/projects/[project]/credentials?platform=ios
  • You’ve correctly set your bundle identifier in your configuration
  • If you are explicitly passing in the experienceId in Notifications.getExpoPushTokenAsync({ experienceId: 'xxxx' }), make sure it is in the format of @expo_account/expo_projectname

Provider details

Courier recommends routing to the channel. Naming this key in routing.channels instead is supported, and sends through just this provider.

Send to a specific provider

When that is worth doing, and what you give up: failover, channel priority, and providers you add later.