abeljus
abeljus

Reputation: 392

Firebase Cloud Messaging API (V1): Server Key missing

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

Upvotes: 19

Views: 17168

Answers (3)

krishnaacharyaa
krishnaacharyaa

Reputation: 24940

Firebase cloud messaging is now shifted to API (V1)

So to get the serverkey you should enable the cloud messaging API (Legacy).

Follow the steps:

  1. Click on the three dots and click on manage Api in google cloud console enter image description here

  2. Click on enable. enter image description here

3.Now redirect back to the main page and refresh the page.

Now you have your serverkey

Upvotes: 23

Arunachalam Ganesan
Arunachalam Ganesan

Reputation: 111

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

Upvotes: 7

guerdaa
guerdaa

Reputation: 216

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

Upvotes: 11

Related Questions