Access Documentation
Anti-Forgery Detection
ID Anti-Forgery Detection
ID Anti-Forgery Detection
# ID Anti-Forgery Detection
# Description
This API detects the authenticity of overseas ID documents. Currently supported document types: Mexico Voter ID, Indonesia ID Card, and Philippines ID Card. Supported forgery detection items include screen-rephotography detection and portrait PS (Photoshop) tampering detection.
# Invoke URL
https://api-sgp.yljz.com/finauth/v5/overseas_id_verification
# Invocation Method
Request Method: POST
Request Parameters: content-type: Multipart/Form-Data
| Parameter Name | Data Type | Required | Description | Example Value |
|---|---|---|---|---|
| sign | string | Yes | For the signature generation rules, refer to the Authentication Guide. | |
| sign_version | string | Yes | hmac_sha1 | |
| image | file | Yes | An image, a binary file, uploaded via Multipart/Form-Data. Note: The file size must be less than 10MB. Supported resolution ranges from a minimum of 200×200 to a maximum of 8000×8000. |
# Response
content-type: application/json
| Parameter Name | Data Type | Description | Example Value |
|---|---|---|---|
| request_id | string | A unique string used to distinguish each request. This field is always returned unless a 404 (API_NOT_FOUND) or 403 (AUTHORIZATION_ERROR) error occurs. | |
| time_used | int | The time taken by the entire request, in milliseconds. Always returned unless a 404 (API_NOT_FOUND) or 403 (AUTHORIZATION_ERROR) error occurs. | |
| forge_data | json object | Contains the complete forgery detection result data, specifically including: 1. The final determination result (whether it is forged); 2. Each possible forgery type and its corresponding confidence (used to support and explain the determination basis). | See example below. |
| error | string | When an error occurs, the corresponding error code is returned. See the ERROR section below for details. |
# forge_data structure
| Field Name | Data Type | Description | Example |
|---|---|---|---|
| is_forged | boolean | Whether the document is forged (true means forged, false means normal). | true |
| attack_info | json object | Detailed forgery detection results, including which forgery types were hit (0: not hit, 1: hit). screen: rephotography; PS: portrait PS. |
# forge_data parameter example
{
"is_forged":true,
"attack_info":{
"screen":1,
"PS": 1
}
}
# Response Example
{
"request_id": "1751535373,27967427-41ea-41e9-83ab-e8fa5f688b21",
"time_used": 255,
"forge_data": {
"is_forged": false,
"attack_info": {
"screen": 0,
"PS": 0
}
}
}
# Error
| Error | Description | Solution |
|---|---|---|
| IMAGE_ERROR_UNSUPPORTED_FORMAT | Image decoding failed. | |
| INVALID_IMAGE_SIZE: | Image size too large or too small. | |
| INTERNAL_ERROR | Internal server error. | Retry later or contact technical support. |
