> 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 facial capture attempts.

## Details

**Attribute:** `max-attempts`

**Type:** `number`

**Allowed values:** `0` or higher

**Default value:** the one from the capture engine (the property is only sent if it is defined)

## Morphology

```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](/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 on its own starting from [extractionTimeout](/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial/eventos/extractiontimeout.md) and [timeoutErrorButtonClick](/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 the attempts of the complete capture Flow. It does not replace [livenessMoveFailedAttempts](/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial/propiedades/livenessmovefailedattempts.md), which controls the failed attempts within each step of the active liveness check.

***

## Example

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