Retrive license API
Base URL
- Singapore:https://sg-credit.apitd.net/verification/kyc/sdk/liveness/license/v1
- Indonesia:http://id-credit.apitd.net/verification/kyc/sdk/liveness/license/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 |
---|---|---|---|---|
session_duration | Integer | Duration of the license's effective timeframe | Optional | The default duration is 600 seconds, with a maximum of 86,400 seconds. The unit is seconds. |
Response Parameters
Parameter | Type | Description | Notes |
---|---|---|---|
code | Integer | API status code | Please refer to below API Code list |
message | String | Status Information | Detailed reasons will be provided about API status |
sequence_id | String | Unique response code | A unique ID used to track each request |
license | String | Liveness detection initialization license | The license is used to initiate the liveness detection process in SDK subsequently. |
expiry_timestamp | Integer | License expiration timestamp | The timestamp when the license expires, e.g., 1715667188. |
Response Example
- Request
{
"session_duration": 600 //optional
}
- Success
{
"code": 200,
"message": "success",
"sequence_id": "17119500882*****29",
"license": "a41701e49******3",
"expiry_timestamp": 1715667188
}
- Failed
{
"code": 11350,
"sequence_id": "69b57131b6fb********61ccba118b60",
"message": "Internal error"
}
Retrive result API
Base URL
- Singapore:https://sg-credit.apitd.net/verification/kyc/sdk/liveness/result/v1
- Indonesia:http://id-credit.apitd.net/verification/kyc/sdk/liveness/license/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 |
---|---|---|---|---|
liveness_id | String | Liveness detection ID | Required | Liveness detection ID generated in the above SDK output of Step 2, representing unique liveness detection process |
Response Parameters
Parameter | Type | Description | Notes |
---|---|---|---|
code | Integer | API status code | Please refer to below API Code list |
message | String | Status Information | Detailed reasons will be provided about API status |
sequence_id | String | Unique response code | A unique ID used to track each request,iOS get the livenessId in the TDLivenessResultStruct structure as the value of liveness_id |
image | String | Liveness detection face pictures | The best face picture captured during the liveness detection process, in base64 format |
score | Double | Liveness detection confidence score | Reserved field. Currently, only the code=200 indicates that the liveness test has been passed.(This field is not available in the SDK lite version.) |
Response Example
- Request
{
"liveness_id": 1234567
}
- Success
{
"code": "200",
"message": "success",
"sequence_id": "1679299854228726325924",
"image": "\/9j\/4AAQSkZJRgABAQAAAQABAAD\/2wBDAAMCA",
"score": 0.98958
}
- Failed
{
"code": 11350,
"sequence_id": "69b57131b6fb********61ccba118b60",
"message": "Internal error"
}
API Code
Code | Message | Charged |
---|---|---|
200 | success (live person) | YES |
12202 | Identified as a blink attack | YES |
12203 | Identified as a mouth movement attack | YES |
12204 | Identified as a partial face attack | YES |
12205 | Identified as a video replay attack | YES |
12206 | Identified as a black and white image | YES |
12207 | Identified as a paper-based attack | YES |
12208 | Identified as a frame (including paper or phone frame) | YES |
12209 | Identified as a moire pattern attack | YES |
12210 | Identified as a face superiority attack | YES |
12211 | Identified as a paper-based attack (optical flow) | YES |
12212 | Identified as a mask attack | YES |
12213 | Identified as an ID card attack | YES |
12214 | Identified as a 3D mask attack | YES |
12215 | Identified as a synthetic image attack | YES |
12216 | Identified as a black-market software attack | YES |
12217 | Identified as a T-type mask attack | YES |
12218 | Identified as a blurry image | YES |
12219 | Suspected deepfake image attack | YES |
12220 | Suspected high-resolution screen attack | YES |
12221 | Light verification failed | YES |
12222 | Injection attack | YES |
12250 | Verification error | YES |
11350 | Internal error | NO |