Overview
Firebase Cloud Messaging (FCM) is Google’s messaging and notifications service that allows you to integrate push notifications in your apps, similar to the Apple Push Notification Service for iOS.
Message requests sent to FCM need to be authorized before they're routed to your apps—and eventually to your contacts’ devices. FCM can handle service account authentication by validating a project-specific JSON key file. Cordial requires the JSON key file for the project that contains your app in order to set up proper authentication channels with FCM servers.
Configure Cordial to access your FCM data
Give Cordial authentication to access your FCM account:
Key file authentication
Key file authentication requires you to create a service account in Google Cloud Platform, give the service account access to your FCM data, download a JSON key file, and upload it to Cordial.
Create a Google Service account
Before you can enable the integration, you must first create a Google Service account in Google Cloud Platform.
1. Log in to your FCM account and open your project.
2. From the FCM console, navigate to Project Overview > Project Settings.
3. In your Google Cloud IAM & Admin panel, navigate to Service accounts, give the account a name and an ID, and then click Create.
4. Enter a service account name, ID, and description and click Create and continue.
5. Click the Role dropdown and select Firebase Cloud Messaging API Admin.
Make sure to select Firebase Cloud Messaging API Admin, not Firebase Cloud Messaging Admin.
Generate JSON credentials
Once you've created your FCM service account, you can generate the JSON key file.
1. From your FCM service account, click the ellipsis (...) under Actions and select Manage keys.
2. Select Add Key > Create new key.
3. Select the JSON radio button and click Create to download a JSON key.
3. Upload your JSON key in Cordial.
Authenticate in Cordial
1. In Cordial, navigate to Settings > Account Transports.
2. Choose the mobile app transport that you are going to edit.
3. Click the Edit button in the Android Sending Credentials pane.
4. Upload your Firebase service account JSON key.
Comments
0 comments
Please sign in to leave a comment.