I encountered an issue when trying to enable the Cloud Messaging API (Legacy) in the Firebase console. Specifically, clicking the option to "Manage API in Google Cloud Console" results in a "Failed to load" error.
Before concluding that Google has disabled enabling the Legacy API, could someone else attempt the following steps in their own project to see if they encounter the same issue?
Log in to the Firebase console.
Select a project.
Go to Project Settings.
Locate the "Cloud Messaging" tab.
Click the three vertical dots next to "Cloud Messaging API (Legacy)" and select "Manage API in Google Cloud Console."
If anyone else can replicate this error, it would be helpful to confirm. Additionally, if anyone has successfully enabled the Legacy API recently, please share your experience.
Expected the page to load and able to enable to Cloud Messaging API (Legacy) in the Firebase console to fetch the server key. If this is not possible, Is there any other way to fetch server key
2
Answers
The firebase cloud messaging api has been changed. Here is the related document.
So for the new API, you need to send the request with OAuth 2.0 authorization.
The server key is not needed anymore.
That’s why you cannot find the server key anywhere in the Firebase console.
messages (including upstream messages) with those APIs was deprecated
on June 20, 2023, and will be removed on June 21, 2024.
Now you have to create JWT token to authenticate request before sending everytime. And Instead of server key now you can use firebase service account to initialize firebase app using it’s
admin sdk
andservice-account.json
To create JWT token ,
service-account.json
is required.