使用Firebase Cloud Messaging发送通知时出现身份验证错误

3
当我使用PostMan向https://fcm.googleapis.com/fcm/send发送请求时,使用以下内容:
{
"data": {
    "notification": {
        "title": "notification.newcomment.title",
        "body": "notification.newcomment.body",
        "click_action": "/video/a2df5da5-a0d8-4a27-1588-08d64fb9bf88",
        "icon": "null"
    }
},
"to": "xxxxx"
}

我从Firebase收到了以下响应:
{
"multicast_id": 6589525169180682671,
"success": 0,
"failure": 1,
"canonical_ids": 0,
"results": [
    {
        "error": "AuthenticationError"
    }
]}

我不明白认证错误的问题出在哪里。

你有什么问题? - Dragonthoughts
如何解决AuthenticationError并发送Firebase通知。 - AndreaC
请编辑问题以显示您正在使用的所有相关代码来发送消息。您可能在那里做错了什么。 - Doug Stevenson
我正在使用Postman发送请求。 - AndreaC
1个回答

1

现在它可以工作了。我认为这是 Firebase 的问题,因为我没有改变请求中的任何内容。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接