> 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/eventos/maxattemptsexceeded.md).

# maxAttemptsExceeded

The allowed capture attempts were exhausted.

## Details

It is issued when the user exceeds the number of attempts configured in [maxAttempts](/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial/propiedades/maxattempts.md).

**Event:** `maxAttemptsExceeded`

**Type:** `FacephiSelphiWidgetCustomEvent<MaxAttemptsExceededEvent>` | `CustomEvent<MaxAttemptsExceededEvent>`

### Syntax

```typescript
selphi.addEventListener('maxAttemptsExceeded', onMaxAttemptsExceeded);
```

### Received object

The useful payload is in `event.detail.detail`:

* `eventType` (`string`): Emitted event type.
* `message` (`string`): Brief description of the reason why the attempts were exhausted.

## Description

Indicates that the user has consumed all allowed capture attempts and that the widget will not retry the process. Unlike [extractionTimeout](/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial/eventos/extractiontimeout.md), which is emitted on each expired attempt and allows retrying, this event marks the end of the capture flow.

The integration must decide here how to proceed: show its own error view, offer an alternative verification channel, or close the process.

### Considerations

It is only emitted if [maxAttempts](/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial/propiedades/maxattempts.md) is configured with a limit that the engine can exhaust.

The useful payload is in `event.detail.detail` (see [event format](/docs.facephi-en/sdks/sdk-web/componentes/selphi-biometria-facial/eventos.md#formato-de-los-eventos)).

The widget logs this case in tracking with status `EXPIRED` and reason `SELPHI_MAX_ATTEMPTS`.

***

## Example

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

```typescript
import { type MaxAttemptsExceededEvent } from '@facephi/selphi-web-component';

selphi.addEventListener('maxAttemptsExceeded', (event: CustomEvent<MaxAttemptsExceededEvent>) => {
  const detail = event.detail.detail;
  console.log('maxAttemptsExceeded:', detail);
});
```
