Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save iamkingalvarado/1d216ca6d6e896853f0341729aedc794 to your computer and use it in GitHub Desktop.
Save iamkingalvarado/1d216ca6d6e896853f0341729aedc794 to your computer and use it in GitHub Desktop.
Simple curl to send a notification to firebase with a deviceID.
curl -d '{
"to": DEVICE_ID,
"notification": {
"title" : " This is my title new ",
"body" : " This is the body of my message "
}
}' \
-i -H "Application/json" \
-H "Content-type: application/json" \
-H "Authorization: key=YOUR_AUTH_KEY \
-X POST https://fcm.googleapis.com/fcm/send
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment