<small id='TsZfZ'></small><noframes id='TsZfZ'>

      <i id='TsZfZ'><tr id='TsZfZ'><dt id='TsZfZ'><q id='TsZfZ'><span id='TsZfZ'><b id='TsZfZ'><form id='TsZfZ'><ins id='TsZfZ'></ins><ul id='TsZfZ'></ul><sub id='TsZfZ'></sub></form><legend id='TsZfZ'></legend><bdo id='TsZfZ'><pre id='TsZfZ'><center id='TsZfZ'></center></pre></bdo></b><th id='TsZfZ'></th></span></q></dt></tr></i><div id='TsZfZ'><tfoot id='TsZfZ'></tfoot><dl id='TsZfZ'><fieldset id='TsZfZ'></fieldset></dl></div>

    1. <tfoot id='TsZfZ'></tfoot>
      <legend id='TsZfZ'><style id='TsZfZ'><dir id='TsZfZ'><q id='TsZfZ'></q></dir></style></legend>

          <bdo id='TsZfZ'></bdo><ul id='TsZfZ'></ul>

        Firebase 云消息传递 API 密钥

        时间:2023-07-29

            <tbody id='VLalw'></tbody>
          • <i id='VLalw'><tr id='VLalw'><dt id='VLalw'><q id='VLalw'><span id='VLalw'><b id='VLalw'><form id='VLalw'><ins id='VLalw'></ins><ul id='VLalw'></ul><sub id='VLalw'></sub></form><legend id='VLalw'></legend><bdo id='VLalw'><pre id='VLalw'><center id='VLalw'></center></pre></bdo></b><th id='VLalw'></th></span></q></dt></tr></i><div id='VLalw'><tfoot id='VLalw'></tfoot><dl id='VLalw'><fieldset id='VLalw'></fieldset></dl></div>

              <bdo id='VLalw'></bdo><ul id='VLalw'></ul>
              <tfoot id='VLalw'></tfoot>
                <legend id='VLalw'><style id='VLalw'><dir id='VLalw'><q id='VLalw'></q></dir></style></legend>
              1. <small id='VLalw'></small><noframes id='VLalw'>

                • 本文介绍了Firebase 云消息传递 API 密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  有什么方法可以在 Firebase 控制台中为 FCM(云消息部分)重新生成 API 密钥?该密钥不可编辑,并且与 Google API 控制台中自动生成的密钥不同.由于这种错误配置,我总是从 FCM 收到 unauthorized 401...

                  解决方案

                  更新:即使在 FCM Token 可见的 Cloud Messaging Tab 的新 UI 中,Regenerate Key<如果服务器密钥被删除,/kbd> 按钮仍然可见.


                  更新:现在似乎可以通过 Firebase 控制台重新生成服务器密钥,但是,标签/按钮(见屏幕截图)仅在没有使用服务器密钥时显示.

                  点击Regenerate Key后,会生成一个新的Server Key,在Google Developers Console中也可以看到.


                  仍然无法从 Firebase 控制台重新生成 API 密钥.但是,我能够通过开发者控制台重新生成它.

                  在与@SarthakMishra 讨论后,我再次浏览了控制台,并且能够真正重新生成在 Firebase 控制台中找到的 API 密钥.

                  首先,我将提供有关获取实际查看当前服务器密钥的部分的步骤.

                  1. 通过右上角选择您的项目.
                  2. 然后在左侧面板上,点击齿轮按钮并选择项目设置.
                  3. 然后转到云消息标签

                  从那里,您将能够看到服务器密钥和发件人 ID.


                  以下是重新生成服务器密钥的步骤.转到您的开发者控制台.

                  1. 在右上角,选择与您的 Firebase 项目对应的项目名称.
                  2. 在左侧面板上,点击 Credentials .

                  之后,您将能够看到当前可用于该项目的 API 密钥.通常,您会看到两个 API 密钥.一个 Server Key 和一个 Android Key,旁边有一个标签,上面写着(由 Google 服务自动创建).单击服务器密钥.

                  1. 点击重新生成密钥.应该会出现这样的提示:

                  <块引用>

                  您想用新的密钥替换当前密钥吗?

                  新密钥将立即可用.当前密钥将在 24 小时后永久停用.

                  1. 点击替换键.

                  之后,您将看到生成的新服务器密钥.返回到可以看到服务器密钥和发件人 ID 的页面并刷新它.它应该与生成的新服务器密钥匹配.

                  Any way to regenerate the API Key for FCM (Cloud Messaging section) in Firebase Console? The key is not editable and is different from the one automatically generated in Google APIs Console. Due to this misconfiguration I'm always getting unauthorized 401 from FCM...

                  解决方案

                  Update: Even with the new UI of the Cloud Messaging Tab where the FCM Token is visible, the Regenerate Key button would still be visible if the Server Key was deleted.


                  Update: It seems it is now possible to regenerate the Server Key via the Firebase Console, however, the label/button (see screenshot) only shows up when there is no Server Key being used.

                  After clicking on Regenerate Key, it will generate a new Server Key which is also visible in the Google Developers Console.


                  Still no way to re-generate the API Key from Firebase Console. HOWEVER, I was able to re-generate it via the Developer Console.

                  I went through the consoles again after having a discussion with @SarthakMishra and was able to actually re-generate the API Key found in the Firebase Console.

                  First, I'll provide the steps on getting to the part where to actually see the current Server Key.

                  1. Select your project via the top-rightmost side.
                  2. Then on left-side panel, click on the gear button and select Project Settings.
                  3. Then go to the Cloud-Messaging Tab

                  From there, you will be able to see the Server Key and the Sender ID.


                  Here are the steps to re-generate the Server Key. Go to your Developer Console.

                  1. On the top-rightmost side, select the project name that corresponds to your Firebase Project.
                  2. On the left-side panel, click on Credentials .

                  After that, you will be able to see the API Keys currently available for the project. Commonly, you will see two API Keys. One Server Key and one Android Key, where it has a label beside it saying (auto created by Google Service). Click on the Server Key.

                  1. Click on Regenerate Key . A prompt like this should show up:

                  Do you want to replace the current key with a new one?

                  The new key will be available immediately. The current key will be deactivated permanently in 24 hours.

                  1. Click on Replace key .

                  After that, you will see the new Server Key generated. Go back to the page where you can see the Server Key and Sender ID and refresh it. It should match the new Server Key generated.

                  这篇关于Firebase 云消息传递 API 密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:适用于 iOS 的 FCM 丰富推送通知负载 下一篇:应用程序在后台时未收到 Firebase 云消息

                  相关文章

                • <i id='0YPSc'><tr id='0YPSc'><dt id='0YPSc'><q id='0YPSc'><span id='0YPSc'><b id='0YPSc'><form id='0YPSc'><ins id='0YPSc'></ins><ul id='0YPSc'></ul><sub id='0YPSc'></sub></form><legend id='0YPSc'></legend><bdo id='0YPSc'><pre id='0YPSc'><center id='0YPSc'></center></pre></bdo></b><th id='0YPSc'></th></span></q></dt></tr></i><div id='0YPSc'><tfoot id='0YPSc'></tfoot><dl id='0YPSc'><fieldset id='0YPSc'></fieldset></dl></div>

                  <legend id='0YPSc'><style id='0YPSc'><dir id='0YPSc'><q id='0YPSc'></q></dir></style></legend>
                • <tfoot id='0YPSc'></tfoot>
                        <bdo id='0YPSc'></bdo><ul id='0YPSc'></ul>

                      <small id='0YPSc'></small><noframes id='0YPSc'>