1
votes

I am currently using Firebase Cloud Messaging FCM for push notification.

Try to configure the Azure Push Notification for Xamarin Android. I need to place some api key to the azure push notification portal. The portal at the moment refer "Google GCM" and require an API Key.

I use keytool for debug.keystore to get the SHA1 etc and put it in the API Key field in the azure push notification portal

{"error":{"message":"SubCode=40000. Failed to validate credentials with GCM. The remote server returned an error: (401) Unauthorized...

Can anyone tell what does that mean. Am I using the wrong key.

2

2 Answers

1
votes

In the Firebase Console, go to your project and go to "Settings". Under settings go to the "Cloud Messaging" tab. On that tab there is a "Server Key". That is the key to use in Azure. Other instructions online say to use the google-services.json api key but that is incorrect.

https://stackoverflow.com/a/46473817/6617

0
votes

as answered at here : https://stackoverflow.com/a/27161060/5370550

SubCode=40000. Failed to validate credentials with GCM.

This will probably fix this error:

Under the SERVICES tab in the APIs console for Google devs:

enable Google cloud messaging for android