Saltar al contenido principal

Change Password Execute Explorer - Step 2

Execute password change with validation token.

PATCH/auth/account/password

Description

Execute password change using validation token from Step 1. Requires current password, new password, and 2FA code if enabled.

Parameters

Current password
New password (min 9 chars, uppercase, lowercase, number, special char)
Validation token from Step 1 (UUID v4)
6-digit TOTP code (only if 2FA enabled)

Responses

1003 Response

Password updated successfully - Password changed and session cleaned.

4006 Response

Missing required data - validationToken, password, or newPassword missing.

4015 Response

Invalid or expired session - Validation token expired or not found (5 min validity).

4007 Response

Invalid current password - Current password incorrect.

4008 Response

New password does not meet requirements - Password too weak or same as current.

4027 Response

Two-factor authentication code is required - User has 2FA enabled but code not provided.

4003 Response

Invalid 2FA code - TOTP code incorrect or expired.

401 Unauthorized

Unauthorized - Valid JWT token required in Authorization header.

Test Request
https://www.swapbits.site/api
curl -X PATCH "https://www.swapbits.site/api/auth/account/password" \
  -H "Content-Type: application/json"