> For the complete documentation index, see [llms.txt](https://docs.facephi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial/propiedades/maxattempts.md).

# maxAttempts

Maximum number of face capture attempts.

## Details

**Attribute:** `max-attempts`

**Type:** `number`

**Supported values:** `0` or higher

**Default value:** the capture engine’s default (the property is sent only if defined)

## Syntax

```typescript
selphi.maxAttempts = 3;
```

## Description

Maximum number of capture attempts the user can make in `facephi-selphi-widget` before the widget considers the process exhausted.

When the limit is exceeded, the widget emits [maxAttemptsExceeded](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial/eventos/maxattemptsexceeded.md) and stops retrying the capture. Without this property, the integration had to keep track of retries itself based on [extractionTimeout](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial/eventos/extractiontimeout.md) and [timeoutErrorButtonClick](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial/eventos/timeouterrorbuttonclick.md).

### Considerations

If the property is not defined, the widget does not send it to the engine, and the capture engine’s default value is applied.

This property limits attempts for the entire capture flow. It does not replace [livenessMoveFailedAttempts](https://docs.facephi.com/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial/propiedades/livenessmovefailedattempts.md), which controls failed attempts within each liveness check step.

***

## Example

```jsx
<facephi-selphi-widget
    maxAttempts={3}
    onMaxAttemptsExceeded={(event) => {
      console.log('Attempts exhausted:', event.detail.detail);
    }}
/>
```
