Updating a user via Rest API - postman

Hii All!

Need help on updating the user password using REST API’S.

I want to update/change a user details(like name or password) of a existing user via API(postman)

Can any one help me on how to approach this,

tried by 2 ways

  1. update the user - API &
  2. set up a new password for user

getting the below while trying to achieve this for both API’S;

{
“error”: “HTTP 401 Unauthorized”
}

Generate token for the user

{{url}}/realms/master/protocol/openid-connect/token

yes, i have obtained the access token
. but getting unknown error and unauthorized error

We need to pass the Header
Authorization : Bearer {token}