Keycloak REST API with Postman

preview_player
Показать описание
Demonstrate how to use Keycloak's admin REST API with a postman client application.

For invoking a REST endpoint, client application should obtain an access token. After that the access token should be added to the authorization header of each REST API call as a bearer token.

OAuth 2.0 protocol is used to obtain access token.

Keycloak OIDC token endpoint: http://{HOST}/realms/{REALM_NAME}/protocol/openid-connect/token

Base URL for REST API: http://{HOST}/admin/realms​
(Host: localhost:8080 BasePath: /admin/realms)

Example for listing users: GET http://{HOST}/auth/admin/realms/{REALM_NAME}/users

00:05 - What is Admin REST API ?
00:51 - Steps to Follow
01:46 - Keycloak Client Configuration
03:06 - Required roles assignment
04:18 - Retrieving the access token from Postman
05:37 - Invoking a Keycloak REST Endpoint
06:41 - Troubleshooting (HTTP 401 and 403)
Рекомендации по теме
Комментарии
Автор

Спасибо вам, добрые люди, за это видео. Это то, что я искал.

СергейРоманенко-чы
Автор

Short and to the point without unnecessary nonsense. Amazing video.
Thank you!

anastaskostov
Автор

Thank you a lot for making this video. I was stuck for two days. Even AI did not help me figure this out. I'm glad I stumble accross your channel. Everything works fine now.

epoxyde
Автор

thank you so much for this video. i couldnt find this info anywhere else in like 4 hours.

jfparrado
Автор

Thanks a lot. This video is a life saver

JoseGarcia-qqsk
Автор

thank you for this video. I appreciate and working fine for me

DjibyThiaw
Автор

Thank you. How can I retrieve only the user o a specific client and not of every clients?

attilio
Автор

Hi Sir, Please let me know how do I create a new client in Keycloak through postman.

AashishPanigrahi
Автор

For the 403 error I have a valid access token and also assigned enough roles to the client to query the second endpoint to fetch users.yet it is showing 403 forbidden error.what am I missing out or need to check?

nandansubramanian
Автор

Hello friend, do you know how I could use the logout endpoints, perhaps change the password for a user, with a public client?

UnDevMas
Автор

Hello, In my case, I don't know why the 401 error appears, if I have the header and the access token not expired. If you can help me please

DanielRamos-ovmb
Автор

Do you know how to add federatedIdentities attribute to the /users endpoint ?

JuanTalamante
Автор

While sending the Request to fetch the user List, I get the following Error: "RESTEASY003065: Cannot consume content type" - I tried to set the content-type as application/xml but it is not working. Do you have any idea on how to solve this?

damiankozakiewicz
Автор

invalid client showing
{
"error": "invalid_client",

"error_description": "Invalid client or Invalid client credentials"
}

जयकिशनकुमार-भध
Автор

Is it possible to return a QR Code from a specific user using API?

leonardorocha
join shbcf.ru