添加谷歌GCM API密钥的Azure通知集线器错误 [英] Adding Google GCM Api Key Azure Notification Hub Error
问题描述
我们正在努力为我们GCM API密钥添加到蔚蓝的通知中心,我们收到以下错误:
子code = 40000。无法验证与GCM凭据。错误是远程服务器返回错误:(401)未经授权... TrackingId:410c0e33-0c38-1823-8a62-2519627c76a2_M1_G19,时间戳:2014年9月19日上午10时08分32秒。
我们已经设置了GCM API密钥允许任何IP地址,我们也试图从code注册像下面,但具有相同的错误:
NamespaceManager经理= NamespaceManager.CreateFromConnectionString(康涅狄格州);
变种毂= mgr.GetNotificationHub(&所述; hubname>中);
hub.GcmCredential =新GcmCredential(< apikey>);
mgr.UpdateNotificationHub(集线器);
我们是否失去了一些东西很明显这里?
子code = 40000。无法验证与GCM凭据。
这可能会修复这个错误:
在服务
API控制台为谷歌开发者标签:
- 启用 Android版 谷歌云消息
We are trying to add our GCM API key to the azure notification hub and we are receiving the following error:
SubCode=40000. Failed to validate credentials with GCM. Error is The remote server returned an error: (401) Unauthorized...TrackingId:410c0e33-0c38-1823-8a62-2519627c76a2_M1_G19,TimeStamp:9/19/2014 10:08:32 AM
We have setup our GCM API key to allow any IP address and we have also tried registering from code like below but with the same error:
NamespaceManager mgr = NamespaceManager.CreateFromConnectionString(conn);
var hub = mgr.GetNotificationHub("<hubname>");
hub.GcmCredential = new GcmCredential("<apikey>");
mgr.UpdateNotificationHub(hub);
Are we missing something quite obvious here?
SubCode=40000. Failed to validate credentials with GCM.
This will probably fix this error:
Under the SERVICES
tab in the APIs console for Google devs:
- enable Google cloud messaging for android
这篇关于添加谷歌GCM API密钥的Azure通知集线器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!