Call rest API via postman

I have client account.
With realm HUNGREALM
Server keycloak 192.168.1.68
I want to user rest api get all active sessions, but always “401 Unauthorized”.
Please help me.
Thanks so much!

Hi,

you need to send the Bearer token as “Authorization” header, not as a form field in the payload.
So, the name of the header is “Authorization” and the value of the header is “Bearer ey…”

And, afair, “client_secret” should be the correct field, not “secret”.

Cheers,
Niko

Thanks Dasniko.
I try that, but now it return error: 404 Not Found.
http://192.168.1.88/auth/admin/realms/HUNGREALM/clients/account/user-sessions.
I think path is wrong, but I don’t know how to fix it.
Please help me.
Thanks so much!

Thanks so much.
It’s ok now!

Thanks Hung, how did you resolve 404 ? I am also getting the same error

https://***************/auth/realms/keycloak-demo/clients/om-ui/user-sessions