The liveness detection API is used to identify whether the detected object is a real person.
API Method
Base URL
- Indonesia: https://id.apitd.net/verification/kyc/liveness/v1
- Pakistan: https://pk.apitd.net/verification/kyc/liveness/v1
- Global: https://sg.apitd.net/verification/kyc/liveness/v1
API
| URL | Request Methods | Content-Type | Output Format | Character Set |
|---|---|---|---|---|
| api-base-url?partner_code=xxx&partner_key=xxx | POST | application/json | JSON | UTF-8 |
Authentication
| Parameter | Type | Description | Required/Optional | Notes |
|---|---|---|---|---|
| partner_code | String | Partner Code | Required | Assigned by TD |
| partner_key | String | Partner Key | Required | Assigned by TD |
Request
Parameter | Type | Description | Required/Optional | Notes |
|---|---|---|---|---|
image | String | Portrait image | Required | Portrait photo, base64 photo of JPG, JPEG, PNG format, the image size limits to 3M |
country | String | Country | Required | 2-letter capitalized country code according to ISO 3166. |
Response Parameter
Parameter | Type | Description | Notes |
|---|---|---|---|
code | Integer | API status code | |
message | String | Status message | Return detailed API status information |
sequence_id | String | Unique ID of response | A unique ID used to track each request |
result | String | Verification result | Enumeration: |
score | Double | Liveness detection confidence score | Returned when result is success |
API Status Code
| Code | Message | Charged |
|---|---|---|
| 200 | Success | YES |
| 12223 | Face has not been detected | YES |
| 11301 | {parameter} empty | NO |
| 11304 | The country partner located is not open | NO |
| 11340 | {parameter} error | NO |
| 11350 | Internal error | NO |
| 301 | Service not purchased | NO |
| 302 | Service has been suspend | NO |
| 303 | Not enough balance | NO |
| 304 | Service expired | NO |
| 305 | Daily maximum volume reached | NO |
Response Example
- Success
{
"code": 200,
"message": "success",
"sequence_id": "557a00180577433ba002201cd1b0f306",
"result": "pass",
"score": 0.995061
}- Failed
{
"code": 11304,
"message": "The country partner located is not open",
"sequence_id": "d2b38289a10f48d487ee7317260078c0"
}