Skip to main content

Change user password

PUT 

/user/reset_password

Sets a new password for the user. Two authentication modes are supported:

Code-based (default) Provide email, the one-time code received by email (from POST /user/reset_password), and new_password.

JWT-based (optional) When "Allow Reset Password with JWT" is enabled in the plugin settings, provide a valid JWT and new_password. The code field is not required in this mode. Note: JWTs that were themselves issued via a reset-password flow cannot be reused to change a password again.

Sessions are revoked (when the authorization.revoke_on_password_change setting is on; off by default) After a password change through this endpoint or wp-login.php (and, on WordPress 5.8+, the user profile, the admin or /wp/v2/users), the user's refresh tokens are deleted and every JWT issued before the change (older iat, or no iat) is rejected with error code 55. Log in again to get a new JWT.

Requirements

  • Password reset must be enabled in the plugin settings.
  • If "Reset Password Requires Auth Code" is enabled, AUTH_KEY must be provided.

Request​

Responses​

Password changed. The body can be changed with the simple_jwt_login_response_change_user_password filter.