GCM API密钥限制 [英] GCM API Key restriction

查看:164
本文介绍了GCM API密钥限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用离子云发送推送通知,但Google现在需要一个限制密钥。我不知道如何获得关键限制。请帮助我。

I try to send a push notification using ionic cloud, but Google now requires a restriction key . I don't know how to get key restriction. Please help me.

推荐答案

更新:现在 GCM文档说:

Update: There is now a visible note in the GCM docs saying:


从2016年9月起,新的服务器密钥只能是通过设置面板的云消息传递标签在Firebase控制台中创建。需要创建新服务器密钥的现有项目可以在 Firebase控制台中导入,而不会影响其现有的配置。

Starting from Sept. 2016 new server key can only be created in the Firebase Console using the Cloud Messaging tab of the Settings panel. Existing projects that need to create a new server key can be imported in the Firebase console without affecting their existing configuration.






最近Google Developers Console界面发生了一些变化生成一个API密钥。之前曾经是你必须选择它的类型的部分(服务器,Android,iOS,浏览器键)。但现在,它会自动创建,然后您可以简单地选择您想要的限制类型,具体取决于您要使用该键的位置。


There have been recent changes with regards to the Google Developers Console interface when generating an API Key. Before there used to be a part where you have to select what type it is (Server, Android, iOS, Browser keys). But now, it automatically creates then you can simply select the type of restriction you want, depending on where you'll use the key.

我还没有尝试过使用Ionic之前,但我认为在使用API​​密钥的地方(在这种情况下,服务器密钥)几乎相同。只需在IP地址白名单中设置正确的服务器IP地址,然后重试即可。

I haven't tried using Ionic before, but I think it's pretty much the same where you'll use the API key (in this case, the Server Key). Simply set the correct server IP Address in the IP address whitelist and try again.

切记,强烈建议添加限制以防止未经授权的使用和配额盗窃(作为API密钥的警告,没有任何限制)。

Do keep in mind that adding restrictions are highly encouraged for your security against unauthorized use and quota theft (seen as a warning for API keys with no restrictions).

查看我的回答这里了解更多详情。

See my answer here for more details.

这篇关于GCM API密钥限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