Version 2.1.1792967583 · latest Download OpenAPI Markdown

Authentication

Login, token refresh, logout, password change, TOTP, password reset, captcha and admin SSO. Login endpoints need no authentication.

authAuthenticationAuthentication: No auth13 endpoints

Get captcha

GET/api/v2/auth/captcha
Authentication: No auth

Log in

POST/api/v2/auth/login
Authentication: No auth

Request body application/json

FieldTypeRequiredDescription
captcha_codestring— Characters shown in the captcha image
captcha_idstring— Captcha id from GET /auth/captcha; required after repeated failed logins
passwordstringRequired Login password
totp_codestring— Current 6-digit TOTP code, or an unused recovery code (XXXXX-XXXXX, consumed on use); required when the account has TOTP enabled
usernamestringRequired Username
verify_codestring— Second-factor login code. Required when the account has email/SMS code login (login_verify) enabled; obtain it first via POST /verify-codes (purpose=login)

Log out

POST/api/v2/auth/logout
Authentication: User

Change password

PUT/api/v2/auth/password
Authentication: User

Request body application/json

FieldTypeRequiredDescription
new_passwordstringRequired New password, 8 to 128 characters
old_passwordstringRequired Current password

Reset password

POST/api/v2/auth/password-reset
Authentication: No auth

Request body application/json

FieldTypeRequiredDescription
channelstringRequired Recover by email or by phone number
Values ["email","sms"]
codestringRequired Verification code sent to target (POST /verify-codes, purpose=reset_password)
new_passwordstringRequired New password, 8 to 128 characters
targetstringRequired Email or phone number bound to the account

Refresh token

POST/api/v2/auth/refresh
Authentication: No auth

Request body application/json

FieldTypeRequiredDescription
refresh_tokenstringRequired Refresh token, exchanged for a new token pair

Admin SSO login

POST/api/v2/auth/sso
Authentication: No auth

Request body application/json

FieldTypeRequiredDescription
sso_ticketstringRequired Login ticket issued by the super admin: base64url (no padding) bytes of a licwire envelope (kind sso_ticket)

Switch admin to user

POST/api/v2/auth/switch
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
user_idintegerRequired User ID

Log in with a switch ticket

POST/api/v2/auth/switch-login
Authentication: No auth

Request body application/json

FieldTypeRequiredDescription
switch_ticketstringRequired One-time switch ticket obtained by an administrator.

Create a one-time switch ticket

POST/api/v2/auth/switch-ticket
Authentication: Admin only

Request body application/json

FieldTypeRequiredDescription
user_idintegerRequired User ID

Generate TOTP secret

POST/api/v2/auth/totp
Authentication: User

Enable TOTP

PUT/api/v2/auth/totp
Authentication: User

Request body application/json

FieldTypeRequiredDescription
codestringRequired Verification code sent to target (POST /verify-codes, purpose=reset_password)

Disable TOTP

DELETE/api/v2/auth/totp
Authentication: User

Request body application/json

FieldTypeRequiredDescription
codestringRequired Verification code sent to target (POST /verify-codes, purpose=reset_password)

Authentication object

FieldTypeRequiredDescription
access_tokenstring— Access token, sent as Authorization: Bearer
captcha_codestring— Characters shown in the captcha image
captcha_idstring— Captcha id from GET /auth/captcha; required after repeated failed logins
channelstringRequired Recover by email or by phone number
Values ["email","sms"]
codestringRequired Verification code sent to target (POST /verify-codes, purpose=reset_password)
expires_ininteger— Access token lifetime in seconds
idstring— Pass back as captcha_id when logging in; single use, invalidated after one check whether right or wrong
imagestring— PNG data URI
keystring— Base32 secret (returned only once, here)
must_change_passwordboolean— Login response only; true means the account still uses the installer-generated initial password and must change it first.
new_passwordstringRequired New password, 8 to 128 characters
old_passwordstringRequired Current password
otpauth_uristring— otpauth:// URI to add to an authenticator app by scanning
passwordstringRequired Login password
recovery_codesstring[]— Eight one-time recovery codes (XXXXX-XXXXX), returned only once, when TOTP is enabled
refresh_tokenstring— Refresh token, exchanged for a new token pair
sso_ticketstringRequired Login ticket issued by the super admin: base64url (no padding) bytes of a licwire envelope (kind sso_ticket)
switch_ticketstringRequired One-time switch ticket obtained by an administrator.
targetstringRequired Email or phone number bound to the account
token_typestring— Token type, always Bearer
totp_codestring— Current 6-digit TOTP code, or an unused recovery code (XXXXX-XXXXX, consumed on use); required when the account has TOTP enabled
user_idintegerRequired User ID
usernamestringRequired Username
verify_codestring— Second-factor login code. Required when the account has email/SMS code login (login_verify) enabled; obtain it first via POST /verify-codes (purpose=login)