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
cURLor 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