5

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

user3192649
  • 313
  • 1
  • 4
  • 13

4 Answers4

8

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!

James
  • 962
  • 5
  • 18
2

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
Ardavan Kalhori
  • 1,664
  • 1
  • 18
  • 32
2

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

Community
  • 1
  • 1
Pedro
  • 2,813
  • 2
  • 22
  • 16
  • After create Firebase account and select client type(iOs,Android or Web) you will see your params screen. After that refresh Google Console Account and you will see a new ServerApiKey created by Firebase, use it. – Philip Enc Jan 05 '17 at 11:26
1

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.

Rohan Deshpande
  • 3,535
  • 1
  • 26
  • 31
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Matthew Darnell Apr 03 '14 at 21:02
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. – Jeroen Apr 03 '14 at 21:14
  • I have followed the doco very closely I believe. I am definitely using the 'Key for server apps (with IP locking)' key, but I am still getting the error. – user3192649 Apr 13 '14 at 10:26
  • I will need specific information about your application to troubleshoot this issue. For obvious reasons, please do not post your AWS ID or application information here. If you have AWS Support, could you open a case with them? Else, you can send details via the [Amazon SNS forums](https://forums.aws.amazon.com/forum.jspa?forumID=72). – Rohan Deshpande Apr 15 '14 at 23:39