Firebase Cloud Messaging (v1) Credentials Guide
In order to send notifications to your game on Android, Teak needs your Firebase Cloud Messaging (FCM V1) credentials.
In this guide, we’ll download a Service Account Key (in JSON format), and copy the Sender ID value from your Firebase console, and input those into Teak.
If you already have FCM (Legacy) setup with Teak, please see our Firebase (v1) Migration guide for instructions on ensuring a smooth rollover from Legacy credentials to v1 credentials. |
You will need the following accounts to complete this step:
-
An account on the Firebase Console with an Editor or Owner role and access to your game
-
An account on Teak with access to your game
Open in your Firebase project.
-
Go to your Firebase Console and open the project for your game. This must be the same project that you are using to authenticate the Firebase SDK in your game.
If you need to confirm that you have the correct Firebase project: Open the
google-services.json
file from your Unity Project and find theproject_number
. Confirm that the value matches theSender ID
value on the Cloud Messaging tab. -
Click the gear icon in the upper left corner, and click Project settings.
-
Click on the Cloud Messaging tab.
Enable Firebase Cloud Messaging API (V1), (if it isn’t already enabled).
-
Make sure that Firebase Cloud Messaging API (V1) is enabled. Support for FCM (Legacy) will be discontinued by Google on June 20th, 2024.
Enabling Firebase Cloud Messaging API (V1)If the V1 API isn’t enabled, proceed with these steps to activate it.
-
In the Firebase Cloud Messaging API (V1) section, click on the 3 vertical dots. ⋮
-
Click Manage API in Google Cloud Console.
-
In the new tab that opens, click Enable.
-
This will load the API/Service Details page. After the page has loaded, close this tab.
-
Return to the Firebase Console page and refresh the page.
-
Firebase Cloud Messaging API (V1) should now be enabled.
-
Copy the Sender ID to Teak
-
In the Teak Dashboard for your game, navigate to .
If you already have FCM (Legacy) setup with Teak, please see our Firebase (v1) Migration guide for instructions on ensuring a smooth rollover from Legacy credentials to v1 credentials.
-
Click Setup Firebase Cloud Messaging (V1) to open the FCM setup modal.
-
Copy
Sender ID
from Firebase to theFCM Sender ID
field in the setup modal for Teak.
Leave this modal open for the next step.
Generate a Service Account Key in Firebase
-
Back in the Firebase dashboard, click the Service accounts tab.
-
By default, the Firebase Admin SDK service account will be selected. This is fine for most cases.
-
Click the Generate new private key button and confirm you want to Generate key in the popup. This will download a
private key
as aJSON
file.