Mobile Pushes via Firebase Cloud Messaging
This guide explains how to integrate Aghanim with Firebase Cloud Messaging (FCM) for sending mobile pushes to player devices to boost player engagement, retention, and monetization.
Using Aghanim's LiveOps Builder, you can define conditions that trigger mobile push notifications based on player actions or interactions within the Aghanim-generated game hub. Once the campaign conditions are met, Aghanim activates the FCM integration to deliver the corresponding mobile push to the player.
Requirements
- Access to the Firebase dashboard
- A Firebase project configured
- A LiveOps campaign, detailing when and why a mobile push should be sent to players
Step 1: Obtain the Service Account Key
To send push notifications to player devices, you need to provide Aghanim with the Service Account Info from Google Cloud Console.
- Navigate to Google Cloud Console → APIs & Services → Credentials.
- Click on Create Credentials and select Service Account.
- Fill the form with the necessary details and click Create.
- Make sure that created service account has access to Firebase Cloud Messaging API.
- Click on the newly created service account and navigate to the Keys tab.
- Click on Add Key and select Create new key.
- Choose the key type as JSON and click Create.
- A JSON file containing the Service Account Key will be downloaded to your device.
- Open the JSON file and copy its content. This content will be used as the Service Account Key.
Step 2: Provide the Service Account Key in Aghanim Dashboard
Once you have obtained the Service Account Key, provide it in the Aghanim Dashboard:
- Proceed to Aghanim Dashboard → App Connect → Push Notifications via Firebase Cloud Messaging.
- Install the plugin.
- In the plugin settings, paste the copied key to the Service Account Key field.
Step 3: Add FCM attributes to player.verify webhook response
When Aghanim sends a Verify player (player.verify) webhook to your server, your response must include specific firebase_* parameters. These parameters are necessary for FCM to send push notifications to the player's device.
Parameters
| Key | Type | Description | Required? |
|---|---|---|---|
firebase_fcm_token | object | A unique device identifier. Example: bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1... | Yes |
Example webhook response:
{
"player_id": "1x1x-xxxx1",
"name": "Molly",
"attributes": {
"firebase_fcm_token": "bk3RNwTe3H0:CI2k_HHwgIpoDKCIZvvDMExUdFQ3P1..."
}
}
Need help?
Contact our integration team at integration@aghanim.com