Verify and enable TOTP

POSThttps://app.speybooks.com/api/v1/auth/totp/enable

Verify a six-digit code against the secret from setup and activate TOTP. Once enabled, future logins require a TOTP code. Returns an error if setup has not been run, TOTP is already enabled, or the code is invalid.

Body parameters

tokenstringrequired
Six-digit TOTP code from the authenticator app to verify setup.
min length: 6 · max length: 6

Response

200TOTP enabled. Future logins will require a TOTP code.

Error codes

400No pending secret (run /totp/setup first), TOTP already enabled, or invalid code.