# Doc Liveness and ID Forgery

{% embed url="<https://drive.google.com/file/d/1I_Is6k-MYLtdNYJZjVvj-rM5iUBZ4jdu/view?usp=sharing>" %}

### Steps to Install and Run the ID Liveness Docker

#### Step 1:

Pull Accura ID Liveness Docker image using the command `docker pull accurascan/docliveness:<latest tag>`

{% hint style="info" %}
Visit <https://hub.docker.com/r/accurascan/docliveness> to check the latest version available
{% endhint %}

{% code title="Example:" fullWidth="false" %}

```
docker pull accurascan/docliveness:37.0.0
```

{% endcode %}

#### Step 2:

Run the docker by using the command: `sudo docker run -dp port-you-want-accuraliveness-to-run-on:443 -- restart=always accurascan/docliveness:<latest tag>`

{% code title="Example" overflow="wrap" %}

```
docker run -dp 8043:443 --restart=always accurascan/docliveness:37.0.0
```

{% endcode %}

#### Step 3:

{% hint style="info" %}
To generate your Accura Scan license contact <sales@accurascan.com>
{% endhint %}

Upload your license accessing "<mark style="color:blue;">http\://\<yourdomain:port></mark>" using a browser, Example is shown in the image below.

<figure><img src="/files/Sh2CAl9t6vYqoMkMcgJ1" alt=""><figcaption></figcaption></figure>

#### Step 4:

Use <mark style="color:blue;">[https://your-domain-or-ip.com:port/doc\\\_liveness.php](https://docs.accurascan.com/language/docker/https:/your-domain-or-ip.com:port/doc\\_liveness.php)</mark> (POST request) to access the API, an example post request as shown below.

<mark style="color:green;">`POST`</mark> `https://yourdomain:port/doc_liveness.php`

{% hint style="info" %}
To view country\_code and card\_code for any card visit <https://accurascan.com/documents-supported-api>
{% endhint %}

#### Request Body

> You can either pass image file or an image base64.

<table><thead><tr><th>Name</th><th>Type</th><th>Description</th><th data-hidden></th></tr></thead><tbody><tr><td>image<mark style="color:red;">*</mark></td><td>file</td><td>Upload your image file</td><td></td></tr><tr><td>image_base64</td><td>text or string</td><td>paste your image base64 here</td><td></td></tr><tr><td>isface<mark style="color:red;">*</mark></td><td>front/back</td><td>put card side either the card image is front or back</td><td></td></tr><tr><td>country_code<mark style="color:red;">*</mark></td><td>COL</td><td>put country_code of the card image</td><td></td></tr><tr><td>card_code<mark style="color:red;">*</mark></td><td>CLMID</td><td>put card_code of the card image </td><td></td></tr><tr><td>passport<mark style="color:red;">*</mark></td><td>true/false</td><td>if image is a passport put true else put false</td><td></td></tr><tr><td>webcam<mark style="color:red;">*</mark></td><td>true/false</td><td>if image is captured from a webcam put true else if image is captured from a mobile put  false</td><td></td></tr></tbody></table>

{% tabs %}
{% tab title="200: OK An example response is shown in the image below" %}

{% endtab %}
{% endtabs %}

<figure><img src="/files/po0XRpU6tAgm8vwFqatV" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The preferred threshold is **55%**, meaning that if an image achieves a score above this threshold, the ID shown is considered ***Live***; otherwise, it is identified as a ***Spoof***.
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.accurascan.com/language/docker/doc-liveness-and-id-forgery.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
