Run a real authorization code and client credentials flow. Keycloak is standing in for Microsoft Entra ID.
This flow lets a user log in and consent. Keycloak authenticates you, issues an authorization code, and your browser delivers it to the callback server — which exchanges it for tokens server-side. You will receive both an ID token (proving who you are) and an access token (for calling APIs).
Raw token (never send this to an API):
Decoded claims:
Raw token (send this in Authorization: Bearer …):
Decoded claims (if JWT):
This flow has no user. The callback server authenticates as itself using its client_id and client_secret, and receives an access token it can use to call APIs on its own behalf. The secret never touches the browser.
Decoded claims (if JWT):
aud claim contains your client_id; the access token's aud is the API it's meant for. Presenting a token to the wrong audience will be rejected.
Authorization: Bearer … header. They are not interchangeable.