How to Get Firebase Server Key with Cloud Messaging API (Legacy)

Introduction

By default, Firebase Cloud Messaging uses the HTTP v1 API, which does not expose a Service (Server) Key. If your implementation requires the legacy FCM server key, you must enable the Cloud Messaging API (Legacy). This guide shows how to activate the legacy API and retrieve your Firebase Server Key.

Enable Cloud Messaging API (Legacy)

  1. In the Firebase console, select your project and navigate to Project Settings.
  1. Go to the Cloud Messaging tab. Click the three vertical dots next to Cloud Messaging API (Legacy) and choose Manage API in Google Cloud Console.
  1. In the Google Cloud Console, click Enable to activate the Cloud Messaging API (Legacy).
  1. Return to the Firebase console, refresh the Cloud Messaging tab, and verify that the Server key field appears under the Legacy section.

Retrieve Your Firebase Server Key

  1. In the Cloud Messaging tab of Project Settings, locate the Server key under Cloud Messaging API (Legacy).
  2. Copy this key for use in server configurations or third-party integrations.

Troubleshooting and FAQs

Q: I don’t see the three vertical dots for the Legacy API. What should I do?
A: Ensure you have Editor or Owner permissions for both the Firebase project and the underlying Google Cloud project.

Q: After enabling the API, the Server key still doesn’t appear.
A: Refresh the browser or clear its cache. 

Was this article helpful?

To speak to our Agency consultant, fill in the form found at our Contact Page.

  • Get Started

    Enter your name and email address to get started with your project...

  • This field is for validation purposes and should be left unchanged.

Not recently active