title: Can´t access keycloak due to wrong client password
body: <p>I need a Java Keycloak(2.3) connection to return tokens, however I've ran into problems much earlier. When POST-requesting my Keycloak instance in Postman I get following errors in the particular console.</p>
  
  <p><a href="https://www.keycloak.org/docs/2.5/server_development/topics/admin-rest-api.html" rel="nofollow noreferrer">This</a> is the example from Keycloak my code is based on.</p>
  
  <p>Keycloak:</p>
  
  <pre><code>17:54:47,586 WARN  [org.keycloak.events] (default task-25) type=LOGIN_ERROR, realmId=master, clientId=admin-cli, userId=null, ipAddress=127.0.0.1, error=invalid_client_credentials, grant_type=password
  </code></pre>
  
  <p>Wildfly:</p>
  
  <pre><code>17:55:14,310 ERROR [stderr] (default task-48) javax.ws.rs.BadRequestException: HTTP 400 Bad Request
  </code></pre>
  
  <p>Java:</p>
  
  <pre><code>Keycloak keycloak = Keycloak.getInstance(
             KEYCLOAK_TOKEN_RESOURCE_URI,
             REALM,
             KEYCLOAK_USERNAME,
             KEYCLOAK_PASSWORD,
              KEYCLOAK_CLIENT);
      RealmRepresentation realm = keycloak.realm(REALM).toRepresentation();
  </code></pre>