Send a message using GCM HTTP connection server protocol:
https://gcm-http.googleapis.com/gcm/send
Content-Type:application/json
Authorization:key=AIzaSyZ-1u...0GBYzPu7Udno5aA
{
"to": "/topics/foo-bar",
"data": {
"message": "This is a GCM Topic Message!",
}
}
To do this in Postman, you simply have to set the following (some details are as what is mentioned above):
POST
Screenshots:
Notice that the request was a success with the message_id
in the response.
PS: I'm keeping the sample Server Key visible so that others can still try it out even if they haven't created a Project yet. BUT, note that the Server Key must be always kept secret.