firebase云消息传递(FCM)API键用于Azure Notification Hub

发布于 2025-02-05 04:46:06 字数 448 浏览 3 评论 0原文

我正在创建一个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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

情绪失控 2025-02-12 04:46:06

https://console.firebase.google.com/projecn/-- your_project_name--/

  • settings/cloudmessaging “ 云消息API(遗产)

expanding DrDave's comment

From https://console.firebase.google.com/project/--your_project_name--/settings/cloudmessaging

  • Click on the three-dots menu of the "Cloud Messaging API (Legacy) ???? Disabled" Heading
  • Follow the offered link to manage in google cloud console, and there press the button to enable the googlecloudmessaging API
  • Wait a few minutes
  • Go back to your Firebase console Cloud Messaging Tab, and refresh.
  • See that the Cloud Messaging API header has changed to "Cloud Messaging API (Legacy) ✅ Enabled" and that a Server Key is now shown.

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

青巷忧颜 2025-02-12 04:46:06

如果转到“构建”部分,身份验证菜单项,然后单击“启动”按钮,然后导航返回项目设置/常规选项卡,则应看到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.

多情出卖 2025-02-12 04:46:06

目前似乎没有适当的答案。

使用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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文