> For the complete documentation index, see [llms.txt](https://docs.caf.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.caf.io/caf-sdk/react-native/standalone-modules/face-authenticator/typescript-references.md).

# TypeScript References

## Types

### `FaceAuthenticatorResponse`

| Field       | Type                                                | Description                                                  |
| ----------- | --------------------------------------------------- | ------------------------------------------------------------ |
| `result`    | [FaceAuthenticatorResult](#faceauthenticatorresult) | Shows when face authentication returns a successful capture. |
| `error`     | [FaceAuthenticatorError](#faceauthenticatorerror)   | Shows when the face authentication return some error.        |
| `cancelled` | boolean                                             | Shows when user cancel the authentication.                   |
| `isLoading` | boolean                                             | Shows when the face authentication is loading.               |

### `FaceAuthenticatorResult`

| Field            | Type   | Description                                                    |
| ---------------- | ------ | -------------------------------------------------------------- |
| `signedResponse` | string | The signed response confirming the captured selfie is genuine. |

### `FaceAuthenticatorError`

| Field     | Type            | Description                        |
| --------- | --------------- | ---------------------------------- |
| `message` | string          | Detailed error message.            |
| `error`   | [Error](#error) | Enum describing the type of error. |

### `FaceAuthenticatorSettings`

| Field                    | Type              | Description                                                                                                                         | Android | iOS |
| ------------------------ | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------- | :-----: | :-: |
| `cafStage`               | [Stage](#stage)   | Used to redirect the SDK to the desired stage in caf api.                                                                           |    ✅    |  ✅  |
| `filter`                 | [Filter](#filter) | Used to change the SDK filter.                                                                                                      |    ✅    |  ✅  |
| `imageUrlExpirationTime` | [Time](#time)     | Used to customize the image URL expiration time.                                                                                    |    ✅    |  ✅  |
| `enableScreenshots`      | boolean           | Used to enable screenshots during the SDK scan. Disabled by default for security reasons.                                           |    ✅    |  ✅  |
| `loadingScreen`          | boolean           | Used to enable a default loading progressbar during loading events.                                                                 |    ✅    |  ✅  |
| `certificates`           | string\[]         | Used to set pinned certificates for reverse proxy implementation.                                                                   |    ❌    |  ✅  |
| `livenessBaseUrl`        | string            | Used to enable the use of reverse proxy to execute liveness. If used, the certificates must be set with the setCertificates method. |    ❌    |  ✅  |
| `authenticationBaseUrl`  | string            | Used to enable the use of reverse proxy to execute SDK's authentications.                                                           |    ❌    |  ✅  |

## Enums

### `Stage`

| Field  | Description             | Android | iOS |
| ------ | ----------------------- | :-----: | :-: |
| `BETA` | Beta environment.       |    ✅    |  ✅  |
| `PROD` | Production environment. |    ✅    |  ✅  |

### `Filter`

| Field          | Description                         | Android | iOS |
| -------------- | ----------------------------------- | :-----: | :-: |
| `LINE_DRAWING` | Alternative mask for face liveness. |    ✅    |  ✅  |
| `NATURAL`      | Normal mask for face liveness.      |    ✅    |  ✅  |

### `Time`

| Field         | Description                                          | Android | iOS |
| ------------- | ---------------------------------------------------- | :-----: | :-: |
| `THREE_HOURS` | Image url expiration time expires in three hours.    |    ✅    |  ✅  |
| `THIRTY_DAYS` | Image url expiration time expires in thirty days.    |    ✅    |  ✅  |
| `THIRTY_MIN`  | Image url expiration time expires in thirty minutes. |    ❌    |  ✅  |

### `Error`

| Field                  | Description                                                             | Android | iOS |
| ---------------------- | ----------------------------------------------------------------------- | :-----: | :-: |
| `UnknownException`     | Indicates an unknown issue.                                             |    ✅    |  ✅  |
| `CameraPermission`     | Indicates that camera permission is required for liveness verification. |    ✅    |  ✅  |
| `NetworkException`     | Indicates a network-related exception occurred during verification.     |    ✅    |  ✅  |
| `ServerException`      | Indicates a server-side exception occurred during verification.         |    ✅    |  ✅  |
| `TokenException`       | Indicates an issue with the token used for verification.                |    ✅    |  ✅  |
| `UnsupportedDevice`    | Indicates that the device is unsupported for liveness verification.     |    ✅    |  ✅  |
| `CertificateException` | Indicates an exception occurred on certificate pinning.                 |    ❌    |  ✅  |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.caf.io/caf-sdk/react-native/standalone-modules/face-authenticator/typescript-references.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
