【发布时间】:2017-07-03 18:11:38
【问题描述】:
我想在登录时向特定用户发送通知,我使用 Firebase 消息传递,我可以通过控制台发送通知,但我想通过使用 send to topic 和 http 请求以 Swift 代码发送此通知。当我在邮递员中运行代码时,我无法实现发送通知的 http 请求我有这个错误:
请求缺少验证密钥(FCM 令牌)。请, 请参阅 FCM 文档的“认证”部分,位于 https://firebase.google.com/docs/cloud-messaging/server.
错误 401
【问题讨论】:
-
错误提示您缺少 FCM 令牌。 stackoverflow.com/questions/37787373/…
-
我想要这个在 ios 而不是 android 中!
-
您能否提供您的请求代码,以便我们查看可能缺少的内容?
-
{ "condition": "'mahdi' in topic", "priority" : "high", "notification" : { "body" : "这是 Firebase 云消息传递主题消息!", "title" : "FCM 消息" } }
-
您需要将服务器密钥传递给 Postman。请参阅此列表中的stackoverflow.com/questions/39133832/… 和其他答案:stackoverflow.com/…
标签: ios swift firebase push-notification firebase-cloud-messaging