Begin TOTP enrollment. Returns the otpauth:// URL, secret, and recovery codes.
POST
/account/security/totp/start
const url = 'https://api.siteqwality.com/account/security/totp/start';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.siteqwality.com/account/security/totp/start \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”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