Reset 2FA via TOTP for a user in the workspace. Make sure that the Enable Two Factor Authentication setting is enabled under Manage > Workspace > Settings > Accounts > Two Factor Authentication.
- Permission required:
edit-other-user-totp. - It requires two-factor authentication, if 2FA is enabled and configured in your workspace.
Changelog
| Version | Description |
|---|---|
| 3.6.0 | Added |
The authenticated user token.
The authenticated user ID.
Enter the 2FA code. This parameter is required if 2FA is enabled in your workspace. See the Introduction to Two-Factor Authentication document for details.
Enter the method with which you get the 2FA code. It can be email, totp, or password. This parameter is required if 2FA is enabled in your workspace.
{
"userId": "GonjPyg3gB3Z9ur9s"
}The userId of the user whose TOTP you want to reset. You can also use the username. If you do not enter a value, the sender's TOTP is reset.
OK
{
"success": true
}Bad Request
{
"success": false,
"error": "TOTP Required [totp-required]",
"errorType": "totp-required",
"details": {
"method": "password",
"codeGenerated": false,
"availableMethods": []
}
}{
"success": false,
"error": "Not allowed [error-not-allowed]",
"errorType": "error-not-allowed"
}{
"success": false,
"error": "The required \"userId\" or \"username\" param provided does not match any users [error-invalid-user]",
"errorType": "error-invalid-user"
}Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}