title: cannot create user in the keycloak. Getting 403 status
body: <p>I am trying to access the create a user in the keycloak programmatically. But I am getting 403 as a status code. I am following the below link.</p>
  
  <p><a href="https://technology.first8.nl/programmatically-adding-users-in-keycloak/" rel="noreferrer">https://technology.first8.nl/programmatically-adding-users-in-keycloak/</a></p>
  
  <p>Can anyone help me? Thanks In advance</p>
  
  <p>I have using the following code to create user  </p>
  
  <pre><code>Keycloak kc = Keycloak.getInstance(
                       "http://{server name}:8080/auth",
                       "{realm name}", // the realm to log in to
                       "{useraname}", 
                       "{password}",  // the user
                       "{client id}",
                       "{client secret key}");
  
              CredentialRepresentation credential = new CredentialRepresentation();
              credential.setType(CredentialRepresentation.PASSWORD);
              credential.setValue("test123");
              UserRepresentation user = new UserRepresentation();
              user.setUsername("codeuser");
              user.setFirstName("sampleuser1");
              user.setLastName("password");
  
              user.setCredentials(Arrays.asList(credential));
              user.setEnabled(true);
              Response result = kc.realm("{realm name}").users().create(user);
  </code></pre>
  
  <p>response.status is coming as 403</p>