OPNexusdocs

API: auth

GET /api/auth/2fa#

Totp Status

Any signed-in account (its own settings) · browser session only, no API token

Response 200

POST /api/auth/2fa/disable#

Totp Disable

Any signed-in account (its own settings) · browser session only, no API token

Request body TotpDisableRequest

Show 2 fields
FieldTypeNotes
code *stringminLength 1, maxLength 32
password *stringminLength 1, maxLength 1024

Response 200

POST /api/auth/2fa/enable#

Totp Enable

Any signed-in account (its own settings) · browser session only, no API token

Request body TotpEnableRequest

Show 1 fields
FieldTypeNotes
code *stringminLength 1, maxLength 32

Response 200

POST /api/auth/2fa/setup#

Totp Setup

Step 1: needs the current password (a stolen session alone must not be able to add an attacker's authenticator). Returns the secret to scan; nothing is active until /2fa/enable proves the authenticator works.

Any signed-in account (its own settings) · browser session only, no API token

Request body TotpSetupRequest

Show 1 fields
FieldTypeNotes
password *stringminLength 1, maxLength 1024

Response 200

POST /api/auth/change-password#

Change Password

Any signed-in account (its own settings) · browser session only, no API token

Request body ChangePasswordRequest

Show 2 fields
FieldTypeNotes
current_password *stringminLength 1, maxLength 1024
new_password *stringminLength 10, maxLength 1024

Response 200

POST /api/auth/login#

Login

No sign-in needed

Request body LoginRequest

Show 3 fields
FieldTypeNotes
password *stringminLength 1, maxLength 1024
totp_codestring | null
username *stringminLength 1, maxLength 150

Response 200

POST /api/auth/logout#

Logout

No sign-in needed

Response 200

GET /api/auth/me#

Me

No sign-in needed

Response 200