I am currently trying to get a refresh token with this piece of code.
try {
AuthAPI authAPI = AuthAPI.newBuilder(issuer, clientId, clientSecret).build();
TokenHolder result = authAPI.requestToken(audience)
.setRealm("my-realm")
.execute()
.getBody();
return new Message(result.getAccessToken());
} catch (Auth0Exception e) {
return new Message("Exception: " + e.getMessage());
}
}
I followed the javadocs for reference. Trying to get an access code with this piece of code gives me this.
{"message":"Exception: Request failed with status code 403: Service not enabled within domain: https://audience/api/v2/"}
audience: “https://audience/api/v2/”
issuer: “https://tenant.us.auth0.com/”
Did I miss something? Do I have to add additional configurations? I have already added create:organizations
in my scope too.