162

I am trying to figure out how the new version of GCM or Firebase Cloud Messaging works so I moved one of my projects to the new Firebase console, If I did not have the API KEY or I want to create a new one... where can I do it?

Frank van Puffelen
  • 418,229
  • 62
  • 649
  • 645
Nissar
  • 2,052
  • 2
  • 10
  • 12
  • 1
    You need API key only for the officially not supported languages. https://firebase.google.com/docs/libraries/ – Babu Sep 27 '16 at 08:55

11 Answers11

324

It's in https://console.firebase.google.com/project/(your-project-id)/settings/cloudmessaging

You can find the API KEY in:

(gear-next-to-project-name) > Project Settings > Cloud Messaging

Server Key is the API key.

Raviraj Subramanian
  • 354
  • 1
  • 7
  • 11
Diego Giorgini
  • 11,617
  • 1
  • 45
  • 48
61

STEP 1: Go to Firebase Console

STEP 2: Select your Project

STEP 3: Click on Settings icon and select Project Settings

Select Project Setting

STEP 4: Select CLOUD MESSAGING tab

enter image description here

Shaktisinh Jadeja
  • 1,201
  • 1
  • 15
  • 21
9

Enter here:

https: //console.firebase.google.com/project/your-project-name/overview

(replace your-project with your project-name) and click in "Add firebase in your web app"(the red circle icon) this action show you a dialog with:

  • apiKey
  • authDomain
  • databaseURL
  • storageBucket
  • messagingSenderId
Anbuselvan Rocky
  • 460
  • 4
  • 14
  • here is example with screen shot : https://www.appypie.com/faqs/how-can-i-get-api-key-auth-domain-database-url-and-storage-bucket-from-my-firebase-account – Mayuri R Talaviya May 17 '18 at 11:03
6

You can open the project in the firebase, then you should click on the project overview, then goto project settings you will see the web API Key there.

enter image description here

3

1.Create a Firebase project in the Firebase console, if you don't already have one. If you already have an existing Google project associated with your app, click Import Google Project. Otherwise, click Create New Project.

2.Click settings and select Permissions.

3.Select Service accounts from the menu on the left.

4.Click Create service account.

  • Enter a name for your service account.
  • You can optionally customize the ID from the one automatically generated from the name.
  • Select Furnish a new private key and leave the Key type as JSON.
  • Leave Enable Google Apps Domain-wide Delegation unselected.
  • Click Create.

This might be what you're looking for. This was in the tutorial on the site

Victor Le
  • 1,510
  • 2
  • 13
  • 23
  • This for the officially supported firebase SDKs. Where in the doc it says, Java and nodejs. – Babu Sep 27 '16 at 08:46
2

Please add new api key from Firebase -> Project Settings -> Cloud Messaging -> Legacy Server Key to the workspace file i.e google-services.json

Ali Hashemi
  • 2,457
  • 3
  • 29
  • 39
1

You can find your Firebase Web API Key in the follwing way .

Go To project overview -> general -> web API key

Rohan Devaki
  • 898
  • 4
  • 12
  • I am very thankful for those who promoted this answer, I made this answer as short as possible , so that you will save your time, and you can work on it. Please let me know If you have any suggestions – Rohan Devaki Aug 05 '20 at 06:43
1

You can find API KEY from the google-services.json file

0

You can also get the API key in the android studio. Switch to Project view in android then find the google-services.json. Scroll down and you will find the api_key

0

If you want to get the current api key programmatically in android studio, use FirebaseOptions.fromResource(context).getApiKey()

-2

admin should give you access to view the project settings, otherwise cloud messaging tab will be hidden on your console