GCM发件人ID /项目编号 [英] GCM sender id / project number
问题描述
服务器和浏览器API密钥可以更改,但不能显示SENDER ID,PROJECT NUMBER ...
发件人编号$ <编号> c $ c>以及GCM)受保护;否则任何人都可以使用它,它会计入您的 API的使用。它类似于任何其他服务的API密钥,例如Google地图。
除了创建新的Google帐户之外,我不知道有任何方法可以进行更改,但在Google API控制台的信息中心有一个选项可用于注册/生成一个项目ID
,但我不确定GCM是否会接受发件人ID
。您可以尝试一下。
编辑:
可能不是如果您的项目编号
公开(在旧的API中发件人编号是您的电子邮件),这会很危险,因为您仍然需要 API密钥
可以通过GCM发送通知
to send a GCM, we have a SENDER ID from Google API console, is that important to keep that SENDER ID protected? I mean, would someone be able to do bad things if they know that ID? I did a mistake and I think that ID was in one of my projects... am I able to somehow change it? I couldn't find anyway to change it by looking at the Google API console!. should I be worried about that? or is it ok?
the server and browser API keys can be changed but not the SENDER ID, PROJECT NUMBER...
解决方案 Yes you should keep the project number
(which is the Sender Id
as well for GCM) protected; otherwise anyone can use it and it will count toward your usage of the API. It is similar to the API key for any other service e.g. Google Maps.
I am not aware of any method to change it other than create a new Google account, but in the Dashboard of Google API console there is an option to register/generate a Project ID
but I am not sure if GCM will accept this as Sender Id
. You can give it a try.
Edit:
It might not be that dangerous if your project number
is exposed (in the old APIs the sender id was your e-mail) , because still you will need API key
to be able to send notification via GCM
这篇关于GCM发件人ID /项目编号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!