Azure Notification Hub GCM Authentication Error 401

authentication, azure, google-cloud-messaging, notifications, push-notification

Solution

For new users of GCM. You should use a Server Key that is auto-generated after creating/importing a project in the Firebase Console:

Starting from Sept. 2016 new server key can only be created in the Firebase Console using the Cloud Messaging tab of the Settings panel. Existing projects that need to create a new server key can be imported in the Firebase console without affecting their existing configuration.

Problem

When I am entering the GCM API Key to the Notification Hub, it gives me the error: ``` {"error":{"message":"SubCode=40000. Failed to validate credentials with GCM. The remote server returned an error: (401) Unauthorized...TrackingId:4de00134-abe4-41de-9785-009dda22c2bc_M0_M0_G7, TimeStamp:10/28/2016 8:06:46 AM","code":"BadRequest"}} ``` Can anyone help me to get out of this?

Original source

Related problems