192

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
  • 565,676
  • 79
  • 828
  • 807
Nissar
  • 2,360
  • 2
  • 13
  • 12
  • 2
    You need API key only for the officially not supported languages. https://firebase.google.com/docs/libraries/ – Babu Sep 27 '16 at 08:55

12 Answers12

361

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
  • 364
  • 1
  • 6
  • 11
Diego Giorgini
  • 12,489
  • 1
  • 47
  • 50
75

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,427
  • 1
  • 17
  • 22
11

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
  • 606
  • 6
  • 22
Bruno Giubilei
  • 187
  • 2
  • 5
  • 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
11

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,758
  • 3
  • 17
  • 25
  • 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
  • 3,158
  • 3
  • 34
  • 48
2
  1. Click on Project Overview -> Project Settings,
  2. Then click on Cloud Messaging,
  3. Then click on three dots to the right side of Cloud Messaging Api(Legacy) and enable it,click on, to view image

4. Come back to Project Overview -> Project Settings -> Cloud Messaging, here you will get the Server Key

1

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

Vimal Swaroop J
  • 135
  • 1
  • 10
0

If you want to get the current api key programmatically in android studio, use

 FirebaseOptions.fromResource(context).getApiKey()
Saeed
  • 3,294
  • 5
  • 35
  • 52
Harshal Pudale
  • 178
  • 1
  • 2
  • 7
0
  1. Click on Project Overview -> Project Settings
  2. Copy your web api keyGet you web api key
Sehrish Waheed
  • 1,230
  • 14
  • 17
-1

Once you just go to autherization section it will generate and also make sure enable legacy if need Web api key is not generated in firebase while creating a new project as stated on the documentation

Prageeth godage
  • 4,054
  • 3
  • 29
  • 45
-2

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