Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

API access token generation fails after Upgrade

70 views
Skip to first unread message

Theodotos Andreou

unread,
Nov 28, 2024, 3:01:51 AM11/28/24
to Keycloak User
Hello team

We are trying to generate a rw access token (for adding users, groups, etc). In previous version (19.x) this used to work:

```
    $ curl -X POST -s --location https://kc-test.example.com/auth/realms/master/protocol/openid-connect/token --header 'Content-Type: application/x-www-form-urlencoded' --header 'Authorization: Basic BASE64usernamePass' --data-urlencode grant_type=password --data-urlencode client_id=admin-cli --data-urlencode username=admin --data-urlencode password=TestKCAdminPass

    {"error":"unauthorized_client","error_description":"Invalid client or Invalid client credentials"}
```

This stopped working after the upgrade to 24.0.4.

Has anything changed in the API call?

Björn Pedersen

unread,
Nov 29, 2024, 6:17:07 AM11/29/24
to Keycloak User
Passing the username and password twice seems fishy, check how it is done here:


Reply all
Reply to author
Forward
0 new messages