---
title: supertokens-node/recipe/totp/types
description: References documentation for the supertokens-node/recipe/totp/types package
sidebar:
  order: 320
---

## Type Aliases

### APIInterface

```ts check=false reason="Generated API signature"
type APIInterface = object;
```

Defined in: [recipe/totp/types.ts:149](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L149)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="createdevicepost"></a> `createDevicePOST` | \| `undefined` \| (`input`) => `Promise`\< \| \{ `deviceName`: `string`; `qrCodeString`: `string`; `secret`: `string`; `status`: `"OK"`; \} \| \{ `status`: `"DEVICE_ALREADY_EXISTS_ERROR"`; \} \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/totp/types.ts:150](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L150) |
| <a id="listdevicesget"></a> `listDevicesGET` | \| `undefined` \| (`input`) => `Promise`\< \| \{ `devices`: `object`[]; `status`: `"OK"`; \} \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/totp/types.ts:170](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L170) |
| <a id="removedevicepost"></a> `removeDevicePOST` | \| `undefined` \| (`input`) => `Promise`\< \| \{ `didDeviceExist`: `boolean`; `status`: `"OK"`; \} \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/totp/types.ts:185](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L185) |
| <a id="verifydevicepost"></a> `verifyDevicePOST` | \| `undefined` \| (`input`) => `Promise`\< \| \{ `status`: `"OK"`; `wasAlreadyVerified`: `boolean`; \} \| \{ `status`: `"UNKNOWN_DEVICE_ERROR"`; \} \| \{ `currentNumberOfFailedAttempts`: `number`; `maxNumberOfFailedAttempts`: `number`; `status`: `"INVALID_TOTP_ERROR"`; \} \| \{ `retryAfterMs`: `number`; `status`: `"LIMIT_REACHED_ERROR"`; \} \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/totp/types.ts:200](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L200) |
| <a id="verifytotppost"></a> `verifyTOTPPOST` | \| `undefined` \| (`input`) => `Promise`\< \| \{ `status`: `"OK"` \| `"UNKNOWN_USER_ID_ERROR"`; \} \| \{ `currentNumberOfFailedAttempts`: `number`; `maxNumberOfFailedAttempts`: `number`; `status`: `"INVALID_TOTP_ERROR"`; \} \| \{ `retryAfterMs`: `number`; `status`: `"LIMIT_REACHED_ERROR"`; \} \| [`GeneralErrorResponse`](types#generalerrorresponse)\> | [recipe/totp/types.ts:228](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L228) |

***

### APIOptions

```ts check=false reason="Generated API signature"
type APIOptions = object;
```

Defined in: [recipe/totp/types.ts:140](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L140)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="config"></a> `config` | [`TypeNormalisedInput`](#typenormalisedinput) | [recipe/totp/types.ts:142](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L142) |
| <a id="isinserverlessenv"></a> `isInServerlessEnv` | `boolean` | [recipe/totp/types.ts:144](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L144) |
| <a id="recipeid"></a> `recipeId` | `string` | [recipe/totp/types.ts:143](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L143) |
| <a id="recipeimplementation"></a> `recipeImplementation` | [`RecipeInterface`](#recipeinterface) | [recipe/totp/types.ts:141](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L141) |
| <a id="req"></a> `req` | `BaseRequest` | [recipe/totp/types.ts:145](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L145) |
| <a id="res"></a> `res` | `BaseResponse` | [recipe/totp/types.ts:146](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L146) |

***

### RecipeInterface

```ts check=false reason="Generated API signature"
type RecipeInterface = object;
```

Defined in: [recipe/totp/types.ts:49](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L49)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="createdevice"></a> `createDevice` | (`input`) => `Promise`\< \| \{ `deviceName`: `string`; `qrCodeString`: `string`; `secret`: `string`; `status`: `"OK"`; \} \| \{ `status`: `"DEVICE_ALREADY_EXISTS_ERROR"`; \} \| \{ `status`: `"UNKNOWN_USER_ID_ERROR"`; \}\> | [recipe/totp/types.ts:58](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L58) |
| <a id="getuseridentifierinfoforuserid"></a> `getUserIdentifierInfoForUserId` | (`input`) => `Promise`\< \| \{ `info`: `string`; `status`: `"OK"`; \} \| \{ `status`: `"UNKNOWN_USER_ID_ERROR"` \| `"USER_IDENTIFIER_INFO_DOES_NOT_EXIST_ERROR"`; \}\> | [recipe/totp/types.ts:50](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L50) |
| <a id="listdevices"></a> `listDevices` | (`input`) => `Promise`\<\{ `devices`: `object`[]; `status`: `"OK"`; \}\> | [recipe/totp/types.ts:87](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L87) |
| <a id="removedevice"></a> `removeDevice` | (`input`) => `Promise`\<\{ `didDeviceExist`: `boolean`; `status`: `"OK"`; \}\> | [recipe/totp/types.ts:96](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L96) |
| <a id="updatedevice"></a> `updateDevice` | (`input`) => `Promise`\<\{ `status`: `"OK"` \| `"UNKNOWN_DEVICE_ERROR"` \| `"DEVICE_ALREADY_EXISTS_ERROR"`; \}\> | [recipe/totp/types.ts:79](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L79) |
| <a id="verifydevice"></a> `verifyDevice` | (`input`) => `Promise`\< \| \{ `status`: `"OK"`; `wasAlreadyVerified`: `boolean`; \} \| \{ `status`: `"UNKNOWN_DEVICE_ERROR"`; \} \| \{ `currentNumberOfFailedAttempts`: `number`; `maxNumberOfFailedAttempts`: `number`; `status`: `"INVALID_TOTP_ERROR"`; \} \| \{ `retryAfterMs`: `number`; `status`: `"LIMIT_REACHED_ERROR"`; \}\> | [recipe/totp/types.ts:100](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L100) |
| <a id="verifytotp"></a> `verifyTOTP` | (`input`) => `Promise`\< \| \{ `status`: `"OK"` \| `"UNKNOWN_USER_ID_ERROR"`; \} \| \{ `currentNumberOfFailedAttempts`: `number`; `maxNumberOfFailedAttempts`: `number`; `status`: `"INVALID_TOTP_ERROR"`; \} \| \{ `retryAfterMs`: `number`; `status`: `"LIMIT_REACHED_ERROR"`; \}\> | [recipe/totp/types.ts:124](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L124) |

***

### TypeInput

```ts check=false reason="Generated API signature"
type TypeInput = object;
```

Defined in: [recipe/totp/types.ts:21](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L21)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="defaultperiod"></a> `defaultPeriod?` | `number` | [recipe/totp/types.ts:24](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L24) |
| <a id="defaultskew"></a> `defaultSkew?` | `number` | [recipe/totp/types.ts:23](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L23) |
| <a id="issuer"></a> `issuer?` | `string` | [recipe/totp/types.ts:22](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L22) |
| <a id="override"></a> `override?` | `object` | [recipe/totp/types.ts:26](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L26) |
| `override.apis?` | (`originalImplementation`, `builder`) => [`APIInterface`](#apiinterface) | [recipe/totp/types.ts:31](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L31) |
| `override.functions?` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | [recipe/totp/types.ts:27](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L27) |

***

### TypeNormalisedInput

```ts check=false reason="Generated API signature"
type TypeNormalisedInput = object;
```

Defined in: [recipe/totp/types.ts:35](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L35)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="defaultperiod-1"></a> `defaultPeriod` | `number` | [recipe/totp/types.ts:38](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L38) |
| <a id="defaultskew-1"></a> `defaultSkew` | `number` | [recipe/totp/types.ts:37](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L37) |
| <a id="issuer-1"></a> `issuer` | `string` | [recipe/totp/types.ts:36](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L36) |
| <a id="override-1"></a> `override` | `object` | [recipe/totp/types.ts:40](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L40) |
| `override.apis` | (`originalImplementation`, `builder`) => [`APIInterface`](#apiinterface) | [recipe/totp/types.ts:45](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L45) |
| `override.functions` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | [recipe/totp/types.ts:41](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/totp/types.ts#L41) |
