Finishes the TOTP enrollment started with users.enableTotp by validating a code from the authenticator app, and returns the backup codes for the account. The other login tokens of the account are rotated, except personal access tokens.
This endpoint requires two-factor verification. Requests are limited to five per minute.
This endpoint replaces the deprecated 2fa:validateTempToken real-time method, which remains available until 9.0.0.
Changelog
| Version | Description |
|---|---|
| 8.8.0 | Added |
The authToken of the authenticated user.
The userId of the authenticated user.
The 2FA code.
The 2FA method. It can be email, totp, or password.
{
"code": "482913"
}The code shown by the authenticator app for the account.
OK
{
"codes": [
"3f7a1c9d",
"90b2e4a6"
],
"success": true
}The backup codes of the account.
Bad Request
{
"success": false,
"error": "[invalid-totp]",
"errorType": "invalid-totp"
}Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}