GCM HTTP错误401:未经授权 [英] GCM HTTP Error 401: Unauthorized

查看:938
本文介绍了GCM HTTP错误401:未经授权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经集成GCM也取得了其服务器端组件。每一件事情是工作的罚款,我能够从服务器发送推送通知到所有已注册客户端。我使用谷歌应用程序引擎作为我的服务器。

I have integrated GCM on client also made its Server side component. Every thing was working fine, I was able to send push notification from server to all the registered client. I am using google App engine as my server.

问题来了,当:


  1. 我改变了对服务器的API密钥。

    • 早些时候,我是用我的个人Gmail帐户获得的API密钥和其他所有访问通过我的帐户。只需按下应用现场之前,我搬到服务器生产帐户,也改变了ID作为每生产标识。根据ID我的意思是API密钥,项目编号,生产等密钥存储库现在的问题是,当我想服务器上发送推送通知我越来越URL例外HTTP错误401:未经授权

我试着这样做:
   - 删除我的大标识。
   - 删除旧公共API访问键

I tried doing: - Deleting my older Ids. - Deleting Old Public API access keys.

在同一code。如果我试图从我的旧服务器发送推送通知工作正常。

The same code works fine if I try to send Push notification from my old Server.

它是否有东西做:项目包名和API密钥...这被注册一次只能用于....如果是如何删除不改变客户端项目包的名称。

Does it has something to do with : Project package name and API key... which gets registered once can only be used....If yes How to delete that without changing the client project package name.

请帮我们不能用旧服务器的现场走了。

Please help we cannot go live with Old Server.

推荐答案

这个问题可以东阳您正在使用新的服务器的旧服务器API密钥也是如此。从服务器端发送推送通知,您需要使用服务器的公网IP​​地址的帮助下生成的API密钥。

The issue can be beacause you are using the old server api key for the new server as well. For sending the push notification from server side, you need the api key generated with the help of server's public IP address.

这篇关于GCM HTTP错误401:未经授权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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