I am using curl to send push notifications using GCM. Here it is as follows:
curl --header 'Authorization: key=myAPiKey' --header 'Content-Type: application/json' https://android.googleapis.com/gcm/send -d '{"registration_ids":["registration_ids"], "collapse_key": "Turn", "data": { "title": "fdsfdsfsdfd","body": "fdsf dsf sd fsd fds fds fds", "badge": "1" , "content_available": 1 ,"url": "#/app/home"} }'
In reposnse I am getting as :
{"multicast_id":7729772425353298779,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"NotRegistered"}]}
I am not getting registration_ids that are not registered. How Can I do this. I want this in curl only as i am using ruby 1.8.6 application.
Please help me on this