After struggling with AWS Pinpoint's push notification configuration, I discovered that using keys "Body", "Data", and "Title" in the API request body did not work for me. However, when I passed the notification text in the "RawContent" key, the front-end application successfully received the notification. Here’s an example of how I structured the API request body:
{
"MessageConfiguration": {
"GCMMessage": {
"RawContent": "{\n \"collapse_key\":\"string\",\n\"priority\":\"string\",\n\"time_to_live\":1234,\n\"notification\": {\n\"title\":\"Hello\",\n\"body\":\"Hello from Pinpoint!\",\n \"android_channel_id\":\"string\",\n\"body_loc_args\":[\n\"string\"\n],\n\"body_loc_key\":\"string\",\n\"click_action\":\"string\",\n\"color\": \"string\",\n\"icon\":\"string\",\n\"sound\":\"string\",\n\"tag\":\"string\",\n\"title_loc_args\":[\n\"string\"\n],\n\"title_loc_key\":\"string\"\n},\n\"data\":{\n\"customKey\":\"customValue\"\n}\n}"
}
}
}
Using "RawContent" allowed me to directly pass the raw payload in the required format (e.g., JSON for APNS), and it worked perfectly. I hope this helps anyone facing a similar issue!