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

Stephan Wehner stephanwehner12 at gmail.com
Wed May 29 03:59:01 EDT 2019


Yes, I did and got the same error message.

Am Di., 28. Mai 2019 um 21:19 Uhr schrieb Tony Harris <
Tony.Harris at oneadvanced.com>:

> Have you tried sending the data, client_id, username etc in the post body
> rather than as query parameters in the URL?
>
> -----Original Message-----
> From: keycloak-user-bounces at lists.jboss.org [mailto:
> keycloak-user-bounces at lists.jboss.org] On Behalf Of Stephan Wehner
> Sent: 28 May 2019 12:55
> To: keycloak-user at lists.jboss.org
> Subject: [keycloak-user] Missing form parameter: grant_type while using
> the REST API
>
> 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!
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
> ________________________________
>
> Please consider the environment: Think before you print!
>
>
> This message has been scanned for malware by Websense. www.websense.com
>


More information about the keycloak-user mailing list