> 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-api/caf-api-pt-br/conectar/available-resources/face-authentication.md).

# Autenticação facial

Autenticação Facial é um serviço biométrico que permite o registro facial e a autenticação por meio de comparação facial. Este recurso disponibiliza endpoints para registrar faces de pessoas e consultar tentativas de autenticação facial.

{% hint style="info" %}
**Requisitos de autenticação:**

* Endpoints regulares usam `OAuth2` autenticação com URL base: `https://api.us.prd.caf.io`
* Para maior segurança, alguns endpoints também podem suportar `mTLS` autenticação com URL base: `https://mtls.us.prd.caf.io`
* Para informações sobre a implementação de `mTLS`, acesse [Usando mTLS](/caf-api/caf-api-pt-br/conectar/authentication/using-mtls.md)
  {% endhint %}

## Registro Facial

O endpoint de registro permite associar uma imagem facial a um identificador de pessoa (`personId`), criando uma referência biométrica que será usada posteriormente para autenticação.

{% hint style="info" %}
As faces registradas por este endpoint serão usadas para comparação facial por meio do CafSdk ou [CafFaceLiveness](https://docs.caf.io/caf-sdk/web-javascript/getting-started/face-liveness-and-face-authenticator) SDKs. As SDKs documentadas como obsoletas não necessariamente usarão esses registros faciais.
{% endhint %}

{% openapi src="/files/9342fb52df510eb24200925c5db650ba9cd96af6" path="/" method="post" %}
[register-faces.yaml](https://262277803-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVxCOSyBojfSIE5fcpfH%2Fuploads%2Fgit-blob-f97dab14a41c49d2d83a527f5d558b5ff7ff391f%2Fregister-faces.yaml?alt=media)
{% endopenapi %}

## Consulta de Tentativa de Autenticação Facial

O endpoint de consulta permite recuperar informações sobre uma tentativa específica de autenticação facial, incluindo as URLs das imagens usadas.

{% openapi src="/files/0292d4bd3955503a6102d3cd7323e4ed325712d8" path="/attempts/{attemptId}" method="get" %}
[get-attempt.yaml](https://262277803-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbVxCOSyBojfSIE5fcpfH%2Fuploads%2Fgit-blob-78865ee29598fed74645fa182fa6c52d7335417d%2Fget-attempt.yaml?alt=media)
{% endopenapi %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.caf.io/caf-api/caf-api-pt-br/conectar/available-resources/face-authentication.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
