Unable to authenticate using nodejs client

 I am trying to authenticate with my keycloak instance using the following credentials but am met with the `error=invalid_client_credentials`  in the console. 
 const kcAdminClient = new KcAdminClient({
            baseUrl: process.env.KEYCLOAK_URL,
            realmName: process.env.KEYCLOAK_REALM,
      await kcAdminClient.auth({
        username: "realm-root",
        password: "rolemodel",
        grantType: "password",
        clientId: "cycube",

The following is my config in the ui

I have spent the past day trying to figure it out but am totally clueless about what I am doing wrong. Any help is appreciated.

Your client is Acess Type: confidential but your code is not sending any client secret, so invalid_client_credentials is valid error for this case. Make sure your client is public, not confidential.