Skip to content

Instantly share code, notes, and snippets.

@roman-mazur
Created May 6, 2014 06:27
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 roman-mazur/e700f045b169ce734a4d to your computer and use it in GitHub Desktop.
Save roman-mazur/e700f045b169ce734a4d to your computer and use it in GitHub Desktop.
Push a message to GCM.
# Usage: gcm-push.sh <api-key> <json-file>
curl -H "Authorization:key=$1" -H "Content-Type:application/json" --data @$2 -X POST https://android.googleapis.com/gcm/send
@roman-mazur
Copy link
Author

JSON file structure:

{
  "registration_ids" : ["<id1>", "<id2>"],
  "data" : {
    ...
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment