amazon-web-servicesgoogle-cloud-messaging

Amazon SNS: "Platform credentials are invalid" when re-entering a GCM API key that previously worked


We have been using Amazon SNS to send Android push notifications since April this year.

Pushes have sent with no problem, however there has never been any record of calls to the Cloud Messaging API in the Cloud Console (seems odd?).

Today I created a new API key for the Static Map service (unrelated) and renamed our Cloud Messaging API key (only the name, the key is the same). From this point no pushes have been sent, and trying to create a new platform application (or update the existing one) in AWS results in:

Invalid parameter: Attributes Reason: Platform credentials are invalid (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID:)

I have also tried manually making calls to the https://gcm-http.googleapis.com/gcm/send endpoint using the key which results in Unauthorized (401).

Interestingly, I can make calls to the above endpoint using the key I created today, however they fail on MismatchSenderId.

I can't see a lot of the previous options that the Cloud Console had (server / browser keys, etc) within the API Manager?


Solution

  • API Key management for GCM has been moved to Firebase Console. You can create a new Firebase Project (or import an existing cloud project) and you should obtain a new Server Key for Cloud Messaging.

    see the updated documentation:
    https://developers.google.com/cloud-messaging/android/client#create-an-api-project
    and the stack overflow question: Where can I find the API KEY for Firebase Cloud Messaging?

    if you still have problems please contact:
    https://firebase.google.com/support/contact/troubleshooting