Update non admin user's profile using REST API

Hi Keycloak community.

May I please ask is there a way to use the REST API to change a user’s profile details (eg. firstName, lastName, username, email etc) using the access token of the user.

I know it’s documented that there’s an admin REST API but is there a client API (non admin) or must everything be done via the admin REST API?

Thanks in advance.

@h4xhor

After a user has successfully logged into your application:

You can redirect them to their Keycloak User Account Service page:

Where they can update their Keycloak account details.

Hi Robinyo, thanks very much for the solution!

@Robinyo So, if I understood you correct, the answer is “NO - You cannot use the REST API with the token of the user - if you want to use the API you have to use the Admin REST API” right?

May I ask, why isn’t there such an API for the user itself? What are the concerns about it?

@webdeb

The only Keycloak REST API I am aware of is the Administration REST API: