How to reset user password in keycloak using REST API

I want to make a rest call to my Keycloak server.

According to doc it should be easy:

So before I’ll start codeing I want to prepare Postman call, so my url is


in raw body I’m providing [‘UPDATE_PASSWORD’]

and what I get is 401 Unauthorized and I can’t get what I’m doing wrong?


Headers are default:

Ok I’ve make this working.

I’ll post what I did.

  1. Get token for master realm admin account:


  1. Call reset password service in test realm

I’ve had wrong body so correct body for this request is [“UPDATE_PASSWORD”] and You can notice 204 in the right bottom corner.

The second question is, is it possible to have special user in a realm, not master realm admin for getting a token?

1 Like

I have followed the same steps but still I am getting 500 error. I do not understand what I am doing wrong. Do I need to configure anything. Please help.

Here is a link of the post I have already posted earlier:

Thanks in advance.

Is your smtp configuration good in Realm Settings > Email ? Did you check the server logs ? Does the targeted user have a defined email ?

Yes, I have configured SMTP settings (screenshot attached below), but the test connection also gives 500.

Also, the targeted user has a defined email.

I see that you want to use a gmail account and obviously you have not filled everything correctly, look at this article : GMail SMTP Server (Google) - How to Configure & Send Emails for Free? - SiteGround KB And you need Less secure app access on you google account. Less secure apps & your Google Account - Google Account Help


It worked.

Thank you so much.

1 Like