{"action":"created","issue":{"url":"https://api.github.com/repos/driftyco/ionic-io-issues/issues/17","labels_url":"https://api.github.com/repos/driftyco/ionic-io-issues/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ionic-io-issues/issues/17/comments","events_url":"https://api.github.com/repos/driftyco/ionic-io-issues/issues/17/events","html_url":"https://github.com/driftyco/ionic-io-issues/issues/17","id":110217686,"number":17,"title":"Getting Unable to Authenticate while making post call to https://push.ionic.io/api/v1/push","user":{"login":"onkar0777","id":4092102,"avatar_url":"https://avatars.githubusercontent.com/u/4092102?v=3","gravatar_id":"","url":"https://api.github.com/users/onkar0777","html_url":"https://github.com/onkar0777","followers_url":"https://api.github.com/users/onkar0777/followers","following_url":"https://api.github.com/users/onkar0777/following{/other_user}","gists_url":"https://api.github.com/users/onkar0777/gists{/gist_id}","starred_url":"https://api.github.com/users/onkar0777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onkar0777/subscriptions","organizations_url":"https://api.github.com/users/onkar0777/orgs","repos_url":"https://api.github.com/users/onkar0777/repos","events_url":"https://api.github.com/users/onkar0777/events{/privacy}","received_events_url":"https://api.github.com/users/onkar0777/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-07T12:45:34Z","updated_at":"2015-10-07T14:29:55Z","closed_at":null,"body":"Hi,\r\nCode - \r\nvar app_private_key = \"<Private Key>:\";\r\n\r\n    var auth = new Buffer(app_private_key).toString('base64').replace('\\n', '');\r\n    console.log(auth);\r\n    // An object of options to indicate where to post to\r\n    var post_options = {\r\n        host: 'push.ionic.io',\r\n        path: '/api/v1/push',\r\n        method: 'POST',\r\n        headers: {\r\n            \"Content-Type\": 'application/json',\r\n            \"Authorization\": \"Basic \"+auth,\r\n            \"X-Ionic-Application-Id\": 'f55e5a37'\r\n        }\r\n    };\r\n\r\n    console.log(post_options.headers);\r\n    // Set up the request\r\n    var post_req = https.request(post_options, function(res) {\r\n        res.on('data', function (chunk) {\r\n            console.log('Response: ' + chunk);\r\n        });\r\n    });\r\n\r\n    // post the data\r\n    post_req.write(post_json_data);\r\n    post_req.end();\r\n\r\nResponse:\r\n{\"result\":\"error\",\"message\":\"Unable to Authenticate\"}\r\n\r\nNo matter what I try, I always get the same response."},"comment":{"url":"https://api.github.com/repos/driftyco/ionic-io-issues/issues/comments/146211312","html_url":"https://github.com/driftyco/ionic-io-issues/issues/17#issuecomment-146211312","issue_url":"https://api.github.com/repos/driftyco/ionic-io-issues/issues/17","id":146211312,"user":{"login":"ericb","id":19638,"avatar_url":"https://avatars.githubusercontent.com/u/19638?v=3","gravatar_id":"","url":"https://api.github.com/users/ericb","html_url":"https://github.com/ericb","followers_url":"https://api.github.com/users/ericb/followers","following_url":"https://api.github.com/users/ericb/following{/other_user}","gists_url":"https://api.github.com/users/ericb/gists{/gist_id}","starred_url":"https://api.github.com/users/ericb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericb/subscriptions","organizations_url":"https://api.github.com/users/ericb/orgs","repos_url":"https://api.github.com/users/ericb/repos","events_url":"https://api.github.com/users/ericb/events{/privacy}","received_events_url":"https://api.github.com/users/ericb/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T14:29:55Z","updated_at":"2015-10-07T14:29:55Z","body":"Ah okay. Thanks for the info. We'll get a more appropriate message in place. "}}