1
pushwooshリモートAPIを使用して、パーズサーバー(クラウドコード)からプッシュ通知を送信します。私は彼らのGuidelines Hereに従うことを試みているが、私の要求文字列が不正であることを意味する要求のために400エラーコードが返ってくる。パーズクラウドコードからPushwooshリモートAPIを呼び出す
400 | N/A |不正な形式のリクエスト文字列のすべての(status codes hereから)
Parse.Cloud.afterSave("LinkPost", function(request, response) {
Parse.Cloud.httpRequest({
method: 'POST',
url: 'https://cp.pushwoosh.com/json/1.3/createMessage',
data: JSON.stringify({
"request": {
"application": "APPLICATION_ID",
"auth": "AUTH_TOKEN",
"notifications": [{
"send_date": "now",
"ignore_user_timezone": true,
"content": "Hello world!"
}]
}
}),
dataType: 'json'
}).then(function(httpResponse) {
console.log(httpResponse.text);
}, function(httpResponse) {
console.error('Request failed with response code ' + httpResponse.status);
});
});