barykaed
barykaed

Reputation: 23

New Firebase cloud messaging server key keeps changing every week

The server key for cloud messaging under

Project Settings -> Cloud Messaging -> Server Key

keeps changing frequently, about once a week.

This is extremely frustrating. Our notification server calls fail with an error code of 401, which means it's an authorization problem.

But once I update the server key on my backend, with the key i see on the firebase console, which is different each time after this 401 authorization error, all works fine.

I have Googled my best on this, but there is no documentation, or support available for this error. Is this meant to change so much? If so, how can i update the SERVER_KEY automatically on my end..? Is there a REST API for this?

Upvotes: 2

Views: 1661

Answers (2)

Kofi Sammie
Kofi Sammie

Reputation: 3647

Google Firebase mostly sends you an email about upgrading their serve keys. when you receive such emails , quickly visit and update your scripts with your new key in the console. this can happen weekly or monthly, not really structured.

Upvotes: 0

GeorgeLBA
GeorgeLBA

Reputation: 344

I asked directly to the Firebase Support with an issue similar to the one you have and they told me:

If someone changes the server API key in Google API console, the server API key will also be changed in Firebase console. Firebase does not change your server API key without notifying you. Make sure no one has changed your server API key in Google API console recently and that the Server API key is the same in both the consoles.

A change in my API Key occurred only once in the time I have been using Firebase. So maybe you could contact the Firebase support or try to check if someone is changing the key in the Google API console.

Upvotes: 3

Related Questions