Access the keycloak API from postman

Programmer :

I have tried to access the keycloak API from the postman. but it is showing 400 bad request.

I was calling api in the below format.

http://{hostname}:8080/auth/realms/master/protocol/openid-connect/token?username=admin&password=admin&client_id=admin-cli&grant_type=password

In the headers I have set the content_type as application/x-www-form-urlencoded

I am getting the response as below.

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

Can any one help me.Any help will be appreciated. thanks in advance

UchihaItachi :

A bit late for this question, but you did ask about postman and not curl. So you have to put the options in x-www-form-urlencoded enter image description here

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=434195&siteId=1