Skip to content

Setup OTP

POST/web/v1/users/self/security/mfa/otp/setup JWT

Initializes TOTP (Time-based One-Time Password) setup by generating a secret key and QR code URI for the user's authenticator app. The secret is only returned once.

Required Headers

HeaderExample ValueDescription
Content-Typeapplication/jsonRequest content type
Acceptapplication/jsonExpected response type
X-Client-HashClient device fingerprint
Accept-Languageen, zh, zh-Hant, ja, viResponse language (default: en)
AuthorizationBearerJWT access token
X-SC-Session-IdSecure channel session ID

Request Parameters

No request parameters required.

Success Response

Success 200
{
  "version": "1.3.0",
  "timestamp": 1709337600000,
  "success": true,
  "code": "2000",
  "message": "SUCCESS",
  "data": {
    "secret": "JBSWY3DPEHPK3PXP",
    "qrCodeUri": "otpauth://totp/SlaunchX:user@example.com?secret=JBSWY3DPEHPK3PXP&issuer=SlaunchX",
    "issuer": "SlaunchX",
    "accountName": "user@example.com"
  }
}

Error Responses

Unauthorized 401
{
  "success": false,
  "code": "4010",
  "message": "Invalid or expired token"
}

Notes

  • The secret and QR code URI are only returned once.
  • After verification, the secret is encrypted and stored; it cannot be retrieved again.
  • Rate limited to 5 requests per 300-second window.
  • Use the QR code URI with any TOTP-compatible authenticator app.

SlaunchX Internal Documentation