[comment]: # ({9773f653-4af7a213})
# user.resettotp

[comment]: # ({/9773f653-4af7a213})

[comment]: # ({2f760ecf-1d5cf984})
### Description

`object user.resettotp(object/array users)`

This method allows to reset user TOTP secrets.

::: noteclassic
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](/manual/web_interface/frontend_sections/users/user_roles) for more information.
:::

[comment]: # ({/2f760ecf-1d5cf984})

[comment]: # ({c8b7ac78-eed4792f})
### Parameters

`(array)` IDs of users for which to reset TOTP secrets.

::: noteclassic
User sessions for the specified users will also be deleted (except for the user sending the request).
:::

[comment]: # ({/c8b7ac78-eed4792f})

[comment]: # ({261f8ac9-664dd395})
### Return values

`(object)` Returns an object containing the IDs of the users for which TOTP secrets have been reset, under the `userids` property.

[comment]: # ({/261f8ac9-664dd395})

[comment]: # ({b41637d2-40f7edfd})
### Examples

[comment]: # ({/b41637d2-40f7edfd})

[comment]: # ({f5ef228d-9fb090fd})
#### Resetting TOTP secrets for multiple users

Reset TOTP secrets for two users.

[Request](/manual/api#performing-requests):

```json
{
    "jsonrpc": "2.0",
    "method": "user.resettotp",
    "params": [
        "1",
        "5"
    ],
    "id": 1
}
```

Response:

```json
{
    "jsonrpc": "2.0",
    "result": {
        "userids": [
            "1",
            "5"
        ]
    },
    "id": 1
}
```

[comment]: # ({/f5ef228d-9fb090fd})

[comment]: # ({5bd16955-0c80b38e})
### See also

-   [MFA object](/manual/api/reference/mfa/object)

[comment]: # ({/5bd16955-0c80b38e})

[comment]: # ({646dbdd5-5ddc468d})
### Source

CUser::resettotp() in *ui/include/classes/api/services/CUser.php*.

[comment]: # ({/646dbdd5-5ddc468d})
