I want to send mobile push notifications to GCM via AWS SNS. And as per the documentation, one may include either a "notification" payload or a "data" payload. And if we send a notification payload, then GCM will take care of showing the notification on the end-user device for you.
Using AWS SNS Console, I tried sending a notification-only payload but got the below error:
Invalid parameter: Message Reason: Invalid notification for protocol GCM: data key is expected in the json message (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter)
I'm sending:
{
"GCM":"{\"notification\":{\"title\":\"Test Message\"}}"
}
Can anyone help me out?