Api REST "HTTP 401 Unauthorized" error

2,196 views
Skip to first unread message

Alberto Daniotti

unread,
Oct 14, 2021, 4:07:09 AM10/14/21
to Keycloak User
Hi,  
I'm trying the API Rest fo Keycloak but I obtain always  "HTTP 401 Unauthorized" response.
I'm using keycloak server version 15.0.2, the requests are made with powershell script or postman or curl.
I tryed both with master realm and with new one. The new realm use default settings.
I obtained successfully token both with confidential mode and password mode.
I can't access to resource with paths http://localhost:8080/auth/admin/{realm}/{path_to_resource}
I think that I must configure some permissions for access to that path but i don't know where or how.

Someone could explain me how to do. If are necessary other information, ask me!

Thanks for support

Alberto

Fabio Abreu

unread,
Nov 3, 2021, 9:31:16 PM11/3/21
to Keycloak User
I have the same problem Alberto, you resolved it??

Mark Kasimu

unread,
Nov 22, 2021, 7:58:11 AM11/22/21
to Keycloak User
Try, First get an admin user access token ,then use the token as bearer token in authorization header of your request.

Raja Emmadi

unread,
Mar 5, 2022, 11:46:34 PM3/5/22
to Keycloak User

Having the same issue.  Getting 401 Unauthorized response from the server.
Reply all
Reply to author
Forward
0 new messages