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

## Type Aliases

### AccountInfo

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

Defined in: [recipe/accountlinking/types.ts:175](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L175)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="email"></a> `email?` | `string` | [recipe/accountlinking/types.ts:176](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L176) |
| <a id="phonenumber"></a> `phoneNumber?` | `string` | [recipe/accountlinking/types.ts:177](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L177) |
| <a id="thirdparty"></a> `thirdParty?` | `object` | [recipe/accountlinking/types.ts:178](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L178) |
| `thirdParty.id` | `string` | [recipe/accountlinking/types.ts:179](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L179) |
| `thirdParty.userId` | `string` | [recipe/accountlinking/types.ts:180](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L180) |
| <a id="webauthn"></a> `webauthn?` | `object` | [recipe/accountlinking/types.ts:182](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L182) |
| `webauthn.credentialIds` | `string`[] | [recipe/accountlinking/types.ts:183](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L183) |

***

### AccountInfoInput

```ts check=false reason="Generated API signature"
type AccountInfoInput = Omit<AccountInfo, "webauthn"> & object;
```

Defined in: [recipe/accountlinking/types.ts:187](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L187)

#### Type Declaration

| Name | Type | Defined in |
| ------ | ------ | ------ |
| `webauthn?` | `object` | [recipe/accountlinking/types.ts:188](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L188) |
| `webauthn.credentialId` | `string` | [recipe/accountlinking/types.ts:189](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L189) |

***

### AccountInfoWithRecipeId

```ts check=false reason="Generated API signature"
type AccountInfoWithRecipeId = object & AccountInfo;
```

Defined in: [recipe/accountlinking/types.ts:193](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L193)

#### Type Declaration

| Name | Type | Defined in |
| ------ | ------ | ------ |
| `recipeId` | `"emailpassword"` \| `"thirdparty"` \| `"passwordless"` \| `"webauthn"` | [recipe/accountlinking/types.ts:194](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L194) |

***

### RecipeInterface

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

