[firebase] Where can I find the API KEY for Firebase Cloud Messaging?

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?

The answer is


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.


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


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

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


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

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


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


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


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


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


Examples related to firebase

How can I solve the error 'TS2532: Object is possibly 'undefined'? Getting all documents from one collection in Firestore FirebaseInstanceIdService is deprecated Failed to resolve: com.google.firebase:firebase-core:16.0.1 NullInjectorError: No provider for AngularFirestore Firestore Getting documents id from collection How to update an "array of objects" with Firestore? firestore: PERMISSION_DENIED: Missing or insufficient permissions Cloud Firestore collection count iOS Swift - Get the Current Local Time and Date Timestamp

Examples related to google-cloud-messaging

Google Play Services GCM 9.2.0 asks to "update" back to 9.0.0 Firebase cloud messaging notification not received by device Error:Conflict with dependency 'com.google.code.findbugs:jsr305' Where can I find the API KEY for Firebase Cloud Messaging? How to send push notification to web browser? google-services.json for different productFlavors INSTALL_FAILED_DUPLICATE_PERMISSION... C2D_MESSAGE Android: Test Push Notification online (Google Cloud Messaging) How to get RegistrationID using GCM in android Why do I get "MismatchSenderId" from GCM server side?

Examples related to firebase-cloud-messaging

FirebaseInstanceIdService is deprecated Error: fix the version conflict (google-services plugin) How do you send a Firebase Notification to all devices via CURL? No notification sound when sending notification from firebase in android FCM getting MismatchSenderId Firebase (FCM) how to get token How to handle notification when app in background in Firebase What is FCM token in Firebase? Firebase FCM force onTokenRefresh() to be called Send push to Android by C# using FCM (Firebase Cloud Messaging)