Verify a TOTP code and complete enrollment.
POST
/account/security/totp/complete
const url = 'https://api.siteqwality.com/account/security/totp/complete';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"totp_code":"example"}'};
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/complete \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "totp_code": "example" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
totp_code
required
6-digit code from the user’s authenticator app.
string
Example generated
{ "totp_code": "example"}Responses
Section titled “ Responses ”TOTP enrollment complete
Media type application/json
object
ok
required
boolean
Example generated
{ "ok": true}Invalid TOTP code
Missing or invalid authentication
Endpoint requires a user session
Internal server error
Stytch API call failed