Firebase Cloud Messaging API (V1): Server Key missing

Viewed 2496

We're using Urban Airship to send push messages to our Android app.

In that process, we need to configure Airship with 'Server Key' provided in Firebase Console -> Cloud Messaging.

As recommended there, we are trying to migrate from GCM to FCM.

The problem is that 'Server Key' is missing in 'Firebase Cloud Messaging API (V1)' configuration. It is still available in 'Cloud Messaging API (Legacy)' configuration, but migration is suggested.

Following the links in FCM configuration didn't help too much with this issue.

Firebase Console - Cloud Messaging

2 Answers

To access the server key:

  1. Open Project Settings as you already did
  2. Open the Firebase Cloud Messaging API menu (to the right of the Enabled)
  3. Click on Manage API in Google Cloud Console, it will redirect you to Google Cloud Platform
  4. In Google Cloud Platform, you will get Firebase Cloud Messaging API, click on Manage. It will redirect you to APIs & Services
  5. Click on Credentials (on the left side of the screen)
  6. There you will get different tables. One is called API Keys and inside you will see an entry called Server Key
  7. Click on Show Key, and you will get what you want

I hope this will help you

From Firebase Cloud Messaging API (V1), we have to enable the cloud messaging service.

  1. Open project settings
  2. Select three dot menu right to Cloud Messaging API (Legacy) and tap Manage API in Google Cloud Console
  3. In the redirected Google Cloud Console enable the cloud messaging service.
  4. Go back to project settings and refresh. You can get the server key now.

Reference - https://documentation.onesignal.com/docs/generate-a-google-server-api-key

Related