Howto set scope on a AuthenticationAPIClient connection from Android app (java)


AndroidStudio, java, native app.

I create a id_token using this call:

AuthenticationAPIClient authentication = new AuthenticationAPIClient(auth0);

.login(userName, password, “Username-Password-Authentication”)
.setScope(“openid offline_access”)
.start(new BaseCallback<Credentials, AuthenticationException>() {
public void onSuccess(Credentials payload) {

It works except that setScope not seems to work, in my response I can see:

“scope”:“openid profile email address phone offline_access”

Im trying to replcate a call we do from a ios-app and the id_token created from the call above is much longer than the one from ios and I belive that this is related to the scope-parameter.

Any help on how to change the scope would be appriciated.

Thanks a lot!

Realised I have to set


on the Auth0 object. Works as expected now.

1 Like

Perfect! Glad to hear that and thanks for sharing!

1 Like

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