Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmealo/c42be47482470d975656153f0d37ab18 to your computer and use it in GitHub Desktop.
Save jmealo/c42be47482470d975656153f0d37ab18 to your computer and use it in GitHub Desktop.
Curl command for sending FCM message
curl -i -H 'Content-type: application/json' -H 'Authorization: key=<your_server_key>' -XPOST https://fcm.googleapis.com/fcm/send -d '{
"registration_ids":["registration_ids", "of the", "target", "devices as array"],
"notification": {
"title":"Title of your notification",
"body":"content of your notification"
},
"data": {
"key1" : "value1",
"key2" : "value2",
"key3" : 23.56565,
"key4" : true
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment