Keycloak: We are sorry... Invalid parameter: redirect_uri
The redirect_uri in the login request isn’t in the Keycloak client’s Valid Redirect URIs.
Invalid parameter: redirect_uriWe are sorry... Invalid parameter: redirect_uriInvalid redirect uri Meaning
Keycloak matches exactly or by wildcard. Ports, trailing slashes, http vs https behind proxies, and different hostnames (localhost vs 127.0.0.1) cause mismatches. Behind a proxy, Keycloak may also see the wrong scheme.
Common causes
- URI not listed in Valid Redirect URIs
- http vs https (proxy without forwarded headers)
- Port/hostname/trailing slash differences
- Using the wrong client
⚡ Quick fix
- Add the exact URI (or a careful wildcard) to Valid Redirect URIs
- Configure proxy headers (KC_PROXY_HEADERS=xforwarded)
- Use the same hostname consistently
Detailed fix by platform
Shell
- bash
# Keycloak 24+ behind a reverse proxy KC_PROXY_HEADERS=xforwarded KC_HOSTNAME=https://auth.example.com /opt/keycloak/bin/kc.sh start
How to diagnose
- Request — redirect_uri parameter value
- Client — Valid Redirect URIs
- Proxy — Forwarded headers
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in Authentication
- invalid_token invalid_token: The access token is invalid (JsonWebTokenError: invalid signature / jwt malformed)
- Access blocked: has not completed the Google verification process Google OAuth: Error 403: access_denied — The developer hasn't given you access to this app / has not completed the Google verification process
- Google hasn't verified this app Google OAuth: Google hasn't verified this app / This app isn't verified
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026