Auth0 Home Blog Docs

Bad Audience when using a custom API



I’m using a custom API for user management. I can get an JWT for that API easily, but when I try to use it, I get the reply:
"message": "Bad audience: <api audience/identifier>"
The endpoint I’m posting the data to is my usual endpoint (, my identifier/audience is: The scopes of the api are set right (and that doesn’t seem to be the problem).

Why do I get:

  "statusCode": 401,
  "error": "Unauthorized",
  "message": "Bad audience:"



Hi Kurt,

In case of calling Auth0 management API v2, you should use
https://{tentant} audience. A custom audience is not accepted for Auth0 management API v2.



i have the same issue, tried to remove the audience from my token request but got error:

“error”: “access_denied”,
“error_description”: “Non-global clients are not allowed access to APIv1”

This is how my request looks like:

curl -X POST
-H ‘cache-control: no-cache’
-H ‘content-type: application/json’
-H ‘postman-token: e02ffd35-4fdd-5ad9-d821-12b8496caa98’
-d ‘{“client_id”:“7xVERL0bjhY8uWgH62ECfXVXeLW4fzyi”,“client_secret”:“2XtyYZm6zAI3klTMyotFoNOl5IZi6GUI5n3P1UVko27uCvXjxaVBaOf9YnxWgcau”,“grant_type”:“client_credentials”}’

I was able to get a token if I have audience set, but then that token is not useful when I want to access this endpoint:

Please help.


Hi lyubomir,

First of all, visit your client page and rotate your secret :slight_smile:

Second, your request is mostly valid, just missing audience:


Make sure client is allowed to include v2 API audience by visiting APIs > Auth0 Management API > Non Interactive Clients and Authorize your client (7xVERL0bjhY8uWgH62ECfXVXeLW4fzyi) with selected scopes. Do this only after rotating your secret.