firebase云消息传递(FCM)API键用于Azure Notification Hub
我正在创建一个Xamarin项目来测试Azure Notification Hub,但是我很难通过本文
在“ ”下“创建firebase项目并启用Firebase Cloud Messaging ”。 步骤6 已经过时了,因为Google似乎已更改了其模型以获取服务器密钥,否则服务器密钥不适用于FCM。
谁能阐明如何获得Azure Notification Hub 的 API键?
I'm creating a Xamarin project to test Azure Notification Hub, but I'm having trouble going through the steps in this article
Under the section "Create a Firebase project and enable Firebase Cloud Messaging"
Step 6 is obsolete as Google seems to have changed their model to obtain a Server Key, or the Server Key does not apply to FCM.
Can anyone shed a light on how to obtain an Api key for Azure Notification Hub?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
从
https://console.firebase.google.com/projecn/-- your_project_name--/
expanding DrDave's comment
From
https://console.firebase.google.com/project/--your_project_name--/settings/cloudmessaging
Warning:
This whole approach stops working in June 2024 and we depend on the NotificationsHub team to address this, as per https://github.com/MicrosoftDocs/azure-docs/issues/93522#issuecomment-1600272887
如果转到“构建”部分,身份验证菜单项,然后单击“启动”按钮,然后导航返回项目设置/常规选项卡,则应看到API键。
编辑:这不是Azure Notification Hub的合适键。请参阅下面的评论以获取正确的键。
If you go to the Build section, Authentication menu item, and then click the 'Get Started' button, then navigate back to the Project Settings/General tab, you should see the API key.
EDIT: This is not the proper key for the Azure Notification Hub. See my comment below for the correct key.
目前似乎没有适当的答案。
使用FCM时,如果您进入firebase Console上的“身份验证”页面的应用程序,然后选择“启动”,请按照这些步骤进行操作,然后返回您的项目设置页面中的“常规”选项卡,您将立即看到它具有Web API键。
这对于Azure Notification Hubs并不有用,就好像您尝试将此密钥插入集线器的API密钥条目一样,它不会接受。
唯一的答案似乎是使用传统GCM API,这并不理想,因为它已被弃用并且某些API不再可用。
There currently does not seem to be a proper answer to this.
When using FCM, if you head to the Authentication page on the Firebase Console for your app and select 'Get Started', follow the steps and then head back to the 'General' tab in your project settings page, you will see that it now has a Web API key.
This isn't useful for Azure Notification Hubs as if you try insert this key into the API key entry for a hub, it will not accept it.
The only answer seems to be to use the legacy GCM API, which is not ideal as it has been deprecated and certain APIs are no longer available.