[POST] .../v1/user/passwordchange
Changes a user password Use this workflow method to change a user's password after the caller has collected and Base64-encoded the new password value. The method validates user_id, checks the current request user's own-password or other-user password-change permission depending on target user_id, validates password confirmation and Base64 decoding, applies password strength rules, writes the hash, clears active session cache and returns row_affected. The request body is required, user_id must be positive and new_password and new_password_confirm must be identical Base64 strings that decode to the intended plain text password. Missing fields, mismatched passwords, Base64 decoding errors, denied permission, weak password, missing user and database failures are returned as HTTP 200 ErrorResult business errors.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| new_password | String | Required | New user password in Base64. |
| new_password_confirm | String | Required | New user password confirmation in Base64. |
| user_id | Int64 | Required | System user ID. |
Request Example
{
"user_id": 17,
"new_password": "TmV3U2VjdXJlUGFzc3dvcmQhMjM=",
"new_password_confirm": "TmV3U2VjdXJlUGFzc3dvcmQhMjM="
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Update | Update operation result. |
Response Example
{
"ok": true,
"result": {
"row_affected": 1,
"ids": []
}
}