Domain name for API request: faceid.intl.tencentcloudapi.com.
This API is used to import the ID card portrait side photo, recognize the information on the ID card photo, and compare the name, identity card number, and ID card portrait photo with the ID photo in the authoritative database to verify if they belong to the same person, thereby verifying the authenticity of the identity card information.
A maximum of 100 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CheckIdCardInformation. |
| Version | Yes | String | Common Params. The value used for this API: 2018-03-01. |
| Region | No | String | Common Params. This parameter is not required for this API. |
| ImageBase64 | No | String | Base64 value of the ID card portrait side.
|
| ImageUrl | No | String | Url address of the ID card portrait side
|
| Config | No | String | Configuration.
|
| IsEncrypt | No | Boolean | Whether required to encrypt sensitive information in the response.
|
| IsEncryptResponse | No | Boolean | Whether required to encrypt the response body. |
| Encryption | No | Encryption | Whether required to encrypt sensitive information in the response, need to be specified encryption algorithm Algorithm, initial vector for CBC encryption, and encrypted symmetric key. |
| Parameter Name | Type | Description |
|---|---|---|
| Sim | Float | Similarity. - Value ranges from 0.00 to 100.00. - Recommend threshold at least 70 to judge as same person, self-adjust based on specific scenario (pass rate for threshold 70 is 0.01%). |
| Result | String | Business error code.
|
| Description | String | Business result description. |
| Name | String | Name. |
| Sex | String | Gender. |
| Nation | String | Ethnicity. |
| Birth | String | Date of birth. |
| Address | String | Address. |
| IdNum | String | Identity card number. |
| Portrait | String | The base64 encoding of the ID card portrait photo. If the image cropping fails, it will compare with the entire ID card and return null. |
| Warnings | String | Alarm information.
|
| Quality | Float | Image quality score.
|
| Encryption | Encryption | Sensitive data encryption info. Note: This field may return null, indicating that no valid values can be obtained. |
| EncryptedBody | String | Encrypted data. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
https://faceid.intl.tencentcloudapi.com/?Action=CheckIdCardInformation
&ImageBase64=/9j/4AAQSkZJRg.....s97n//2Q==
&Config={"CopyWarn":true}
&<Common request parameters>
{
"Response": {
"Address": "No. 4 Jingshan Front Street, Dongcheng District, Beijing, Jing Shi Fang, Forbidden City"
"Birth": "1654/12/20",
"Description": "OCR alert occurred"
"IdNum": "11204416541220243X",
"Name": "Wei Xiaobao"
"Nation": "Manchu"
"Portrait": "/9j/4AAQSk...Se/wDkf//Z",
"Quality": 99,
"Encryption": null,
"RequestId": "6e6cfaad-3271-4eb1-a203-2866100eb283",
"Result": "FailedOperation.OcrWarningOccurred",
"Sex": "Male",
"Sim": 0,
"Warnings": "-9101"
}
}
https://faceid.intl.tencentcloudapi.com/?Action=CheckIdCardInformation
&ImageBase64=/9j/4AAQSkZJRg.....s97n//2Q==
&Config={"CopyWarn":true}
&<Common request parameters>
{
"Response": {
"Address": "No. 4 Jingshan Front Street, Dongcheng District, Beijing, Jing Shi Fang, Forbidden City"
"Birth": "1654/12/20",
"Description": "Success"
"Encryption": null,
"IdNum": "11204416541220243X",
"Name": "Wei Xiaobao"
"Nation": "Han"
"Portrait": "/9j/4AAQSk...m3Zt62P//Z",
"Quality": 98,
"RequestId": "8dc2b640-caad-4a13-ad8c-204d46d29fe1",
"Result": "Success",
"Sex": "Male",
"Sim": 99.76,
"Warnings": ""
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation.CompareFail | Comparison failed. |
| FailedOperation.CompareLowSimilarity | The comparison similarity did not reach the passing standard. |
| FailedOperation.CompareSystemError | Error calling the comparison engine API. |
| FailedOperation.DownLoadError | File download failed. |
| FailedOperation.EmptyImageError | Image content is empty. |
| FailedOperation.EncryptSystemError | Encryption failed. |
| FailedOperation.FileSaveError | Failed to store file. Please retry later. |
| FailedOperation.IdFormatError | Input identity card number error. |
| FailedOperation.IdNameMisMatch | Name and ID card number mismatch. Please verify and try again after. |
| FailedOperation.IdNoExistSystem | The number is not found in the database. Please go to the place of household registration to verify. |
| FailedOperation.IdPhotoNoExist | The photo of this number is not found in the database. Please go to the place of household registration to verify. |
| FailedOperation.IdPhotoPoorQuality | Document image is of poor quality. Please update and try again. |
| FailedOperation.IdPhotoSystemNoanswer | The customer database, self-built database, or authentication center failed to return the photo. Try again later. |
| FailedOperation.ImageBlur | The image is blurry. |
| FailedOperation.ImageDecodeFailed | Image decoding failed. |
| FailedOperation.ImageNoIdCard | No ID card is detected in the image. |
| FailedOperation.ImageSizeTooLarge | The image is too large. |
| FailedOperation.LifePhotoDetectFaces | Multiple faces are detected. |
| FailedOperation.LifePhotoDetectFake | Real person comparison failed. |
| FailedOperation.LifePhotoDetectNoFaces | Failed to detect a full face. |
| FailedOperation.LifePhotoPoorQuality | The resolution of the image passed in is too low. Please upload a new one. |
| FailedOperation.LifePhotoSizeError | The image passed in is too large or too small. |
| FailedOperation.OcrFailed | Ocr recognition failed. |
| FailedOperation.RequestLimitExceeded | The number of calls exceeded the limit. |
| FailedOperation.StsUnAuthErrError | STS unauthorized. |
| FailedOperation.UnKnown | Unknown internal error. |
| InternalError.EncryptSystemError | Encryption failed. |
| InternalError.UnKnown | Unknown internal error. |
| InvalidParameter | Invalid parameter. |
| UnauthorizedOperation.Arrears | The account is in arrears. |
| UnauthorizedOperation.ChargeStatusException | The billing status is abnormal. |
| UnauthorizedOperation.Nonactivated | The service has not been activated. |
文档反馈