We are using a custom domain for one of our Auth0 tenants.
We have multiple APIs setup to consume m2m Auth0 Access Tokens.
We need to use the custom domain for the m2m Auth0 Access Token (as the issuer).
When using Postman to test the API, the m2m Auth0 Access Token is required.
At present, the Auth0 Dashboard API Test page only generates sample code (and tokens) using the default canonical domain.
Is there a way to get the Auth0 Dashboard API Test page to use the custom domain instead of the canonical domain?
Hi @azure.aii
Welcome to the Auth0 Community!
I understand that you are looking for a way to get the Auth0 Dashboard API Test page to use the custom domain instead of the canonical domain.
At this moment, there currently is no built-in way to get the Auth0 Dashboard API Test page to automatically use your custom domain instead of the canonical domain, as the API debugger and sample code generator in the dashboard are hardcoded to use your default Auth0 tenant domain.
Recommended workaround
To achieve the desired flow, it is possible to obtain an M2M access token with your custom domain as the issuer (iss) by slightly modifying the generated code.
Instead of using the Test tab directly, you should generate the token using Postman or cURL by modifying the sample code provided by the dashboard:
-
Go to the API Test page in the Auth0 Dashboard and copy the generated cURL or Node/Python code;
-
Paste the code into your terminal or import it into Postman;
-
Manually replace the canonical domain URL (e.g., https://YOUR_TENANT.region.auth0.com/oauth/token) with your custom domain URL (e.g., https://api.yourcustomdomain.com/oauth/token);
-
Execute the request.
Because you are sending the Client Credentials grant request directly to your custom domain’s /oauth/token endpoint, Auth0 will issue the token with your custom domain as the iss (issuer) claim.
Hope this helped you achieve the desired flow!
Have a great one,
Gerald
Thank you for your response Gerald.
That is exactly what I wound up doing.
Hi @azure.aii
Thank you for your confirmation, glad to have helped you with this issue!
Please do reach out to us for any other issues or requests, we will gladly look into it for you.
Have a great one,
Gerald