Golang Management Client Domain Error

c := conf.GetConf()
auth0Env := c.Auth0
m, err := management.New(auth0Env.Domain, auth0Env.Machine.Client, auth0Env.Machine.Secret)
if err != nil {
	log.Fatal(err)
}

With this above - I am getting the following error:

service-auth | 2020/06/19 15:22:24 oauth2: cannot fetch token: 403 Forbidden
service-auth | Response: {“error”:“access_denied”,“error_description”:“Service not enabled within domain: https://auth.theunboundedworld.com/api/v2/”}

auth.theunboundedworld.com is my custom domain, any idea why this is failing for me?

Thanks,

Good afternoon,

If you are using the Management API, then the API identifier will actually use your default tenant domain name, https://<default-tenant-name>.auth0.com/api/v2/ , instead of the custom domain.

You can find a similar post here: Unable to authorized with the custom domain - #2 by kimcodes

1 Like