On this page
user.resettotp
Description
object user.resettotp(object/array users)
This method allows to reset user TOTP secrets.
This method is only available to Super admin user type. Permissions to call the method can be revoked in user role settings. See User roles for more information.
Parameters
(array) IDs of users for which to reset TOTP secrets.
User sessions for the specified users will also be deleted (except for the user sending the request).
Return values
(object) Returns an object containing the IDs of the users for which TOTP secrets have been reset, under the userids property.
Examples
Resetting TOTP secrets for multiple users
Reset TOTP secrets for two users.
{
"jsonrpc": "2.0",
"method": "user.resettotp",
"params": [
"1",
"5"
],
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": {
"userids": [
"1",
"5"
]
},
"id": 1
}
See also
Source
CUser::resettotp() in ui/include/classes/api/services/CUser.php.