Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid registration error while executing the curl cmd #16

Closed
bvakiti opened this issue Oct 31, 2016 · 1 comment
Closed

Invalid registration error while executing the curl cmd #16

bvakiti opened this issue Oct 31, 2016 · 1 comment

Comments

@bvakiti
Copy link

bvakiti commented Oct 31, 2016

I have couple of questions

  1. is it necessary to create sample Project name in Firebase or just sender_id match would help?

  2. 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 ?

@gauntface
Copy link
Contributor

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"]}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants