Closed bvakiti closed 7 years ago
the curl command needs to have the double quotes escaped OR use use single quotes, like this:
curl --header "Authorization: key=AIzaSyBjxxxxxx" --header "Content-Type: application/json" https://android.googleapis.com/gcm/send -d '{"registration_ids":["xxxx"]}'
I have couple of questions
is it necessary to create sample Project name in Firebase or just sender_id match would help?
After opening my project in chrome web server, I used the curl cmd to send the notification curl --header "Authorization: key=AIzaSyBjxxxxxx" --header "Content-Type: application/json" https://android.googleapis.com/gcm/send -d "{\"registration_ids\":[\"xxxx\"]}"
This throws error {"multicast_id":7720103039622715939,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"InvalidRegistration"}]}
I have tried all the possibilites. How to resolve this
Is there any other way to write code for sending push notifications other than curl ?