Keycloak admin api

4:37 PM

Hi there,

I’ve been creating a client in Quarkus to communicate with Keycloak to configure keycloak through the api.
I have been able to get token by api and I could get clients and roles and groups but my problem is that when I wanted to create realm, I got exception 400 bad request, and I don’t know what the problem could be ???

Keycloak keycloak = KeycloakBuilder.builder()

RealmRepresentation realm = createRealm(realmName);

(ERROR) {request_context:{} log_data:Error running Quarkus application: HTTP 400 Bad Request
at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.handleErrorStatus(
at org.jboss.resteasy.client.jaxrs.internal.proxy.extractors.DefaultEntityExtractorFactory$3.extractEntity(
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(
at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(
at com.sun.proxy.$Proxy34.create(Unknown Source)