Skip to content

Instantly share code, notes, and snippets.

@secondsun

secondsun/GCM.sh Secret

Last active July 27, 2016 20:06
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 secondsun/f659a34a43dd41c2a6509f2e5733f23f to your computer and use it in GitHub Desktop.
Save secondsun/f659a34a43dd41c2a6509f2e5733f23f to your computer and use it in GitHub Desktop.
export DEVICE_ID=//registration ID on device
export SERVER_KEY=//Google server Key
curl --header "Authorization: key=$SERVER_KEY" \
--header Content-Type:"application/json" \
-d '{"registration_ids":["'$DEVICE_ID'"],"data":{"alert": "áéíóúç"}}' \
https://gcm-http.googleapis.com/gcm/send
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment