> ## Documentation Index
> Fetch the complete documentation index at: https://docs-dev-feat-sdk-reference-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# MyAccountApiClient

> Client for Auth0 MyAccount API operations.

Provides methods for managing the current user's account:

* Connected accounts (link/unlink external identity providers)
* MFA factors
* Authentication methods (passkeys, phone, email, TOTP) - list, get, update, delete
* Authentication method enrollment (challenge and verify)

## Constructor

```typescript
new MyAccountApiClient(myAccountFetcher: Fetcher<Response>, apiBase: string): MyAccountApiClient
```

### Parameters

<ResponseField name={"myAccountFetcher"} type={"Fetcher<Response>"} required>
  Type: [Fetcher](/docs/sdk/typescript/classes/Fetcher)
</ResponseField>

<ResponseField name={"apiBase"} type={"string"} required />

### Returns

`MyAccountApiClient`

## Methods

### completeAccount()

```typescript
completeAccount(params: CompleteRequest): Promise<CompleteResponse>
```

Verify the redirect from the connect account flow and complete the connecting of the account.

#### Parameters

<ResponseField name={"params"} type={"CompleteRequest"} required>
  Completion parameters including auth session, connect code, and redirect URI

  Type: [CompleteRequest](/docs/sdk/typescript/interfaces/CompleteRequest)
</ResponseField>

#### Returns

`Promise<CompleteResponse>`

A promise that resolves to the completed connected account details

### connectAccount()

```typescript
connectAccount(params: ConnectRequest): Promise<ConnectResponse>
```

Get a ticket for the connect account flow.

#### Parameters

<ResponseField name={"params"} type={"ConnectRequest"} required>
  Connection parameters including connection name and redirect URI

  Type: [ConnectRequest](/docs/sdk/typescript/interfaces/ConnectRequest)
</ResponseField>

#### Returns

`Promise<ConnectResponse>`

A promise that resolves to a connect response with the redirect URI and auth session

### deleteAuthenticationMethod()

```typescript
deleteAuthenticationMethod(id: string): Promise<void>
```

Delete an authentication method by ID.

#### Parameters

<ResponseField name={"id"} type={"string"} required>
  The ID of the authentication method to delete
</ResponseField>

#### Returns

`Promise<void>`

A promise that resolves when the authentication method has been deleted

### enrollmentChallenge()

```typescript
enrollmentChallenge(options: EnrollmentChallengeOptions): Promise<EnrollmentChallengeResponse>
```

Start the enrollment of an authentication method for the current user.
The response shape varies by type.

#### Parameters

<ResponseField name={"options"} type={"EnrollmentChallengeOptions"} required>
  Enrollment challenge options specifying the factor type and any type-specific fields

  Type: [EnrollmentChallengeOptions](/docs/sdk/typescript/types/EnrollmentChallengeOptions)
</ResponseField>

#### Returns

`Promise<EnrollmentChallengeResponse>`

A promise that resolves to the enrollment challenge response (shape varies by type)

### enrollmentVerify()

```typescript
enrollmentVerify(options: EnrollmentVerifyOptions): Promise<AuthenticationMethod>
```

Confirm the enrollment of an authentication method to complete registration.

#### Parameters

<ResponseField name={"options"} type={"EnrollmentVerifyOptions"} required>
  Enrollment verify options including the auth session and type-specific verification data

  Type: [EnrollmentVerifyOptions](/docs/sdk/typescript/types/EnrollmentVerifyOptions)
</ResponseField>

#### Returns

`Promise<AuthenticationMethod>`

A promise that resolves to the confirmed authentication method

### getAuthenticationMethod()

```typescript
getAuthenticationMethod(id: string): Promise<AuthenticationMethod>
```

Get an authentication method by ID.

#### Parameters

<ResponseField name={"id"} type={"string"} required>
  The ID of the authentication method to retrieve
</ResponseField>

#### Returns

`Promise<AuthenticationMethod>`

A promise that resolves to the authentication method

### getAuthenticationMethods()

```typescript
getAuthenticationMethods(type?: AuthenticationMethodType): Promise<AuthenticationMethod[]>
```

Get a list of all authentication methods for the current user.

#### Parameters

<ResponseField name={"type"} type={"AuthenticationMethodType"}>
  Optional filter to return only methods of a specific type

  Type: [AuthenticationMethodType](/docs/sdk/typescript/types/AuthenticationMethodType)
</ResponseField>

#### Returns

`Promise<AuthenticationMethod[]>`

A promise that resolves to an array of authentication methods

### getFactors()

```typescript
getFactors(): Promise<Factor[]>
```

Get the status of all factors for the current user.

#### Returns

`Promise<Factor[]>`

A promise that resolves to an array of factors with their enabled/disabled status

### updateAuthenticationMethod()

```typescript
updateAuthenticationMethod(id: string, data: UpdateAuthenticationMethodRequest): Promise<AuthenticationMethod>
```

Update details of an authentication method by ID.

#### Parameters

<ResponseField name={"id"} type={"string"} required>
  The ID of the authentication method to update
</ResponseField>

<ResponseField name={"data"} type={"UpdateAuthenticationMethodRequest"} required>
  The fields to update (e.g. name, preferred\_authentication\_method for phone)

  Type: [UpdateAuthenticationMethodRequest](/docs/sdk/typescript/interfaces/UpdateAuthenticationMethodRequest)
</ResponseField>

#### Returns

`Promise<AuthenticationMethod>`

A promise that resolves to the updated authentication method
