Hallo,
Is is possible to do a Keycloak /token API call and bass the body (username, password, grant_type, etc) as raw JSON (application/json)? When I pass the parameters as application/x-www-form-urlencoded things work fine. But when I pass the parameters as JSON then I get the below error.
{
“error”: “RESTEASY003065: Cannot consume content type”
}
- Do I have to change a setting so that Keycloak can accept a call to /token with a JSON body?
- If Keycloak cannot accept the parameters for a /token call as a JSON body, what is the reasoning behind that considering that when doing authentication from an API to Keycloak, the logical choide for the body is application/json?
Thank you in advance
Gerhard