Authorization header.
Set your environment
Examples in these docs use two shell variables so you can paste them as-is. Set both once per session.$BASE_URL is your environment’s host. It differs per environment, so substitute the one we issued with your tenant. See Base URLs.
Get a token
Submit yourclientId and clientSecret to Keycloak with the client_credentials grant.
Use
--data-urlencode rather than --data, because secrets often contain +, &, or %, which are meaningful in
form encoding. With plain --data those characters go through as-is and Keycloak receives a different secret, which
fails with invalid_client.expires_in: 300). There is no refresh token (refresh_expires_in: 0); when the token expires, request a new one with the same call.
Use the token
Capture it into$ACCESS_TOKEN, which every other example expects:

