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