{"action":"created","issue":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1740","repository_url":"https://api.github.com/repos/ParsePlatform/parse-server","labels_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1740/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1740/comments","events_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1740/events","html_url":"https://github.com/ParsePlatform/parse-server/issues/1740","id":153917512,"number":1740,"title":"Push notification not working main.js","user":{"login":"Twizzlerfw","id":13291247,"avatar_url":"https://avatars.githubusercontent.com/u/13291247?v=3","gravatar_id":"","url":"https://api.github.com/users/Twizzlerfw","html_url":"https://github.com/Twizzlerfw","followers_url":"https://api.github.com/users/Twizzlerfw/followers","following_url":"https://api.github.com/users/Twizzlerfw/following{/other_user}","gists_url":"https://api.github.com/users/Twizzlerfw/gists{/gist_id}","starred_url":"https://api.github.com/users/Twizzlerfw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Twizzlerfw/subscriptions","organizations_url":"https://api.github.com/users/Twizzlerfw/orgs","repos_url":"https://api.github.com/users/Twizzlerfw/repos","events_url":"https://api.github.com/users/Twizzlerfw/events{/privacy}","received_events_url":"https://api.github.com/users/Twizzlerfw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-05-10T03:37:04Z","updated_at":"2016-05-11T01:23:52Z","closed_at":null,"body":"I am now on the new parse open source server and I am trying to send a push notification using the cloud main.js. I have sent a push using curl but am having a problem with javascript. Here is the code I have.\r\n\r\n```\r\nParse.Cloud.define(\"PushNotification\", function(request, response) {\r\n  console.log('sending push');\r\nvar Installation = new Parse.Query(Parse.Installation);\r\n  console.log(Installation);\r\n\r\nParse.Push.send({\r\n\r\n    where: Installation,\r\n  data: {\r\n    alert: request.params.Message,\r\n    badge: 0,\r\n    sound: 'default'\r\n  }\r\n}, {\r\n  useMasterKey: true,\r\n  success: function() {\r\n    // Push sent!\r\n  console.log('Push sent');\r\n        response.success('success');\r\n\r\n  },\r\n  error: function(error) {\r\n    // There was a problem :(\r\n          response.error(\"Error push did not send\");\r\n            console.log('sending push error: '+error);\r\n\r\n\r\n  }\r\n});\r\n```\r\nIt says that it sent but It did not. If any one could help that would be great!\r\n"},"comment":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/comments/218338272","html_url":"https://github.com/ParsePlatform/parse-server/issues/1740#issuecomment-218338272","issue_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1740","id":218338272,"user":{"login":"dannyvanderzande","id":835479,"avatar_url":"https://avatars.githubusercontent.com/u/835479?v=3","gravatar_id":"","url":"https://api.github.com/users/dannyvanderzande","html_url":"https://github.com/dannyvanderzande","followers_url":"https://api.github.com/users/dannyvanderzande/followers","following_url":"https://api.github.com/users/dannyvanderzande/following{/other_user}","gists_url":"https://api.github.com/users/dannyvanderzande/gists{/gist_id}","starred_url":"https://api.github.com/users/dannyvanderzande/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannyvanderzande/subscriptions","organizations_url":"https://api.github.com/users/dannyvanderzande/orgs","repos_url":"https://api.github.com/users/dannyvanderzande/repos","events_url":"https://api.github.com/users/dannyvanderzande/events{/privacy}","received_events_url":"https://api.github.com/users/dannyvanderzande/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T01:23:52Z","updated_at":"2016-05-11T01:23:52Z","body":"If I'm not mistaken, push only works with the master key at this moment.\r\nTry adding Parse.Cloud.useMasterKey() at the first line of your function and see if that works..."}}