Confirm TOTP enrollment
POST
/_torii/mfa/totp/confirm
const url = 'https://your-app.torii.so/_torii/mfa/totp/confirm';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"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://your-app.torii.so/_torii/mfa/totp/confirm \ --header 'Content-Type: application/json' \ --data '{ "code": "example" }'Verifies the first code, activates the factor, and returns single-use recovery codes (shown once).
Request Body required
Section titled “Request Body required ” Media type application/json
object
code
required
string
Example generated
{ "code": "example"}Responses
Section titled “ Responses ”OK
Media type application/json
object
Example generated
{}