API access using the custom domain


I would like to access the Auth0 API using the custom domain.

I have my own domain: customdomain.org and subdomain auth. customdomain. org that is configured and in the status ready and Tested (In Tenant Settings → Custom Domains)

Can I send my request to create for example new user to: auth. customdomain. org ?

I tried to do this and I got an error:

auth0.v3.exceptions.Auth0Error: 401: Bad audience: https://auth.customdomain.org

I also tried to create new API with custom domain, but this doesn’t work. I need use: mycompany.eu.auth0.com/api/v2

Hi @borys.wisniewski,

Welcome to the Auth0 Community!

With a custom domain configured, you can make requests to your tenant by using either your canonical or custom domain.

The following domains are permitted:

  • https://YOUR_DOMAIN.REGION.auth0.com/
  • https://{{YOUR_CUSTOM_DOMAIN}}

However, when requesting a Management API access token, you must use the API identifier defined in your API settings, which has the following syntax:

  • https://YOUR_DOMAIN.REGION.auth0.com/api/v2/

I hope the explanation was clear!



This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.