# API access using the custom domain

**URL:** <https://community.auth0.com/t/api-access-using-the-custom-domain/112012>\
**Category:** Get Help\
**Tags:** users, management-api\
**Created:** [July 25, 2023, 8:25am UTC](https://community.auth0.com/t/api-access-using-the-custom-domain/112012 "2023-07-25T08:25:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![borys.wisniewski](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@borys.wisniewski](https://community.auth0.com/u/borys.wisniewski)\
**Post date:** [July 25, 2023, 8:25am UTC](https://community.auth0.com/t/api-access-using-the-custom-domain/112012/1 "2023-07-25T08:25:18Z")

</div>

Hello,

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

I have my own domain: [customdomain.org](http://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](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](http://mycompany.eu.auth0.com/api/v2)

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [July 25, 2023, 11:55pm UTC](https://community.auth0.com/t/api-access-using-the-custom-domain/112012/3 "2023-07-25T23:55:58Z")

</div>

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!

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 8, 2023, 11:56pm UTC](https://community.auth0.com/t/api-access-using-the-custom-domain/112012/4 "2023-08-08T23:56:22Z")

</div>

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