How can i pass Bearer token with post method. I tried with postman but getting this response "Error: Unauthorized Access. Request is not authorized"
await turnContext.sendActivity(`${await requestify.request(url, {
method: 'POST',
body: data,
dataType: 'json',
auth:{
"Bearer":access_token // token
}
}).then(async function (res) {
console.log(res.body);
return res.body;
})}`);
Looking at the documentation the auth
property is used for basic auth only, so just add the Authorization header manually
await requestify.request(url, {
method: 'POST',
body: data,
dataType: 'json',
headers :{
Authorization:"Bearer " + access_token // token
}
})