Skip to main content

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

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.

  1. Navigate to Google Cloud Console → APIs & Services → Credentials.
  2. Click on Create Credentials and select Service Account.
  3. Fill the form with the necessary details and click Create.
  4. Make sure that created service account has access to Firebase Cloud Messaging API.
  5. Click on the newly created service account and navigate to the Keys tab.
  6. Click on Add Key and select Create new key.
  7. Choose the key type as JSON and click Create.
  8. A JSON file containing the Service Account Key will be downloaded to your device.
  9. 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:

  1. Proceed to Aghanim Dashboard → App ConnectPush Notifications via Firebase Cloud Messaging.
  2. Install the plugin.
  3. 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

KeyTypeDescriptionRequired?
firebase_fcm_tokenobjectA 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