我试图使用Postman使用Firebase
云消息传递服务发送单个推送通知。使用Firebase消息传递通过邮递推送
这是一个工作cURL
命令为相同的目的,我用它作为参考。
curl -X POST --header "Authorization: key=<API_ACCESS_KEY>" --Header "Content-Type: application/json" https://fcm.googleapis.com/fcm/send -d "{\"to\":\"<YOUR_DEVICE_ID_TOKEN>\",\"notification\":{\"body\":\"Firebase\"} \"priority":\"10"}"
我迄今所做..
1 - 设置头适当
2-在身体,我使用raw
{
"to" : "<YOUR_DEVICE_ID_TOKEN>"
,
"notification": {
"body": "Firebase Cloud Message"
}
}
执行时,我回到401 - Unauthorized
。
什么是缺少正确发送推送通知?
{ “multicast_id”:4790719999662534961, “成功”:0, “失败”:1, “canonical_ids”:0, “结果”:[ { “错误”: “InvalidRegistration” } ] }得到这个错误 –