Hello my firends,

I am trying to integrate Keycloak Auth server to my backend rest services.
I have a keycloak server which is working standalone.
i can call services via postman with postman's own authorization mecanism.

But when i trying to connect via Java adapter , its always response Unauthorized.
this is the guide of keycloak: /docs/3.2/server_development/topics/admin-rest-api.html
"Example using Java" section. same as my code.

This is my code:
import org.keycloak.admin.client.Keycloak;
import org.keycloak.admin.client.resource.RealmResource;

Keycloak keycloak = Keycloak.getInstance(
username, password,

RealmRepresentation realm = keycloak.realm("master").toRepresentation();