{"action":"opened","issue":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1847","repository_url":"https://api.github.com/repos/ParsePlatform/parse-server","labels_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1847/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1847/comments","events_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/1847/events","html_url":"https://github.com/ParsePlatform/parse-server/issues/1847","id":155958325,"number":1847,"title":"rest Api and push notification =  unauthorized: master key is required","user":{"login":"MattiaConfalonieri","id":8712089,"avatar_url":"https://avatars.githubusercontent.com/u/8712089?v=3","gravatar_id":"","url":"https://api.github.com/users/MattiaConfalonieri","html_url":"https://github.com/MattiaConfalonieri","followers_url":"https://api.github.com/users/MattiaConfalonieri/followers","following_url":"https://api.github.com/users/MattiaConfalonieri/following{/other_user}","gists_url":"https://api.github.com/users/MattiaConfalonieri/gists{/gist_id}","starred_url":"https://api.github.com/users/MattiaConfalonieri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattiaConfalonieri/subscriptions","organizations_url":"https://api.github.com/users/MattiaConfalonieri/orgs","repos_url":"https://api.github.com/users/MattiaConfalonieri/repos","events_url":"https://api.github.com/users/MattiaConfalonieri/events{/privacy}","received_events_url":"https://api.github.com/users/MattiaConfalonieri/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-20T13:03:20Z","updated_at":"2016-05-20T13:03:20Z","closed_at":null,"body":"Hi, i have  a problem with rest api and sending push, with cloud code push work, but with rest api don't,\r\n\r\nhere my code:\r\n\r\n`$alertTitle = \"La ricetta del giorno è: \\\"$nome\\\"\";\r\n\t\t$riferimento =\t$numero;\r\n\t\t$url = 'http://********.com/parse/push';\r\n\t\t$data = array(\r\n\t\t\t'where' => '{\"channels\": \"NotificheValentina\"}',\r\n  \t\t  'data' => array(\r\n   \t\t     'alert' => $alertTitle,\r\n      \t\t  'sound' => 'yummy.caf',\r\n\t\t\t\t\"cheNotifica\"=> \"newRecipes\",\r\n\t\t\t\t\"riferimento\"=> $riferimento,\r\n\t\t\t\t\"titolo\"=> $nome,\r\n\t\t\t\t'badge'=>1,\r\n  \t\t  ),\r\n\t\t);\r\n\t\t$_data = json_encode($data);\r\n\t\t$headers = array(\r\n   \t\t 'X-Parse-Application-Id: ' . $APPLICATION_ID,\r\n   \t\t 'X-Parse-REST-API-Key: ' . $REST_API_KEY,\r\n       \"X-Parse-REST-MASTER-Key: \" . $REST_MASTER_KEY,\r\n   \t\t 'Content-Type: application/json',\r\n   \t\t 'Content-Length: ' . strlen($_data)\r\n\t\t);\r\n\r\n\t\t$curl = curl_init($url);\r\n\t\tcurl_setopt($curl, CURLOPT_POST, 1);\r\n\t\tcurl_setopt($curl, CURLOPT_POSTFIELDS, $_data);\r\n\t\tcurl_setopt($curl, CURLOPT_HTTPHEADER, $headers);\r\n\t\tcurl_setopt($curl, CURLOPT_RETURNTRANSFER,1);\r\n\t\tcurl_exec($curl);\r\n`\r\n\r\nAs you can see in the log i receive a Error: unauthorized: master key is required\r\n\r\nAnybody can help me please?\r\n\r\n- [ •] You've met the prerequisites: https://github.com/ParsePlatform/parse-server/wiki/Parse-Server-Guide#prerequisites.\r\n\r\n- [• ] You're running the latest version of Parse Server: https://github.com/ParsePlatform/parse-server/releases\r\n\r\n- [ •] You've searched through existing issues: https://github.com/ParsePlatform/Parse-Server/issues?utf8=%E2%9C%93&q=is%3Aissue Chances are that your issue has been reported or resolved before.\r\n\r\n#### Logs/Trace\r\n`verbose: error: Error: unauthorized: master key is required\r\n2016-05-20T11:54:54.702609+00:00 app[web.1]:     at promiseEnforceMasterKeyAccess (/app/node_modules/parse-server/lib/middlewares.js:211:17)\r\n2016-05-20T11:54:54.702610+00:00 app[web.1]:     at /app/node_modules/parse-server/lib/PromiseRouter.js:108:22\r\n2016-05-20T11:54:54.702610+00:00 app[web.1]:     at run (/app/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:89:22)\r\n2016-05-20T11:54:54.702611+00:00 app[web.1]:     at /app/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:102:28\r\n2016-05-20T11:54:54.702611+00:00 app[web.1]:     at flush (/app/node_modules/babel-polyfill/node_modules/core-js/modules/_microtask.js:18:9)\r\n2016-05-20T11:54:54.702612+00:00 app[web.1]:     at _combinedTickCallback (internal/process/next_tick.js:67:7)\r\n2016-05-20T11:54:54.702612+00:00 app[web.1]:     at process._tickDomainCallback (internal/process/next_tick.js:122:9)`\r\n"}}
{"actor":{"display_login":"MattiaConfalonieri"}}