I am having a strange issue when it comes to getting an authorization token. In my code I use axios typically but have done also tried it using request as given in the generated example when viewing it under Applications->APIs
var axios = require("axios").default;
var options = {
method: 'POST',
url: 'https://dev-8ciw43-h.us.auth0.com/oauth/token',
headers: {'content-type': 'application/json'},
data: {
grant_type: 'client_credentials',
client_id: 'xxxxx',
client_secret: 'xxxxx',
audience: 'https://dev-8ciw43-h.us.auth0.com/api/v2/'
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
I get a 401 error when running this
However if I use the same tool it works in python with no issues
I am trying to fix an app where someone hardcoded the token as a parameter.