Phil
Phil

Reputation: 4069

Azure NotificationHub Invalid credentials when sending push

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?

Upvotes: 0

Views: 1385

Answers (1)

JT Thorne
JT Thorne

Reputation: 156

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

Upvotes: 2

Related Questions