Any way to regenerate the API Key for FCM (Cloud Messaging section) in Firebase Console? The key is not editable and is different from the one automatically generated in Google APIs Console. Due to this misconfiguration I'm always getting unauthorized 401 from FCM...
In the Firebase console, open Settings > Service Accounts. Click Generate New Private Key, then confirm by clicking Generate Key.
Click the Settings (Cog wheel) icon next to your project name at the top of the new Firebase Console, as per screenshot below: Click Project settings . Click on the Cloud Messaging tab. The key is right under Server Key .
Go to the Google Maps Platform > Credentials page. On the Credentials page, click Create credentials > API key. The API key created dialog displays your newly created API key. Click Close.
Update: Even with the new UI of the Cloud Messaging Tab where the FCM Token is visible, the Regenerate Key button would still be visible if the Server Key was deleted.
Update: It seems it is now possible to regenerate the Server Key via the Firebase Console, however, the label/button (see screenshot) only shows up when there is no Server Key being used.
After clicking on Regenerate Key, it will generate a new Server Key which is also visible in the Google Developers Console.
Still no way to re-generate the API Key from Firebase Console. HOWEVER, I was able to re-generate it via the Developer Console.
I went through the consoles again after having a discussion with @SarthakMishra and was able to actually re-generate the API Key found in the Firebase Console.
First, I'll provide the steps on getting to the part where to actually see the current Server Key.
From there, you will be able to see the Server Key and the Sender ID.
Here are the steps to re-generate the Server Key. Go to your Developer Console.
After that, you will be able to see the API Keys currently available for the project. Commonly, you will see two API Keys. One Server Key and one Android Key, where it has a label beside it saying (auto created by Google Service). Click on the Server Key.
Do you want to replace the current key with a new one?
The new key will be available immediately. The current key will be deactivated permanently in 24 hours.
After that, you will see the new Server Key generated. Go back to the page where you can see the Server Key and Sender ID and refresh it. It should match the new Server Key generated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With