Access token rejected by Management API

I’m attempting to use the “try” functionality in the Management API documentation at https://auth0.com/docs/api/management/v2. Per the instructions at https://auth0.com/docs/api/management/v2/get-access-tokens-for-test, I’m supposed to obtain an API explorer token at the indicated page. In the Management API documentation, I clicked the “Set API Token” button and pasted in my token, and it recognized the domain from that correctly.

When I then attempted to list all the users , I clicked “try” and received a 401 indicating that I used an invalid token.

The API does have the permission “read:users” set, and an older tenant with the exact same settings seems to be working exactly as expected.

I’ve tried this token on several other commands on the page and have tried regenerating the token, all to no avail. What’s going on and how might I get this to work?

Thanks!

2 Likes

Can’t say what’s going wrong. However, you could try few things trial and error way to get it working

  1. Unauthorize and re-authorize the API Explorer Application
  2. If that doesn’t work then create a new machine to machine application, authorize it against Auth0 Management API and manually generate a token for it via Test tab & curl command.

Also worth taking a look at working and non-working tokens via jwt.io to see if there is any difference.

2 Likes