JSON Push Notification with XHR.send
Hi guys,
I'm trying to send push notifications through server code but I'm getting a 400 response. Could someone please take a look at the code below. Thanks!
code
var pushApiKey = "6b32xxxxxxxxxxxxxxxxxxxxx95f5a"
Code: Select all
var XHRResponse = XHR.send("POST", "https://api.appery.io/rest/push/msg", {
"status": "sent",
"headers": {
"X-Appery-Push-API-Key": pushApiKey,
"Content-Type": "application/json"
},
"payload": {
"message": "Hello World",
},
"filter": {
"deviceID": deviceID
}
});
/code