Defined in: [recipe/accountlinking/types.ts:71](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L71)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="cancreateprimaryuser"></a> `canCreatePrimaryUser` | (`input`) => `Promise`\< \| \{ `status`: `"OK"`; `wasAlreadyAPrimaryUser`: `boolean`; \} \| \{ `description`: `string`; `primaryUserId`: `string`; `status`: \| `"RECIPE_USER_ID_ALREADY_LINKED_WITH_PRIMARY_USER_ID_ERROR"` \| `"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"`; \}\> | [recipe/accountlinking/types.ts:84](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L84) |
| <a id="canlinkaccounts"></a> `canLinkAccounts` | (`input`) => `Promise`\< \| \{ `accountsAlreadyLinked`: `boolean`; `status`: `"OK"`; \} \| \{ `description`: `string`; `primaryUserId`: `string`; `status`: `"RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"`; \} \| \{ `description`: `string`; `primaryUserId`: `string`; `status`: `"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"`; \} \| \{ `status`: `"INPUT_USER_IS_NOT_A_PRIMARY_USER"`; \}\> | [recipe/accountlinking/types.ts:113](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L113) |
| <a id="createprimaryuser"></a> `createPrimaryUser` | (`input`) => `Promise`\< \| \{ `status`: `"OK"`; `user`: [`User`](types#user); `wasAlreadyAPrimaryUser`: `boolean`; \} \| \{ `primaryUserId`: `string`; `status`: `"RECIPE_USER_ID_ALREADY_LINKED_WITH_PRIMARY_USER_ID_ERROR"`; \} \| \{ `description`: `string`; `primaryUserId`: `string`; `status`: `"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"`; \}\> | [recipe/accountlinking/types.ts:97](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L97) |
| <a id="deleteuser"></a> `deleteUser` | (`input`) => `Promise`\<\{ `status`: `"OK"`; \}\> | [recipe/accountlinking/types.ts:168](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L168) |
| <a id="getuser"></a> `getUser` | (`input`) => `Promise`\<[`User`](types#user) \| `undefined`\> | [recipe/accountlinking/types.ts:161](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L161) |
| <a id="getusers"></a> `getUsers` | (`input`) => `Promise`\<\{ `nextPaginationToken?`: `string`; `users`: [`User`](types#user)[]; \}\> | [recipe/accountlinking/types.ts:72](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L72) |
| <a id="linkaccounts"></a> `linkAccounts` | (`input`) => `Promise`\< \| \{ `accountsAlreadyLinked`: `boolean`; `status`: `"OK"`; `user`: [`User`](types#user); \} \| \{ `primaryUserId`: `string`; `status`: `"RECIPE_USER_ID_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"`; `user`: [`User`](types#user); \} \| \{ `description`: `string`; `primaryUserId`: `string`; `status`: `"ACCOUNT_INFO_ALREADY_ASSOCIATED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR"`; \} \| \{ `status`: `"INPUT_USER_IS_NOT_A_PRIMARY_USER"`; \}\> | [recipe/accountlinking/types.ts:136](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L136) |
| <a id="listusersbyaccountinfo"></a> `listUsersByAccountInfo` | (`input`) => `Promise`\<[`User`](types#user)[]\> | [recipe/accountlinking/types.ts:162](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L162) |
| <a id="unlinkaccount"></a> `unlinkAccount` | (`input`) => `Promise`\<\{ `status`: `"OK"`; `wasLinked`: `boolean`; `wasRecipeUserDeleted`: `boolean`; \}\> | [recipe/accountlinking/types.ts:156](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L156) |

***

### RecipeLevelUser

```ts check=false reason="Generated API signature"
type RecipeLevelUser = object & AccountInfoWithRecipeId;
```

Defined in: [recipe/accountlinking/types.ts:197](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L197)

#### Type Declaration

| Name | Type | Defined in |
| ------ | ------ | ------ |
| `recipeUserId` | [`RecipeUserId`](index#recipeuserid-1) | [recipe/accountlinking/types.ts:200](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L200) |
| `tenantIds` | `string`[] | [recipe/accountlinking/types.ts:198](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L198) |
| `timeJoined` | `number` | [recipe/accountlinking/types.ts:199](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L199) |

***

### TypeInput

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

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

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="onaccountlinked"></a> `onAccountLinked?` | (`user`, `newAccountInfo`, `userContext`) => `Promise`\<`void`\> | [recipe/accountlinking/types.ts:22](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L22) |
| <a id="override"></a> `override?` | `object` | [recipe/accountlinking/types.ts:38](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L38) |
| `override.functions?` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | [recipe/accountlinking/types.ts:39](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L39) |
| <a id="shoulddoautomaticaccountlinking"></a> `shouldDoAutomaticAccountLinking?` | (`newAccountInfo`, `user`, `session`, `tenantId`, `userContext`) => `Promise`\< \| \{ `shouldAutomaticallyLink`: `false`; \} \| \{ `shouldAutomaticallyLink`: `true`; `shouldRequireVerification`: `boolean`; \}\> | [recipe/accountlinking/types.ts:23](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L23) |

***

### TypeNormalisedInput

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

Defined in: [recipe/accountlinking/types.ts:46](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L46)

#### Properties

| Property | Type | Defined in |
| ------ | ------ | ------ |
| <a id="onaccountlinked-1"></a> `onAccountLinked` | (`user`, `newAccountInfo`, `userContext`) => `Promise`\<`void`\> | [recipe/accountlinking/types.ts:47](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L47) |
| <a id="override-1"></a> `override` | `object` | [recipe/accountlinking/types.ts:63](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L63) |
| `override.functions` | (`originalImplementation`, `builder`) => [`RecipeInterface`](#recipeinterface) | [recipe/accountlinking/types.ts:64](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L64) |
| <a id="shoulddoautomaticaccountlinking-1"></a> `shouldDoAutomaticAccountLinking` | (`newAccountInfo`, `user`, `session`, `tenantId`, `userContext`) => `Promise`\< \| \{ `shouldAutomaticallyLink`: `false`; \} \| \{ `shouldAutomaticallyLink`: `true`; `shouldRequireVerification`: `boolean`; \}\> | [recipe/accountlinking/types.ts:48](https://github.com/supertokens/supertokens-node/blob/8353a9a70d8b17dd9ff6ffe41201fa2ef0e60218/lib/ts/recipe/accountlinking/types.ts#L48) |
