简体   繁体   English

使用Amazon Web Services(AWS)简单通知服务(SNS)设置Google Cloud Messenging(GCM)

[英]Setting up Google Cloud Messenging (GCM) with Amazon Web Services (AWS) Simple Notification Service (SNS)

I want to create an app on my sns and whenever I enter my app API details I get the following error 我想在我的sns上创建一个应用程序,每当我输入我的应用程序API详细信息时,我都会收到以下错误

The credentials you entered are invalid. Please enter valid credentials and try again.

I have done the following: 我做了以下事情:

Google Console -> Selected Project -> Selected APIs & Auth -> Selected Credentials -> Create new Key -> Browser key Google控制台 - >所选项目 - >所选API和身份验证 - >所选凭据 - >创建新密钥 - >浏览器密钥

Then entered the site in the information *mysite.systems/* 然后在信息*mysite.systems/*输入了网站

I then go to the Google Play Developer Console and do the following: Select Application-> Select Services & APIs -> Link a sender ID -> Enter API key from above. 然后,我转到Google Play开发者控制台并执行以下操作:选择应用程序 - >选择服务和API - >链接发件人ID - >从上面输入API密钥。 This is accepted 这是被接受的

I then for to my AWS console and in SNS do the following 然后,我进入我的AWS控制台和SNS,执行以下操作

Application Name: RandomName
Push Platform: Google Cloud Messenging (GCM)
API key: API key from before

This does not work and produces the above error. 这不起作用并产生上述错误。

I tried the same process except chose the public API key as a server key instead. 我尝试了相同的过程,除了选择公共API密钥作为服务器密钥。 The value I entered was 0.0.0.0/0. 我输入的值是0.0.0.0/0. as Google suggests as a test . 谷歌建议作为测试 This then worked fine. 然后这很好。 The problem is I can not use an IP address as I am using a Load balancer for my AWS account which does not have an IP so this is not possible. 问题是我无法使用IP地址,因为我使用的是我的AWS账户的负载均衡器,它没有IP,所以这是不可能的。

Also I have also followed this question and it did not work for me: Cannot create AWS-SNS GCM account, showing invalid credentials message 此外,我也遵循了这个问题,它对我不起作用: 无法创建AW​​S-SNS GCM帐户,显示无效的凭据消息

Thanks 谢谢

*EDIT A month later and I am still looking for a solution... *编辑一个月后,我仍在寻找解决方案......

*EDIT 2 A answer to this question has still not been provided and I have still not solved this issue *编辑2仍然没有提供这个问题的答案,我仍然没有解决这个问题

It was worked for me when I go for server key, but instead of 0.0.0.0 I left the textbox for IP is empty. 当我使用服务器密钥时,它对我0.0.0.0 ,但是我没有使用0.0.0.0而是留下IP的文本框是空的。 Good luck! 祝好运!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM