gpt4 book ai didi

ruby-on-rails - 该请求缺少身份验证 key FCM token

转载 作者:数据小太阳 更新时间:2023-10-29 06:59:34 24 4
gpt4 key购买 nike

我正在尝试使用 postman firebase url 进行访问,但它给了我错误。我已经设置了所有的东西,但它仍然给我错误

这是我在 postman 上遇到的错误

<HTML>
<HEAD>
<TITLE>The request was missing an Authentification Key (FCM Token). Please, refer to section &quot;Authentification&quot; of the FCM documentation, at https://firebase.google.com/docs/cloud-messaging/server.</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>The request was missing an Authentification Key (FCM Token). Please, refer to section &quot;Authentification&quot; of the FCM documentation, at https://firebase.google.com/docs/cloud-messaging/server.</H1>
<H2>Error 401</H2>
</BODY>
</HTML>


These things I am adding <br/>
url = 'https://fcm.googleapis.com/fcm/send'<br/>
method = POST<br/>
Headers <br/>
Authorization = 'FIREBASE_SERVER_API_KEY'<br/>
Content-Type = application/json<br/>
Body =
"{"registration_ids":["ids"],"priority":"high\",\"data\":{\"notification_id\":76,\"title\":\"dvxcv\",\"description\":\"xcvxv\",\"image\":\"/uploads/image/image/37513/Screenshot_from_2016-10-17_10_43_59.png\"}}"

最佳答案

所有你首先需要在页眉中做的事情
授权:key='FIREBASE_SERVER_API_KEY'

而且你在解析 json 时遇到问题,你必须删除 '/'

{"registration_ids":["ids"],"priority":"high","data":{"notification_id":76,"title":"dvxcv","description":"xcvxv","image":"/uploads/image/image/37513/Screenshot_from_2016-10-17_10_43_59.png"}}

编辑如有任何困惑,请按照我的教程 how to integrate firebase with ruby on rails

关于ruby-on-rails - 该请求缺少身份验证 key FCM token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40738514/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com