> For the complete documentation index, see [llms.txt](https://portal-integracao.intelbras.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://portal-integracao.intelbras.com.br/ct-3000-2pb-4pb/configuracao-de-credencial-biometria-digital/captura-remota-de-digital.md).

# Captura Remota de Digital

### Captura Remota de Biometria digital

Por meio da função abaixo o dispositivo entra em modo de captura de biometria digital, sendo exibida a tela padrão de captura via interface do dispositivo. A hash do resultado da captura será retornado nos eventos (EventManager).

Exemplo: <http://192.168.1.201/cgi-bin/eventManager.cgi?action=attach\\&codes=\\[All]\\&heartbeat=5>

{% hint style="info" %}
Obs: Função disponivel apenas ao dispositivo SS 3430 MF BIO e SS 3430 BIO. A chamada eventManager deve ser executada para obter a hash da biometria capturada.
{% endhint %}

#### Requisição - GET

`http://192.168.1.201/cgi-bin/accessControl.cgi?action=captureFingerprint&info.ReaderID=1&info.FingerPrintName=Johnatan&info.UserID=1&heartbeat=5&timeout=10`

| param                   | type   | description                               |
| ----------------------- | ------ | ----------------------------------------- |
| `captureFingerprint` \* | String | Comando para Captura da Biometria         |
| `ReaderID` \*           | String | ID do Leitor, exemplo: `1`                |
| `FingerPrintName` \*    | String | Nome do Usuário para Identificação        |
| `timeout` \*            | String | ID do Usuário (Será retornado na chamada) |

#### Exemplo de Retorno - *text/plain*

```sh
Code=_FingerPrintCollect_;action=Start;index=0;data={
   "Type" : "Remote",
   "info" : {
      "FingerPrintName" : "Johnatan",
      "ReaderID" : "1",
      "UserID" : "1"
   }
}


Code=FingerprintState;action=Pulse;index=0;data={
   "CaptureTimes" : 1,
   "CollectResult" : false
}


Code=FingerprintState;action=Pulse;index=0;data={
   "CaptureTimes" : 2,
   "CollectResult" : false
}


Code=FingerprintState;action=Pulse;index=0;data={
   "CollectResult" : false,
   "ErrorCode" : 3
}

Code=Fingerprint;action=Pulse;index=0;data={
   "CollectResult" : false,
   "FingerprintData" : "",
   "FingerprintPacket" : {
      "Count" : 1,
      "Length" : 0
   }
}

Code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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUCBwYBBAAIAwoJEBELEw4MFhUAAAAAAAAAAAAAAByf",
   "FingerprintPacket" : {
      "Count" : 1,
      "Length" : 810
   }
}
```

{% hint style="danger" %}
Importante: Para o cadastro correto do template recebido em FingerPrintData, deverá ser realizado o tratamento dos dados para que possuam 1080 caracteres. Desta forma deve ser removido o contra barra " \ " dos dados retornados.
{% endhint %}

Após o valor de FingerPrintData deverá possuir 1080 caracteres, permitindo assim o cadastro da digital utilizando a função Cadastro de Biometria Digital.

#### Exemplos

{% tabs %}
{% tab title="Node" %}

```javascript
  const { AxiosDigestAuth } = require('@lukesthl/ts-axios-digest-auth');
 
  const url = 'http://192.168.1.201/cgi-bin/accessControl.cgi?action=captureFingerprint&info.ReaderID=1&info.FingerPrintName=Johnatan&info.UserID=1&heartbeat=5&timeout=10';
 
  const digestAuthClient = new AxiosDigestAuth({
  username: 'yourUsername',
  password: 'yourPassword',
  });
 
  digestAuthClient.get(url)
  .then(response => {
     // Handle the response here
     console.log('Response:', response.data);
  })
  .catch(error => {
     // Handle errors here
     console.error('Error:', error.message);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
 
device_ip = '10.1.35.144'
username = 'admin'
password = 'acesso1234'
 
url = "http://{}/cgi-bin/accessControl.cgi?action=captureFingerprint&info.ReaderID=1&info.FingerPrintName=Johnatan&info.UserID=1&heartbeat=5&timeout=10".format(
                        str(device_ip),
                    )
 
digest_auth = requests.auth.HTTPDigestAuth(username, password)
rval = requests.get(url, auth=digest_auth, stream=True, timeout=20, verify=False)
 
print(rval.text)
```

{% endtab %}
{% endtabs %}


---

# 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://portal-integracao.intelbras.com.br/ct-3000-2pb-4pb/configuracao-de-credencial-biometria-digital/captura-remota-de-digital.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.
