Skip to main content

Prerequisites

Setup

1

Get your Pusher Beams credentials

In Pusher, open the dashboard and copy your Beams instance ID and secret key.
2

Configure in Courier

Open the in Courier, enter your instance ID and secret key, 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 Beams sends to interests or to users, so the profile you send to needs a pusherBeams object with at least one mode: web, apns, or fcm. Store it once with , which merges into the profile and creates it if it does not exist:
Everyone subscribed to the interest gets the notification.
Then send to user_id and Courier resolves the address. For a one-off with no stored profile, pass it inline instead: "to": { "pusherBeams": { "interests": ["interest-1"], "mode": ["apns"] } }.

Send by user id

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

Send to a recipient

Courier reads pusherBeams 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 the request body Courier sends to Pusher Beams, or swaps the instance ID and secret key.

Body overrides

This example replaces the title and body:
Courier sets only title and body. Overrides merge into that alert object and go out in every mode you select, so mode-specific shapes like fcm.notification are ignored.

Config overrides

Swap the instance ID or secret key at send time:

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.