Reputation: 1
Am trying to get access-token from keycloak using postman application. The flow which I am using is Auth Code flow. The Auth URI am giving is
http://localhost:8080/auth/realms/realm_name/openid-connect/token
Even in keycloak I made some changes of valid redirect URI to http://localhost:8080/* in the Security-admin-console under clients but still am receiving a web page stating we are sorry instead of login page when am hitting the get request token button in postman application
can someone help me with this issue
Upvotes: 0
Views: 6723
Reputation: 3456
Getting accessToken in Postman:
POST http://localhost:8080/auth/realms/realm-name/protocol/openid-connect/token
Headers:
Content-Type: application/x-www-form-urlencoded
Body x-www-form-urlencoded:
client_id: your-client
username: user-you-are-using
password: password-for-user
grant_type: password
client_secret: 11112222-3333-4444-5555-666666666666 (client secret is required if client "Access Type"="confidential")
Getting refreshToken in Postman:
POST http://localhost:8080/auth/realms/realm-name/protocol/openid-connect/token
Headers:
Content-Type: application/x-www-form-urlencoded
Body x-www-form-urlencoded:
client_id: your-client
grant_type: refresh_token
refresh_token: refresh-token-from-previous-request
client_secret: 11112222-3333-4444-5555-666666666666 (client secret is required if client "Access Type"="confidential")
Upvotes: 4