[keycloak-user] Login to Admin REST API from client

Alex Berg chexxor at gmail.com
Thu Jun 8 21:19:49 EDT 2017


It's in the docs if you search for client credentials.

Use "$CLIENT_NAME:$CLIENT_SECRET" as the username and password, and
grant_type=client_credentials, and ensure the client has a role of
"realm-admin" or similar to enable it to use the Admin API.

Practice by crafting a curl command. There's a curl command example in the
docs.

On Jun 8, 2017 18:32, "Cesar Salazar" <csalazar at devsu.com> wrote:

> Hi,
>
> I'm trying to access the admin REST API from a microservice, in order to
> create a realm. In the documentation says that I should get a an access
> token in order to be able to make calls to the rest API.
>
> The problem is: I wouldn't like to use a username and password to get it,
> is it possible to get it from the clientId and clientSecret?
>
> I mean, how do I make calls to the admin REST API using client credentials?
> I couldn't find anything in the documentation.
> https://keycloak.gitbooks.io/documentation/server_
> development/topics/admin-rest-api.html
>
> Or is the documentation somewhere else?
>
> Thanks!
>
> --
> *Cesar Salazar*
> Development Manager
> DEVSU | www.devsu.com
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>


More information about the keycloak-user mailing list