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

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

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

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

このメソッドは、ユーザーのTOTPシークレットをリセットします。

::: noteclassic
このメソッドは、*スーパー管理者*ユーザータイプでのみ使用できます。
このメソッドを呼び出す権限は、ユーザーロール設定で取り消すことができます。
詳しくは、[ユーザーの役割](/manual/web_interface/frontend_sections/users/user_roles)をご覧ください。
:::

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

[comment]: # ({c8b7ac78-eed4792f})
### パラメータ

`(配列)` TOTPシークレットをリセットするユーザーのID

::: noteclassic
指定されたユーザーのユーザーセッションも削除されます（リクエストを送信したユーザーを除く）。
:::

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

[comment]: # ({261f8ac9-664dd395})
### 戻り値

`(object)` TOTPシークレットがリセットされたユーザーのIDを`userids`プロパティに格納したオブジェクトを返します。

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

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

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

[comment]: # ({f5ef228d-9fb090fd})
#### 複数のユーザーのTOTPシークレットのリセット

2人のユーザーのTOTPシークレットをリセットします。

[リクエスト](/manual/api#performing-requests) :

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

レスポンス :

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

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

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

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

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

[comment]: # ({646dbdd5-5ddc468d})
### ソース

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

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