GCM API Key confusion

和自甴很熟 提交于 2019-12-12 03:34:06

问题


I want to use GCM for my project and so i create a project at google console and wanted to add an api key. Now i have different options:

  1. Server Key
  2. Browser Key
  3. Android Key
  4. iOS Key

What i actually want to do is sending GCM Messages from my Apache Server using PHP to my Android devices. So which kind of key do i need now? The Server Key? The Browser Key or the Android Key?

I know that all i need at my Android Client side is the SENDER_ID which is the id of my project. I just need the API key serverside.


回答1:


You need the Server Key. Using it you can send push notifications to Android Devices using cURL in PHP.




回答2:


Check official web site: Setting up API keys



来源:https://stackoverflow.com/questions/36236376/gcm-api-key-confusion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!