Skip to content

enable Cloud Messaging API (Legacy) is not allowd anymore for sending notifications #1189

@hazem4alex

Description

@hazem4alex

Google has officially deprecated the legacy Cloud Messaging API in favor of the newer, more secure FCM HTTP v1 API, which uses OAuth 2.0 access tokens. The legacy API was shut down in July 2024, so you can no longer enable or use it for new projects.
If you are migrating an existing application, you can follow these general steps to start using the current API:
Access your Firebase project: Go to the Firebase console and select your project.
Navigate to Cloud Messaging settings: Click the gear icon next to "Project Overview," select Project settings, and then click the Cloud Messaging tab.
Enable the Firebase Cloud Messaging API (V1):
Find the Firebase Cloud Messaging API (V1) section.
If it's not already enabled, click the "Manage API in Google Cloud Console" button to enable it.
Create a service account key:
In the Service accounts tab of your project settings, click Generate new private key.
Download the JSON file, which contains your OAuth 2.0 credentials.
Update your server code: Use a client library for the Firebase Admin SDK or manually update your code to use the HTTP v1 API with the new service account credentials.
For further guidance, consult the official Firebase documentation for migrating from the legacy APIs to HTTP v1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions