Reputation: 1773
I am doing some work with an api, and I need to make a post request to my parse server, but I get the error error:{unauthorized access}
, I am pretty sure it is because of the keys, but I am unsure. I am using postman to see if I can make a request to the app.post function, but I am getting the above error. I am making a request to `https://xxxxxxxx.herokuapp.com/parse/index/testing
var mountPath = process.env.PARSE_MOUNT || '/parse';
app.use(mountPath, api);
app.get('/', function(req, res) {
res.status(200).send('I dream of being a website. Please star the parse- server repo on GitHub!');
});
app.post('/testing', twilio.webhook({ validate: false }), headers: {"AppId": "", "MasterKey": ""}, function (req, res) {
console.log("testing")
});
Heroku logs
at=info method=POST path="/parse/index/testing" host=xxxxxxx.herokuapp.com request_id=..... fwd="xx.xxx.xxx.xxx" dyno=web.1 connect=1ms service=41ms status=403 bytes=506
Upvotes: 0
Views: 489
Reputation: 6242
Try to attach you master key
like this
app.post('/testing/masterkey/:masterkey', twilio.webhook({ validate: false }), function (req, res) {
console.log("testing")
console.log(req.params.masterkey);
});
and request with this format
hostname/testing/masterkey/1234
Edit
Post call from Postman
Upvotes: 1