auth0-authorization-extension
auth0-authorization-extension copied to clipboard
401 - {"statusCode":401,"error":"Unauthorized","message":"Invalid token","attributes":{"error":"Invalid token"}}
I'm trying to use the API for the first time, however every request seems to result in the above error.
Seems to be the same as this but can't find a resolution: https://community.auth0.com/t/invalid-token-when-accessing-authorization-extension-api/8339/3
I've verified the way I'm getting and setting the token multiple times
{
method: 'POST',
uri: `https://${TENANT}.auth0.com/oauth/token`,
headers: { 'content-type': 'application/json' },
body:
{
grant_type: 'client_credentials',
client_id: CLIENT,
client_secret: SECRET,
audience: `urn:auth0-authz-api`
},
json: true
};
{
method: 'GET',
uri: encodeURI(`https://${TENANT}.us8.webtask.io/${EXT_ID}/api/groups`),
headers: {
'content-type': 'application/json',
Authorization: `Bearer ${accessToken}`
},
json: true
}
And the Machine-Machine client has access to all the scopes for this api which I've enabled. Is this broken or am I still doing something wrong?
Just in case anyone comes across this error in the future. I fixed this problem by allowing the grant type "client_credentials" in my applications "advanced settings". May not be the solution to this exact error though.
Could be related to #250 .
Tengo este mismo error y no encuentro la solucion todavia