Question

I have looked for resources on this particular problem with little luck so far so I thought I would try here.

I am attempting to create an Amazon Web Service Simple Notification Service app in the AWS-SNS console using GCM. I have created the APNS app for the iOS version with no troubles, however, when attempting to create the GCM version I receive the error: "The credentials you entered are invalid. Please enter valid credentials and try again."

In the Google APIs - API Access dashboard I have created both a key for server app and a key for android app. Below are a few screenshots to illustrate the problem.

Any suggestions as to what the problem may be or any instructional documentation recommendations would be tremendously appreciated.

Google API configuration

AWS SNS GCM error message

Was it helpful?

Solution

More on what Rohan has said, it would be on Google's end rather than Amazon's.

Delete the Server API Key in the Google API Console, and create a new one, allowing all IP addresses. Add the new key in AWS SNS, and you should be good to go!

OTHER TIPS

Amazon documentation is very old and not accurate anymore.

When you created your Application and the Credentials on Google Developers Console, from the left menu on Google developer console select:

APIs & auth -> APIs -> Google Cloud Messaging for Android -> Enable API

Google recently migrated a lot of the GCM service/credential handling to Firebase. As a result you need to create a Server Key in the Firebase Console now.

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

You need to use the API key listed under Key for server apps (with IP locking) in the Google Console. The key listed under Android app will not work.

The Amazon SNS Getting Started with GCM documentation provides step-by-step guidance on setting up your app. If you are still having issues, please contact us via AWS Support or the Amazon SNS forum and we can troubleshoot further.

full disclosure: I am an Amazon SNS engineer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top