Reconnect currently supports only Firebase integration for push notifications. Additional integrations are coming soon.
Integrate your Firebase Cloud Messaging account with Reconnect to fire push notifications to both Android and iOS users.
Set up the integration
Prerequisite: A Firebase account integrated with your application.
To create the integration in Reconnect:
- In the Integrations tab, click Create Channel Integration, and then select Push Notifications.
- Select the Firebase option.
- Upload your Service Account Key file. Learn how to retrieve the file in the next section.
Note the following:- The file is available to download in your project in Firebase.
- Must be a JSON file.
- Click Validate & Save. The file contents are validated against Firebase services. If the validation fails, an error is displayed and the file is removed. If the validation is successful, the integration is saved and is ready to use.
Retrieve the Firebase Service Account Key file
To retrieve the Firebase key file, you must create a new service account and then generate the token.
Step 1: Create a new service account in Firebase
In your project in Firebase, do the following:
- Go to Project Overview › Project Settings.
- In either the Cloud Messaging or Service accounts tab, select Manage Service Accounts.
This takes you to the Google Cloud console (console.cloud.google.com). - Click + Create Service Account.
- Enter a name for the service account (for example: DY, DYServiceAccount, or DynamicYield).
- Enter your service account ID.
- Optionally, enter a description for clarity. For example: “For push notifications using DY services”.
- Click Create and Continue.
Step 2: Define an access role and generate the token
- In the Grant this service account access to project area, click Pick a Predefined Role, and then select one of the following roles, which have the cloudmessaging.messages.create permission (to learn more about roles, see Understanding Roles in the Firebase documentation):
- Firebase Admin (roles/firebase.admin): Grants broad permissions across all Firebase services, including Firebase Cloud Messaging. Allows the account to send push notifications, but is over-permissive for just FCM-related operations.
- Firebase Grow Admin (roles/firebase.growthAdmin): Provides permissions across several Firebase services that are related to growth, like Firebase Cloud Messaging and Firebase Remote Config.
- Firebase Admin SDK Administrator Service Agent (roles/firebase.sdkAdminServiceAgent): Allows service accounts to act as Firebase Admin SDKs. It isn't specifically designed for FCM but might include the necessary permissions.
- Firebase SDK Provisioning Service Agent (roles/firebase.sdkProvisioningServiceAgent): Designed to provision and manage SDK configurations. It's not necessarily directly related to sending FCM messages.
- Click Continue and then Done.
- In the actions menu next to the service account (3 vertical dots), select Manage keys.
- Click + ADD KEY and then select JSON.
- A JSON key is generated and downloaded. Provide this key to Dynamic Yield in the integration as described in the set up the integration section.
Useful Firebase documentation
The following are important docs with information about the fields contained in notifications sent using the Firebase Admin SDK (color, image, click link, title, body):