Skip to content

Instantly share code, notes, and snippets.

@nkmrh
Created March 5, 2018 00:50
Show Gist options
  • Save nkmrh/9f76f8f708a501ca19c98220a5b99d21 to your computer and use it in GitHub Desktop.
Save nkmrh/9f76f8f708a501ca19c98220a5b99d21 to your computer and use it in GitHub Desktop.
FCM with curl
curl -X POST --header "Authorization: key={SERVER_KEY}" \
--Header "Content-Type: application/json" \
https://fcm.googleapis.com/fcm/send \
-d @- << EOF
{
"to": "{DEVICE_TOKEN}",
"data": {
"videoURL": "{URL}"
},
"notification": {
"body": "{MESSAGE}"
},
"priority":10,
"mutable_content":true
}
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment