Skip to content

Instantly share code, notes, and snippets.

@kennethlynne
Last active May 30, 2018 11:00
Show Gist options
  • Select an option

  • Save kennethlynne/022d297dc2a8e7134aa0ff03e541a07e to your computer and use it in GitHub Desktop.

Select an option

Save kennethlynne/022d297dc2a8e7134aa0ff03e541a07e to your computer and use it in GitHub Desktop.
Create push notifications through FCM from the command line with curl
curl --request POST \
--header 'Content-type: application/json' \
--header 'Authorization: key=<server key>' \
--data '
{
"to":"<receiver token>",
"notification": {
"title":"Title of your notification",
"body":"content of your notification"
},
"data": {}
}' \
https://fcm.googleapis.com/fcm/send
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment