Auth0 Home Blog Docs

Auth0-Java 403 Error Grant Type Password not Allowed For Client



Hi - when using auth0-java ( , I am getting this error:

Request failed with status code 403:
Grant type ‘password’ not allowed for
the client.

I have configured my client to use the default_directory of ‘Username-Password-Authentication’ and have created a user there. The code is below, with actual usernames/passwords substituted of course.

AuthAPI auth = new AuthAPI("", clientId, clientSecret);

AuthRequest request = auth.login("", "password")
    try {
            TokenHolder holder = request.execute();
            } catch (APIException exception) {
            // api error
            } catch (Auth0Exception exception) {
            //request error


Please see the following post for a similar resolved issue:


Although - the user should easily be able to set these from the web app - having to run an API call to enable this seems like a terrible idea.


You can try selecting the password grant in the advanced settings of your Client, under the Grant types section.