I'm encountering a problem with my Ionic application. I am trying to make use of the Rest API for send push notifications with Parse. I can use their push console to successfully send notifications.
However the following function throws error code 115 and a message saying "error: "Missing the push data." Please let me know if you need any other information for the issue.
Thank you.
$scope.send = function()
{
$http({
url: "https://api.parse.com/1/push",
method: "POST",
data: {
"alert": "Alert Message", //not platform specific
"badge": "1", //platform specific iOS
"sound": "", //platform specific iOS
"channels":["test"]
},
headers: {
"X-Parse-Application-Id": "removed",
"X-Parse-REST-API-Key": "removed",
"Content-Type": "application/json"
}
}).success(function (data, status, headers, config) {
console.log("Push sent!");
//alert('iOS registered success = ' + data + ' Status ' + status);
}).error(function (data, status, headers, config) {
console.log(config)
});
};