Skip to content

Begin TOTP enrollment. Returns the otpauth:// URL, secret, and recovery codes.

POST
/account/security/totp/start
curl --request POST \
--url https://api.siteqwality.com/account/security/totp/start \
--header 'Authorization: Bearer <token>'

TOTP enrollment payload

Media type application/json
object
secret
required

Base32-encoded TOTP secret (for “enter manually” UX).

string
qr_code_url
required

otpauth:// URL, rendered as a QR code on the client.

string
recovery_codes
required

One-time recovery codes. Shown once; never recoverable.

Array<string>
Example generated
{
"secret": "example",
"qr_code_url": "example",
"recovery_codes": [
"example"
]
}

Missing or invalid authentication

Endpoint requires a user session

Internal server error

Stytch API call failed