# Change Password
## Endpoint
`/api/user/changePassword`
**Obsolete Path:** `/api/changePassword`
## Method
GET
## Description
Allows changing the password for the current logged in user account. It is highly recommended to change the `admin` user password on first use to avoid security related issues.
## Parameters
| `token` | string | Yes | - | The session token generated **only** by the `login` call (API tokens from `createToken` cannot be used). |
| `pass` | string | Yes | - | The current password for the currently logged in user. |
| `newPass` | string | Yes | - | The new password to be set for the currently logged in user. |
| `totp` | string | No | Required if the user account has Two Factor Authentication (2FA) enabled | The 6-digit code from the authenticator app. |
| `iterations` | integer | No | - | The number of iterations for PBKDF2 SHA256 password hashing. |
## Authentication
Requires a session token from the `login` call ONLY. API tokens from `createToken` are explicitly disallowed for this endpoint.
## Response Fields
| `status` | string | `"ok"` on success. |
## Conditional Logic Notes
- This endpoint can ONLY be called with a session token obtained from `/api/user/login`. Tokens generated by `/api/user/createToken` are not permitted.
- If the user has 2FA enabled, the `totp` parameter becomes required for the password change to succeed.
- The `iterations` parameter allows tuning the PBKDF2 SHA256 hashing strength; when omitted the server uses its default value.
## Edge Cases
- The obsolete path `/api/changePassword` is still supported but deprecated.
- API tokens (from `createToken`) are explicitly blocked from using this endpoint -- this is a security restriction to prevent automation scripts from changing account passwords.
- The current password (`pass`) must be provided even though the user is already authenticated via token, serving as a re-authentication step.
- The `iterations` parameter is an advanced option for controlling password hashing strength and can likely be omitted in most use cases.