【发布时间】:2017-01-20 14:01:54
【问题描述】:
我正在使用 firebase(ver.9.4.0) 开发 Android 应用。
当我使用如下所示的令牌发送 FCM 通知时,只有部分设备无法收到通知。
curl --header "Authorization: key=AIzaXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
--header Content-Type:"application/json" \
https://fcm.googleapis.com/fcm/send \
-d "{ \"data\": {\"url\":\"http://XXXXXXXXXXXXXXXXX\",\"type\":\"0\"}, \"priority\":\"high\",\"notification\": {\"body\": \"title\"}, \"registration_ids\":[\"APA91bXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"]}"
错误信息:
{"multicast_id":5831565775247505735,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"MismatchSenderId"}]}
无法发送的令牌从APA91b开始。
可以发送的令牌从XXXXXXXXXXX:APA91b开始。
【问题讨论】:
-
出错的可能原因是described here。
标签: android curl firebase firebase-cloud-messaging