Azure通知中心不再接受GCM API密钥 [英] Azure Notification Hub no longer accepting GCM API Key

查看:314
本文介绍了Azure通知中心不再接受GCM API密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,每次我尝试在Azure通知中心添加或修改GCM API密钥时,都会收到以下错误消息:


子码= 40000。无法使用GCM验证凭据。远程
服务器返回了一个错误:(401)未授权...

我曾尝试使用相同的密钥在其他通知中心,以及通过Google开发者控制台创建一个新的。



我最近也遇到了一些文章,指出GCM正在转向FCM(Firebase云消息传递)。这可能是我的问题的原因吗?是否Google开始不再支持GCM?

解决方案

有两个重要信息:



所以我们应该更喜欢 Firebase控制台而不是 Google云端控制台




  • 这里有一篇有用的文章启用Google Cloud Messaging(Firebase) b $ b

    因此,我们需要在Firebase控制台中为您添加的Android应用启用Google Cloud Messaging。

    循序渐进:

    - 打开您的Firebase控制台

    - 在Firebase控制台中添加您的Android应用。



    - 转到设置



    - 点击 CLOUD MESSAGING

    Legacy Server key ,然后将其用于 Google的Azure推送通知服务)设置并保存。就这样。

    这篇文章可以帮助您如何在Azure中创建通知中心服务,然后如何将您的Android或IOS应用连接到Firebase控制台等。

    b $ b

    Recently, every time I try to add or modify the GCM API Key in an Azure Notification Hub, I get the following error:

    SubCode=40000. Failed to validate credentials with GCM. The remote server returned an error: (401) Unauthorized...

    I have tried using the same key that works in other Notification Hubs, as well as creating a new one via the Google Developer's console.

    I've also recently come across articles stating that GCM is moving to FCM (Firebase Cloud Messaging). Could this be the cause of my issue? Is Google beginning to no longer support GCM?

    解决方案

    There are two important informations:

    So we should prefer Firebase Console instead of Google Cloud Console,

    So we need to enable Google Cloud Messaging in Firebase Console for your added Android App.

    Step by step:

    -- Open your Firebase Console

    -- Add your Android app in Firebase Console.

    -- Go to Settings

    -- Click CLOUD MESSAGING tab.

    -- Take Legacy Server key there and use it in Azure Push Notification Service for Google(GCM) settings and Save it. That's all.

    This article helps you how to create a Notification Hub Service in Azure then how to connect your Android or IOS App to Firebase Console etc.

    这篇关于Azure通知中心不再接受GCM API密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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