Prerequisites
- A Pusher Channels app
- Your Pusher App ID, Key, Secret, and Cluster
Setup
1
Get your Pusher Channels credentials
In Pusher, open the dashboard, select your app, and copy the app ID, key, secret, and cluster.
2
Configure in Courier
Open the in Courier, enter your app ID, key, secret, and cluster, then click “Save.”
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. Pusher addresses the recipient by channel, so the profile you send to needs apusher object. Store the channel once with , which merges into the profile and creates it if it does not exist:
user_id and Courier resolves the address.
For a one-off with no stored profile, pass it inline instead: "to": { "pusher": { "channel": "my-channel" } }.
Send by user id
The call in every language, and the rest of the profile object.
Send to a recipient
- Send to user id
- Send to
pusher
Courier reads
pusher off the saved profile, so preferences apply and the value can change without touching this code.Template requirements
You can use Pusher two ways in Courier:- The Push channel. You get the rich editor.
- A direct Pusher channel. You get a jsonnet editor to customize your payload.
Example event
Overrides
covers the two levels and which one wins. lists the fields every push provider takes. Pusher uses the Pusher SDK directly, so it takes noproviders.pusher.override. Courier sends the rendered event to the channel on the recipient profile, and a push channel override’s data replaces the data that goes with it.
Tracking events
Courier includes tracking URL information in thedata attribute on the incoming message payload. See .
Provider details
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.