Access the keycloak API from postman

You call API through POST client

URL - http://localhost:8080/auth/realms/Demo/protocol/openid-connect/token

So here in above url i am using Demo as my realm instead of master.

ContentType - "Content-Type":"application/x-www-form-urlencoded"

Params:

{
"client_secret" : "90ec9638-7647-4e65-ad20-b82df3341084",
"username" : "ankur",
"password" : "123456",
"grant_type" : "password",
"client_id": "app-client"
}

Set Header as below

enter image description here

Data Need to be passed as shown below enter image description here


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