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}/auth/realms/{REALM_NAME}/protocol/openid-connect/token

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

Example for listing users: GET http://{HOST}/auth/admin/realms/{REALM_NAME}/users
Рекомендации по теме
Комментарии
Автор

Ok shoutout to the main man here. Not only did he actually reply to a question, which a lot of tutorials on youtube would never do, he even offered a Google Meeting and helped me find out where my mistake is.
So if you ever see:
{
"error": "unauthorized_client",
"error_description": "INVALID_CREDENTIALS: Invalid client credentials"
}
make sure your client_id is written as client_id and not as client-id.
What did I learn? I really need to zoom in and look very closely.
The tutorial works perfectly fine if you follow it perfectly.
Big thumbs up to a channel that takes what it does seriously!

horstweinert
Автор

This is immensely more helpful than the docs! Thank you!

farisdurrani
Автор

My brother you are my HERO! Greatings from Poland :)

JovianPug
Автор

really good tutorial. I've spent 5h searching for that solution. This video helped me in 7 min, wow !

RubberDuckLearning
Автор

I can't change the attribute "enabled" sending a request from Spring Boot to the Rest Api of Keycloak. What should I take into account to do it? When I use Postman, everything is fine, but in my code I can only get access token and I can't send request to Rest Api, it returns 401 error.

Автор

How to bypass keyclock login from your react. I have a react application where i already have a login and i don't want to let clients log in again for keyclock. I want to have a menu item on my dashboard in react.js project and when someone clicks it redirects to keylock without login again.

TechMentors-PK
Автор

Hi, so I got the access token and refresh token using the 'token_endpoint' url. How to make a login after getting this without redirecting to the keycloak login page? Can you help me with this please?

BharathBattula
Автор

Thanks a lot! Please continue your playlist with more complex authentication like custom X509, may be create a premium course I would definitely enroll. 🙏🏽

abhishekk
Автор

RESTEASY003210 COULD NOT FIND RESOURCES FOR FULL PATH THIS ERROR COMMING PLZ HELP

nishantnotani
Автор

hi thank you, do you have any example using Keycloak implementing CIBA flow and postman

sergiogomez
Автор

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

UnDevMas
Автор

Hi, wanted to know in case we have selected client access type as confidential then post man given error while connecting saying "client secret is missing" ..Which attribute I need to add in body to make the successful connection ...?

diwakergoswami
Автор

Thank you -- this was very helpful.

Would it be possible to have the permissions attached to the client? I.e. grant 'realm admin' role to the 'rest client? And set the 'rest-client' to 'confidential'?

The above scenario for if an application is required to call the rest apis.

arilebon
Автор

this doesn't work for me for some reason. response says that it cannot find the resource for the path. any idea how to fix this?

heycarlxyz
Автор

Hi, Your video was very helpfull
In my case to create a new user, I used Post request and body raw. But Keycloak return a response of a list users like GET request!
can you please explain how to resolved it...

inhdoanviet
Автор

In my case to fetch all user.. it's throw error..
Http 401 unauthorised.
can you please explain how to resolved it...

motounzip
Автор

Hello. That was very helpful, but can i get all the configuration data from KeyCloak including realms, users, roles, and groups in one http request? Which endpoind should i use?

vitamin
Автор

For events API im getting 403 forbidden. pls help?

NimmyZo
Автор

@hexadefence buenas noches. He podido crea una aplicacion en electron.js (aplicacion de escritorio) el cual genera nuevos usuarios en un servidor keycloak. La pregunta es la siguiente ¿que api p proceso tengo que hacer para poder loguear un usuario a mi aplicacion usando cualquiera de los 1000 usuarios que cree? Muchas gracias.

fe
Автор

Suppose a user is signed up for the application so how i register that user to keycloak server

manojpatidar
join shbcf.ru