Skip to content

Instantly share code, notes, and snippets.

@lopspower
Last active September 16, 2019 13:15
Show Gist options
  • Save lopspower/b7259ba71a17ca29e0c6 to your computer and use it in GitHub Desktop.
Save lopspower/b7259ba71a17ca29e0c6 to your computer and use it in GitHub Desktop.
Test GCM Push

Test GCM Push

Twitter

URL

https://android.googleapis.com/gcm/send

Header

Authorization: key=YOUR_API_ACCESS_KEY
Content-Type: application/json

Payload (JSON)

{
  "registration_ids":["YOUR_DEVICE_IDS"],
  "data": {
    "key1" : "value",
    "key2" : "value"
  } 
}

Success Response (200) after POST

{
  "multicast_id": 0000000000000000000,
  "success": 1,
  "failure": 0,
  "canonical_ids": 0,
  "results": {
    "message_id": "0:0000000000000000%0000000000000000"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment