0

I've set up an Azure Notification Hub and I have gone through all the steps to incorporate Push Notification into my Android app. The app has been working fine, receiving the push notifications just like it should. Then today I went to try and send a push and it failed. So I tried from the Azure Portal and it failed there too.

It seems to be only Android related though, as the devices that run my app in iOS are receiving the Push Notification like they should. I know for a fact I have not changed anything in my code. But instead of getting the Push Notification like I should I now get the following message in Azure portal.

The Push Notification System rejected the request because of an invalid credential

Does anyone have any idea why this would happen? I'm stumped. I thought at first maybe it was something with my API key (which again I have not changed) so I checked. The Google Cloud Message API Key in the Azure Portal matches what I have in my Google API Console, so it's not that.

What could it be?

Srusti Thakkar
  • 1,835
  • 2
  • 22
  • 52
Phil
  • 4,029
  • 9
  • 62
  • 107

1 Answers1

2

Ok, so here is how I fixed my issue: In Google API Manager I used to only have an api key of type - Android

I created another key of type - Server, and copied that into my azure gcm config, and away she goes... notifications working again

JT Thorne
  • 156
  • 1
  • 4
  • it would be really nice if Google would notify people that they are making this change. No notice from them at all, yet this IS the correct answer. Their documentation indicates using the Mobile --> GCM API area and generating a Android Key, not server key. Thank you JTThorne for figuring it out!!! – Phil Jun 13 '16 at 12:51
  • Having the same issue last days, but can't even update notification hub GCM key on azure Error Error updating the Notification Hub – sensei Jun 15 '16 at 13:41
  • Make 100% sure you generate Server Key in Google console. I also got errors where I used Android/Browser – JT Thorne Jun 15 '16 at 14:42