The face comparison API is used to verify whether the user's photo information is consistent.
URL | Request Methods | Content-Type | Output Format | Character Set |
---|
api-base-url?partner_code=xxx&partner_key=xxx | POST | application/json | JSON | UTF-8 |
Parameter | Type | Description | Required/Optional | Notes |
---|
partner_code | String | Partner Code | Required | Assigned by TD |
partner_key | String | Partner Key | Required | Assigned by TD |
Parameter | Type | Description | Required/Optional | Notes |
---|
face_image | String | Face image | Required | Base64 (NO WRAP) of face or selfie photo in JPG, JPEG or PNG format, within 3M |
id_image | String | ID card portrait page image | Required | Base64 (NO WRAP) of ID photo in JPG, JPEG or PNG format, within 3M |
country | String | Country | Required | 2-digit ISO country code (ISO 3166 standard) |
Parameter | Type | Description | Notes |
---|
result | String | Portrait comparison results | Enumeration value: pass, fail |
similarity | Double | Similarity percentage for portrait comparison | 0~100, default ≥75 means the same person |
API Status Code
Code | Message | Charged |
---|
200 | Success | YES |
12404 | Face has not been detected | YES |
12405 | Image feature extraction processing failed | NO |
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 |
{
"code": 200,
"result": "pass",
"sequence_id": "c7920f4a23264ed0a376f8647e14e34b",
"similarity": 89.7134
}
{
"code": 11304,
"message": "The country partner located is not open.",
"sequence_id": "d2b38289a10f48d487ee7317260078c0"
}