# TOTPApi

All URIs are relative to _http://localhost_

| Method                                            | HTTP request                  | Description              |
| ------------------------------------------------- | ----------------------------- | ------------------------ |
| [**apiUserTotpImageGet**](#apiusertotpimageget)   | **GET** /api/user/totp/image  | 查看两步验证图像         |
| [**apiUserTotpResetPost**](#apiusertotpresetpost) | **POST** /api/user/totp/reset | 重置两步验证             |
| [**apiUserTotpSetPost**](#apiusertotpsetpost)     | **POST** /api/user/totp/set   | 设置二步验证             |
| [**apiUserTotpStatusGet**](#apiusertotpstatusget) | **GET** /api/user/totp/status | 确认当前用户是否开启totp |

# **apiUserTotpImageGet**

> KamiApiSysUserV1TotpImageGetRes apiUserTotpImageGet()

### Example

```typescript
import { TOTPApi, Configuration } from './api';

const configuration = new Configuration();
const apiInstance = new TOTPApi(configuration);

let code: string; // (default to undefined)

const { status, data } = await apiInstance.apiUserTotpImageGet(code);
```

### Parameters

| Name     | Type         | Description | Notes                 |
| -------- | ------------ | ----------- | --------------------- |
| **code** | [**string**] |             | defaults to undefined |

### Return type

**KamiApiSysUserV1TotpImageGetRes**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **200**     |             | -                |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **apiUserTotpResetPost**

> KamiApiSysUserV1TotpResetRes apiUserTotpResetPost()

### Example

```typescript
import { TOTPApi, Configuration, KamiApiSysUserV1TotpResetReq } from './api';

const configuration = new Configuration();
const apiInstance = new TOTPApi(configuration);

let kamiApiSysUserV1TotpResetReq: KamiApiSysUserV1TotpResetReq; // (optional)

const { status, data } = await apiInstance.apiUserTotpResetPost(
  kamiApiSysUserV1TotpResetReq
);
```

### Parameters

| Name                             | Type                             | Description | Notes |
| -------------------------------- | -------------------------------- | ----------- | ----- |
| **kamiApiSysUserV1TotpResetReq** | **KamiApiSysUserV1TotpResetReq** |             |       |

### Return type

**KamiApiSysUserV1TotpResetRes**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **200**     |             | -                |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **apiUserTotpSetPost**

> object apiUserTotpSetPost()

### Example

```typescript
import { TOTPApi, Configuration, KamiApiSysUserV1TotpSetReq } from './api';

const configuration = new Configuration();
const apiInstance = new TOTPApi(configuration);

let kamiApiSysUserV1TotpSetReq: KamiApiSysUserV1TotpSetReq; // (optional)

const { status, data } = await apiInstance.apiUserTotpSetPost(
  kamiApiSysUserV1TotpSetReq
);
```

### Parameters

| Name                           | Type                           | Description | Notes |
| ------------------------------ | ------------------------------ | ----------- | ----- |
| **kamiApiSysUserV1TotpSetReq** | **KamiApiSysUserV1TotpSetReq** |             |       |

### Return type

**object**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **200**     |             | -                |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **apiUserTotpStatusGet**

> KamiApiSysUserV1TotpStatusGetRes apiUserTotpStatusGet()

### Example

```typescript
import { TOTPApi, Configuration } from './api';

const configuration = new Configuration();
const apiInstance = new TOTPApi(configuration);

const { status, data } = await apiInstance.apiUserTotpStatusGet();
```

### Parameters

This endpoint does not have any parameters.

### Return type

**KamiApiSysUserV1TotpStatusGetRes**

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
| ----------- | ----------- | ---------------- |
| **200**     |             | -                |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
