简体   繁体   English

GCM有时会返回401未经授权

[英]GCM sometimes return 401 Unauthorized

I connected GCM service a few weeks ago and it worked fine till todays launch time. 几周前,我连接了GCM服务,直到今天的发布时间,它都可以正常工作。 Unfoternately, after launch 7.01 GCM returned to me 'Client error: POST https://gcm-http.googleapis.com/gcm/send with 401 Unauthorized response' and nothing helps to solve this issue. 毫无疑问,启动7.01后,GCM向我返回了“客户端错误: POST https://gcm-http.googleapis.com/gcm/send with 401 Unauthorized response”,没有任何帮助解决此问题。 All I found, when I remove everything from 'Accept requests from these server IP addresses' in API key credentials, GCM began work, but sometimes it returns 401 status again. 我发现,当我从API密钥凭据中的“从这些服务器IP地址接受请求”中删除所有内容时,GCM开始工作,但有时它又返回401状态。 What happened? 发生了什么? This situation confused me. 这种情况使我感到困惑。

You can try the following: 您可以尝试以下方法:

  1. Go to the project console 转到项目控制台
  2. Click your project 点击你的项目
  3. Go to APIs & auth in the left panel 转到左侧面板中的API和身份验证
  4. Select APIs in the sub-menu 在子菜单中选择API
  5. Search Google Cloud Messaging for Android (or/and Chrome) and turn it on 搜索适用于Android(或/和Chrome)的Google Cloud Messaging,然后将其打开

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

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