我正在尝试向Android应用程序发送推送通知,但我总是收到错误说" InvalidRegistration",我尝试在stackoverflow上发布了很多解决方案并搜索了这么多但没有进展!
这是我使用的curl命令:
$ curl -H "Content-type: application/json" -H "Authorization:key=<SERVER KEY>" -X POST -d '{ "data": { "score": "5x1","time": "15:10"}, "to" : "<APP KEY>"}' https://fcm.googleapis.com/fcm/send
以及回复:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 216 0 122 100 94 122 94 0:00:01 --:--:-- 0:00:01 445{"multicast_id":7321962376365265310,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]}