# Centralized OkayLive

## Overview

The Centralized OkayLive API also known as "Liveness Detection" is to make sure that the selfie is taken by a real person. This will greatly increase the security level of Facial Verification in order to help to fight against spoof attacks using fake selfies *(e.g. recapturing a selfie from monitor screens, printed paper and etc)*

#### Steps:

1. Users can choose to **skip** this API if the user has **activated** the "liveness detection" parameter in the Centralized OkayFace API. Else, the user can proceed by following the steps.
2. Place the JourneyId and the content mentioned in the [API method](#api-method) below.
3. After expanding the API method, the user can read the descriptions on each parameter and place the details accordingly following this [Example](#input-example).
4. The API will return a number of values and the user can refer to this [page](/emas-ekyc-portal/image-requirement/okaylive.md) for more details.
5. The average processing time is 2s to 3s.

{% hint style="info" %}
Please refer to the "[<mark style="color:orange;">Image Requirement</mark>](/emas-ekyc-portal/image-requirement/okaylive.md)" section to get the best result for each API return
{% endhint %}

## API Method

<mark style="color:green;">`POST`</mark> `https://ekycportaldemo.innov8tif.com/api/ekyc/okaylive`

#### Request Body

| Name                                         | Type   | Description                          |
| -------------------------------------------- | ------ | ------------------------------------ |
| imageBest <mark style="color:red;">\*</mark> | object | Selfie photo                         |
| journeyId<mark style="color:red;">\*</mark>  | string | Retrieve from 'Create JourneyID' API |

{% tabs %}
{% tab title="200 Successfully response to the user " %}
{% code title="Request Code Block" %}

```
{
    "status": "success",
    "messageCode": "api.success",
    "probability": 0.9999331,
    "score": 9.612308,
    "quality": 0.6691686
}
```

{% endcode %}
{% endtab %}

{% tab title="400: Bad Request Failed to response to the user" %}

```javascript
{
    status: "error"
}
```

{% endtab %}

{% tab title="500: Internal Server Error Internal Server Error" %}

```javascript
{
    status:"Internal Server Error"
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Kindly refer to the page below for the interpretation of the result.
{% endhint %}

{% content-ref url="/spaces/RYsITG7N76MNv67B20iW/pages/t76J963SHPmZ6fNNwhHV" %}
[Interpretation of Result and Recommended Threshold](/emas-ekyc-portal/centralized-okaylive/interpretation-of-result-and-recommended-threshold.md)
{% endcontent-ref %}

### Input Example

![Input image as image file](/files/tr7vo6mus6uc0qpwi1JG)

{% hint style="info" %}
This OkayLive API component only accepts image file as input
{% endhint %}

#### Postman Collection

{% hint style="info" %}
Get the Postman Collection\
<https://api2-ekycportal.innov8tif.com/emas-ekyc-portal/postman-collection>
{% 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://api2-ekycportal.innov8tif.com/emas-ekyc-portal/centralized-okaylive.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.
