Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kouzouigh/5d23b0aa62a7505d34a8528211f726be to your computer and use it in GitHub Desktop.
Save kouzouigh/5d23b0aa62a7505d34a8528211f726be to your computer and use it in GitHub Desktop.
Get Keycloak access token via curl and pretty print it with python
curl \
-d 'client_id=YOUR_KEYCLOAK_CLIENT' \
-d 'username=YOUR_USERNAME' \
-d 'password=YOUR_PASSWORD' \
-d 'grant_type=password' \
'https://YOUR_KEYCLOAK_SERVER_HOST/auth/realms/YOUR_REALM/protocol/openid-connect/token' \
| python -m json.tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment