click here to check postman request
While migrating GCM to FCM I was using aps parameter in request body of GCM request body but when trying same for FCM its showing InvalidParameters.
Url: https://fcm.googleapis.com/fcm/send
Request:
{
"notification": {
"title": "notification title",
"body": "message body changed 11"
},
"data": {
"mt": "re",
"offerid": "10562",
"aps":{"badge":0,"alert":"gauravtest,$20 OFF COUPON","sound":"null.caf"},
"clpnid": "xxx",
"custid": "xxx",
"eoid": "0",
"pc": "171-2802-8180",
"ed": "11/08/2017",
"ag": "",
"url": "",
"previewimage": ""
},
"to": "xxxx"
}
Response:
{
"multicast_id": 6282546760147817634,
"success": 0,
"failure": 1,
"canonical_ids": 0,
"results": [
{
"error": "InvalidParameters"
}
]
}