Skip to content

Instantly share code, notes, and snippets.

@vineethvijayan
Last active June 23, 2020 21:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save vineethvijayan/c456c96a4aecb8885400976c6ae99392 to your computer and use it in GitHub Desktop.
Save vineethvijayan/c456c96a4aecb8885400976c6ae99392 to your computer and use it in GitHub Desktop.
Firebase PN using curl command
https://android.jlelse.eu/firebase-push-notification-using-curl-command-devoid-backend-e63795d282c4
https://firebase.google.com/docs/cloud-messaging/http-server-ref
curl -X POST --header "Authorization: key=<SERVER KEY>" \
--Header "Content-Type: application/json" \
https://fcm.googleapis.com/fcm/send \
-d "{\"to\":\"<FCM TOKEN>\",\"notification\":{\"body\":\"ENTER YOUR MESSAGE HERE\"}}"
curl -X POST --header "Authorization: key=<Server key>" \
--Header "Content-Type: application/json" \
https://fcm.googleapis.com/fcm/send \
-d "{\"to\":\"<FCM TOKEN/TOPICS>\",\"content_available\":true,\"priority\":\"high\",\"data\":{\"key1\":\"value1\"}}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment