Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

401 - {"statusCode":401,"error":"Unauthorized","message":"Invalid token","attributes":{"error":"Invalid token"}} #231

Open
joeypedicini92 opened this issue Oct 28, 2018 · 3 comments

Comments

@joeypedicini92
Copy link

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?

@Exilliar
Copy link

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.

@chillyistkult
Copy link

Could be related to #250 .

@JoseFuentes-Dev
Copy link

Tengo este mismo error y no encuentro la solucion todavia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants