Push notifications

How to configure push notification endpoints and credentials for Recurly Engage.

Push prompts reach your users even when they aren't in your app or on your site. Add your device endpoints and push credentials to Recurly Engage, and you can send notifications through Firebase Cloud Messaging (FCM), Amazon Device Messaging (ADM), or Apple Push Notification service (APNs).
Available on all Recurly Engage plans

Prerequisites

  • You must have Company or App Administrator permissions in Engage.

Definition

Push prompts use device-specific endpoints to deliver notifications to users outside the app or website.

Key benefits

Reach users off-app Engage users even when they aren't actively using your site or app.
Highly targeted Deliver notifications to specific user segments based on traits and behaviors.
Flexible delivery Support FCM, ADM, and APNs channels from a single interface.

Add endpoint addresses

First, upload or sync your device endpoint information to Engage via a comma-separated values (CSV) file or API. Prepare a CSV with these columns:

ColumnDescription
IdThe device endpoint identifier.
ChannelTypeThe push service (FCM, ADM, or APNS).
AddressThe device token.
User.UserIdThe Engage user ID.

This can be a one-time initial load. To keep endpoints up to date, choose one of these options:

  • Periodically upload updated CSVs to the S3 bucket provided by Engage.
  • Call the Device Registration API from your application.

Registration API

[TODO: Dev/PO review — possible issue: the example uses "channel_type": "GCM", while the CSV ChannelType values listed above are FCM, ADM, and APNS.]

POST <base_url>/ingest/update_push_endpoint
Headers:
  Rf-App: <app_slug>
  User-Id: <user_id>
  Content-Type: application/json
Body:
{
  "token": "4d5e6f1a2b3c4d5e6f7g8h9i0j1a2b3c",
  "channel_type": "GCM",
  "endpoint_id": "eqmj8wpxszeqy/b3vch04sn41yw"
}

Amazon Device Messaging (ADM)

Required information: ADM Client ID and ADM Client Secret.

Follow Amazon’s credential guide: Obtain ADM Credentials.

Apple Push Notification service (APNs)

Required information:

  • Apple Push Notifications Service Bundle ID
  • Apple Push Notifications Service Team ID
  • Apple Push Notifications Service Token Key
  • Apple Push Notifications Service Token Key ID

Steps:

1

Log in to Apple Developer

Log in to Apple Developer.

2

Find your Bundle ID

Under Certificates, IDs & Profiles → Identifiers, select your app to view the Bundle ID.

3

Find your Team ID

Under Membership Details, note your Team ID.

4

Create or retrieve an APNs key

Under Certificates, IDs & Profiles → Keys, create or retrieve an APNs key.

Firebase Cloud Messaging (FCM)

Required information: FCM service JSON key.

Steps:

1

Open Service Accounts

In Firebase Console, go to Project Settings → Service Accounts.

2

Generate a private key

Click Generate New Private Key and download the JSON file.

3

Upload the JSON

Upload this JSON in the Engage console under Settings → Integrations → Push.

The downloaded JSON file has this structure:

{
  "type": "service_account",
  "project_id": "PROJECT_ID",
  "private_key_id": "PRIVATE_KEY_ID",
  "private_key": "PRIVATE_KEY",
  "client_email": "FIREBASE_ADMIN_SDK_EMAIL",
  "client_id": "CLIENT_ID",
  "auth_uri": "https://accounts.google.com/o/oauth2/auth",
  "token_uri": "https://oauth2.googleapis.com/token",
  "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
  "client_x509_cert_url": "CLIENT_X509_CERT_URL"
}

Upload file to Engage

Once you have your FCM JSON file or your ADM or APNs credentials, upload them in the Engage console:

1

Open Push settings

Go to Settings → Integrations → Push.

2

Add your credentials

Select the channel and upload the corresponding credential file or enter key values.

3

Save to activate

Click Save to activate push messaging for your application.


Did this page help you?