[keycloak-user] Missing form parameter: grant_type while using the REST API

Stephan Wehner stephanwehner12 at gmail.com
Tue May 28 07:55:01 EDT 2019


Hello,

I'm trying to get an access token from my Keycloak Server. I'm sending a
post request to

http://localhost:12345/auth/realms/testRealm/protocol/openid-connect/token?client_id=testClient&username=testUser&password=abcde&grant_type=password

with additional header "Content-type: application/x-www-form-urlencoded;
charset=UTF-8".

The response I get is:



HTTP/1.1 400 Bad Request
Connection: keep-alive
Cache-Control: no-store
Pragma: no-cache
Content-Type: application/json
Content-Length: 84
Date: Tue, 28 May 2019 10:14:08 GMT

{"error":"invalid_request","error_description":"Missing form parameter:
grant_type"}




Do you have any idea what is the cause of the problem? Did I miss something
to configure? The administration console works well. I'm using Keycloak
6.0.1 as standalone.

I had to change the port because the default port is not free on my host.
Could it be, that I missed something there?

Thank you!


More information about the keycloak-user mailing list