quickstart-unity icon indicating copy to clipboard operation
quickstart-unity copied to clipboard

Update readme.md under messaging quickstart with new FCM REST API

Open leandersonralves opened this issue 4 years ago • 2 comments

Please, update link to send a push notification from command line curl.

not working: https://android.googleapis.com/gcm/send

working: https://fcm.googleapis.com/fcm/send

leandersonralves avatar Feb 02 '21 19:02 leandersonralves

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Feb 02 '21 19:02 google-oss-bot

This bug report is for the file messaging/testapp/readme.md. Two samples there are:

curl --header "Authorization: key=<Server Key>" --header "Content-Type: application/json" https://android.googleapis.com/gcm/send -d '{"notification":{"title":"Hi","body":"Hello from the Cloud"},"data":{"score":"lots"},"to":"<Registration Token>"}'

and

curl --header "Authorization: key=<Server Key>" --header "Content-Type: application/json" https://android.googleapis.com/gcm/send -d '{"notification":{"title":"Hi","body":"Hello from the Cloud"},"data":{"score":"lots"},"to":"/topics/<Topic>"}'

It appears that they should be:

curl --header "Authorization: key=<Server Key>" --header "Content-Type: application/json" https://fcm.googleapis.com/fcm/send -d '{"notification":{"title":"Hi","body":"Hello from the Cloud"},"data":{"score":"lots"},"to":"<Registration Token>"}'

and

curl --header "Authorization: key=<Server Key>" --header "Content-Type: application/json" https://fcm.googleapis.com/fcm/send -d '{"notification":{"title":"Hi","body":"Hello from the Cloud"},"data":{"score":"lots"},"to":"/topics/<Topic>"}'

Which would match the reference docs for the Legacy HTTP Server Protocol.

We may want to take this a step forward and see if we can use the test interface here.

patm1987 avatar Feb 05 '21 22:02 patm1987