I found the solution @David Freire ...U need to clean FCM Legacy Api-Key first and then update FCM (V1)...it works
I am unable to add my new FCM v1 credentials to the azure notification hub, it responds with Invalid Firebase Credentials
I have an existing notification hub that has been using the legacy FCM server key. I'm trying to update it to use the newer FCM v1 credentials. I've created the correct service account and enabled Firebase Cloud Messaging API (V1) in the google console. I've tested those credentials in a simple app however, when I try to enter them into the azure notification portal it fails.
{"error":{"code":"BadRequest","message":"Invalid Firebase credentials."}}
3 answers
Sort by: Most helpful
-
-
ajkuma 27,871 Reputation points Microsoft Employee
2025-01-07T04:41:01.77+00:00 Following-up from the comments, sharing the solution shared by Deepak Dosaya.
Scenario:
Attempting to update an Azure Notification Hub to use the new FCM v1 credentials after previously using the legacy FCM server key. Despite setting up the correct service account and enabling the Firebase Cloud Messaging API (V1) in the Google Console, the update fails with the error:
{"error":{"code":"BadRequest","message":"Invalid Firebase credentials."}}
Issue:
The Azure Notification Hub does not accept the new FCM v1 credentials, and it returns an error stating that the credentials are invalid.
Copying the solution shared by Deepak Dosaya ( Thank you!)
Resolution:
To resolve this issue, you need to clean or remove the legacy FCM API key first. Then, update the Azure Notification Hub with the new FCM v1 credentials. Please follow these steps:
Remove Legacy API Key: In the Azure portal, navigate to your Notification Hub settings and remove any old or legacy FCM API keys still associated with the hub.
Update with FCM V1 Credentials: After removing the legacy API key, update the Notification Hub with the newly generated FCM v1 credentials (service account and Firebase API configuration).
Once these changes are made, the Notification Hub should accept the new credentials and function as expected.
If the answer helped (pointed you in the right direction) > please click Accept Answer - it will benefit the community to find the answers quickly.
-
ajkuma 27,871 Reputation points Microsoft Employee
2025-01-02T10:08:46.8766667+00:00 Mark Zacharias, Apologies for the delayed response.
I understand that you have tested those credentials/app. If you haven't done, please ensure that you have enabled the FCM V1 in the Cloud Messaging tab in Firebase. This step is often overlooked and can cause the "Invalid Firebase Credentials" error ( similar discussion thread)
Double-check that the service account JSON file you are using contains the correct
clientEmail
,projectId
, andprivateKey
values. These should be directly copied from the JSON file provided by Google.
Ref: Ensure that FCM credentials are updated. Follow step 1 in the REST API guide.Do I need to store both FCM legacy and FCM v1 credentials?
Yes, FCM legacy and FCM v1 are treated as two separate platforms in Azure Notification Hubs, so you must store both FCM legacy and FCM v1 credentials separately. For more information, see the instructions to set up credentials.
Kindly let us know, I'll follow-up with you further.