Access Documentation
Overseas ID Verification API
ID Verification
ID Verification
# Description
This API verifies the authenticity of overseas IDs. Currently, it supports the Mexico Voter ID, with forgery detection including rephotography 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 | ||
| sign_version | string | Yes | hmac_sha1 | |
| image | file | Yes | An image file in binary format, to be uploaded via Multipart/Form-Data. Note: The file size must be less than 10MB, with supported resolution from 200×200 up to 8000×8000 pixels. |
|
| doc_type | string | Yes | ID document type (currently fixed as mexico_voter_id, future expansions planned) | mexico_voter_id |
# Response
content-type: application/json
| Parameter Name | Data Type | Description | Example Value |
|---|---|---|---|
| request_id | string | Unique string identifying each request. Always returned unless a 404 (API_NOT_FOUND) or 403 (AUTHORIZATION_ERROR) occurs. | |
| time_used | int | Total time spent on the request in milliseconds. Always returned unless a 404(API_NOT_FOUND) or 403(AUTHORIZATION_ERROR) error occurs. | |
| forge_data | json object | Complete forged-content detection results, specifically including: 1.The final determination result (whether it is forged) 2.Various possible forgery types and their corresponding confidence scores (to support and explain the determination basis) |
See example below. |
| error | string | Error message returned if an error occurs. |
# forge_data Structure
| Field Name | Data Type | Description | Example |
|---|---|---|---|
| is_forged | boolean | Indicates whether the current detection target is forged (true means determined as forged after detection; false means determined as normal / no forgery detected). | true |
| attack_info | json object | Includes various types of forgery (e.g., "screen" for screen rephotography) and their detection confidence scores, with values ranging from 0 to 1 (the threshold is 0.5; scores above 0.5 indicate forgery). |
# forge_data parameter example
{
"is_forged": true,
"attack_info": {
"screen": 0.93
}
}
# Response Example
{
"request_id": "1751535373,27967427-41ea-41e9-83ab-e8fa5f688b21",
"time_used": 255,
"forge_data": {
"is_forged": false,
"attack_info": {
"screen": 0.42483786
}
}
}
# Error
| Error | Description | Solution |
|---|---|---|
| IMAGE_ERROR_UNSUPPORTED_FORMAT | Image decoding failed | |
| INVALID_IMAGE_SIZE: | Image size too large or too small | |
| DOC_TYPE_NOT_SUPPORT | Unsupported document type | Confirm doc_type is set to mexico_voter_id |
| INTERNAL_ERROR | Internal server error | Retry later or contact technical support |
