You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check out this issue for an ideal bug report. The closer your issue report is to that one, the more likely we are to be able to help, and the more likely we will be to fix the issue quickly!
For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!
// request has 2 parameters: params passed by the client and the authorized user
var params = request.params;
var user = request.user;
// extract out the channel to send
var action = params.action;
var message = params.message;
var customData = params.customData;
// use to custom tweak whatever payload you wish to send
var pushQuery = new Parse.Query(Parse.Installation);
pushQuery.equalTo("deviceType", "android");
Check out this issue for an ideal bug report. The closer your issue report is to that one, the more likely we are to be able to help, and the more likely we will be to fix the issue quickly!
For implementation related questions or technical support, please refer to the Stack Overflow and Server Fault communities.
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!
Environment Setup
Steps to reproduce
Logs/Trace
curl -X POST -H "X-Parse-Application-Id: myqappid" -H"X-Parse-Master-Key:mymasterkey" -H "Content-Type: application/json" -d '{"action": "SEND_PUSH", "message": "hello", "customData": "My message"}' http://ipadress:1337/parse/functions/pushChannelTest
Cloud.js__)))_///////
Parse.Cloud.define('pushChannelTest', function(request, response) {
// request has 2 parameters: params passed by the client and the authorized user
var params = request.params;
var user = request.user;
// extract out the channel to send
var action = params.action;
var message = params.message;
var customData = params.customData;
// use to custom tweak whatever payload you wish to send
var pushQuery = new Parse.Query(Parse.Installation);
pushQuery.equalTo("deviceType", "android");
var payload = {"data": {
"alert": message,
"action": action,
"customdata": customData}
};
// Note that useMasterKey is necessary for Push notifications to succeed.
Parse.Push.send({
where: pushQuery, // for sending to a specific channel data: payload,
}, { success: function() {
console.log("#### PUSH OK");
}, error: function(error) {
console.log("#### PUSH ERROR" + error.message);
}, useMasterKey: true});
response.success('success');
});
The text was updated successfully, but these errors were encountered: