Reputation: 2881
I found that Firebase Cloud Messaging has two ways to send Push Notifications.
I am aware of how the two ways are working and I have already implemented and tested my app and server using both ways.
However, I am required to disable the "Legacy server key" way of sending messages.
I cannot find how to disable this using Firebase Console.
Is it possible to disable the Legacy way of sending Push Notifications? How?
Upvotes: 1
Views: 11793
Reputation: 71
Upvotes: 6
Reputation: 201
you have to enable the firebase messaging API from the google developer console by clicking on the three dots and clicking on the "Manage API in Google Cloud Console"
after enabling the API go back to firebase and refresh then you will get the FCM key for messaging
Upvotes: 9
Reputation: 37798
There is currently no way to disable or even delete the Legacy Server Key from the Firebase Console. The Legacy Server Keys automatically get generated and tied to the project after creation.
There may still be a number of users (most coming from GCM) who still use the Legacy Server Key in their apps , which I believe is the reason why it hasn't been removed yet. Other than that, there is no other use for it as far as I know.
Update:
There is a way for you to delete the currently tied Legacy Server Key in your Firebase Project, however, I would like to point out that this might cause issues if not handled properly. Only do this if you are absolutely sure that you won't be using the Legacy Server Key ever again.
Here are the steps:
Server key (auto created by Google Service)
. If you check, this is the same Legacy Server Key visible in your Firebase Project.If you click on the pencil icon, it will direct you to a page where you can choose to Re-Generate or Delete the key. Choosing to generate a new key would give you a new server key, where the change would also reflect in your Firebase Project, while also still having the option to revert to it (only within the 24 hours limit).
Choosing to delete the key would automatically generate a new one for you, but you won't be able to have the option to revert to it.
Upvotes: 5