blog.broncotoxique.com

Juste another geek’s website

Request a token from Keycloak

Here is few command lines that you can use to retrieve a token from a Keycloak server. Feel free to add some purpose in comment.

# curl -k -v -X POST -H 'Content-type: application/x-www-form-urlencoded' -d 'grant_type=client_credentials&client_id=[CLIENT_ID]&client_secret=[CLIENT_SECRET]' https://[KEYCLOAK_URL]/auth/realms/[REALM]/protocol/openid-connect/token
# curl -s -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' --data '{"client_id":"[CLIEN_ID]", "client_secret":"[CLIENT_SECRET]", "grant_type":"client_credentials"}' https://[KEYCLOAK_URL]/auth/realms/[REALM]/protocol/openid-connect/token

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *