HomeGuidesAPI Reference
API Reference

Reset user password

Resets a user's password using a reset token from an email link or by providing a username. Also allows updating two-factor authentication settings and generating a new TOTP key.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Password reset details including new password and TFA settings.

Request body for resetting a user's password. Requires either 'id' (from email reset link) or 'username' to identify the user.

string

Reset password token from the email link. Either 'id' or 'username' must be provided. Token expires after 4 days.

string

Username to reset password for. Used when 'id' is not provided. Either 'id' or 'username' must be provided.

password
required
length between 8 and 64

New password. Must be 8-64 characters with uppercase, lowercase, digit, and special character. Cannot contain username.

password
required

Must match the password field exactly for confirmation.

boolean
Defaults to false

Enable email-based two-factor authentication. Sends a code to user's email on login.

boolean
Defaults to false

Enable app-based (TOTP) two-factor authentication. Uses authenticator apps like Google Authenticator.

boolean
Defaults to false

Generate a new TOTP secret key. Returns a QR code in the response when true and tfaApp is enabled.

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json