Domain name for API request: ocr.intl.tencentcloudapi.com.
This API retrieves the SDK verification result.
A maximum of 20 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: GetOcrVerificationResult. |
| Version | Yes | String | Common Params. The value used for this API: 2018-11-19. |
| Region | No | String | Common Params. This parameter is not required. |
| SdkToken | Yes | String | Token that identifies an SDK verification process. It is valid for 10 minutes. After the process completes, use this token to obtain the verification result information. |
| Parameter Name | Type | Description |
|---|---|---|
| Status | String | Indicates the completion status of an SDK verification process. Enumeration values:
|
| CardImage | String | Front image of the card. |
| CardImageBack | String | Back image of the card. |
| HeadImage | String | Portrait image on the front of the card. |
| ResultCode | String | Result code of this verification. |
| DeviceInfoLevel | String | Indicates the risk level of the device from which the current request is sent. There are four levels: 1 - Safe. 2 - Low risk. 3 - Medium risk. 4 - High risk. Empty - The risk level is not obtained. Returned only in the enhanced version. Empty by default. |
| CardInfo | GeneralCard | Card recognition result. The latest result is taken as the valid one. |
| BackCardInfo | GeneralCard | Recognition result on the back of the card. |
| FakeDetectResult | Integer | Authenticity check. Valid values: 0: Unable to determine (caused by blur, incompleteness, glare, or low brightness). 1: Fake. 2: Genuine. Only effective for Hong Kong, China ID card recognition. This field is gradually being phased out. |
| WarnCardInfos | Array of Integer | Card Warning Information -9101 Alarm for covered certificate -9102 Alarm for photocopied certificate -9103 Alarm for photographed certificate -9104 Alarm for tamper certificate -9107 Alarm for reflective certificate -9108 Alarm for blurry certificate -9109 This capability is not enabled. Please contact customer support to activate the alert service. |
| 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. |
POST / HTTP/1.1
Host: ocr.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: GetOcrVerificationResult
<Common request parameters>
{
"SdkToken": "92BB3D0FA02A24E001F8AC569771237D02D"
}
{
"Response": {
"BackCardInfo": {
"Address": {
"City": "",
"Country": "",
"District": "",
"FormattedAddress": "",
"LineFive": "",
"LineFour": "",
"LineOne": "",
"LineThree": "",
"LineTwo": "",
"PostalCode": "",
"Subdistrict": "",
"Subdivision": ""
},
"Age": "",
"BirthPlace": "",
"Birthday": "",
"BloodType": "",
"DueDate": "",
"Endorsement": "",
"ExpirationDate": "",
"FirstName": "",
"FirstNameLocal": "",
"FullName": "",
"FullNameLocal": "",
"Height": "",
"IssuedAuthority": "",
"IssuedCountry": "",
"IssuedCountryCode": "",
"IssuedDate": "",
"IssuedPlace": "",
"LastName": "",
"LastNameLocal": "",
"LicenseNumber": "",
"MRZLine1": "",
"MRZLine2": "",
"MiddleName": "",
"MiddleNameLocal": "",
"Nationality": "",
"Others": "",
"PassportCodeFirst": "",
"PassportCodeSecond": "",
"PersonalNumber": "",
"RegistrationNumber": "",
"Religion": "",
"Restrictions": "",
"Sex": "",
"Type": "",
"VehicleClass": "",
"Weight": ""
},
"CardImage": "https://ekyc-card-test-1258344699.cos.ap-singapore.myqcloud.com/tokenOcr/card/20260706/92BB3D0FA02A24E001F8AC569771237D02D_v0.jpg?q-sign-algorithm=sha1&q-ak=***************R***********************************************************key********83337789%3B1783*4*389&q-header-lis***o*t*****l*pa*********&q-signature=6f80*0*8c052f9db******************ed7add",
"CardInfo": {
"Address": {
"City": "",
"Country": "",
"District": "",
"FormattedAddress": "",
"LineFive": "",
"LineFour": "",
"LineOne": "",
"LineThree": "",
"LineTwo": "",
"PostalCode": "",
"Subdistrict": "",
"Subdivision": ""
},
"Age": "",
"BirthPlace": "",
"Birthday": "1992-06-10",
"BloodType": "",
"DueDate": "",
"Endorsement": "",
"ExpirationDate": "",
"FirstName": "",
"FirstNameLocal": "",
"FullName": "PU, Zongheng",
"FullNameLocal": "Pu Zongheng",
"Height": "",
"IssuedAuthority": "",
"IssuedCountry": "",
"IssuedCountryCode": "",
"IssuedDate": "08-08-25",
"IssuedPlace": "",
"LastName": "",
"LastNameLocal": "",
"LicenseNumber": "F664508(5)",
"MRZLine1": "",
"MRZLine2": "",
"MiddleName": "",
"MiddleNameLocal": "",
"Nationality": "",
"Others": "{\"FirstIssueDate\":\"(12-24)\",\"Permanent\":0,\"Symbol\":\"CX\",\"TelexCode\":\"554349122897\"}",
"PassportCodeFirst": "",
"PassportCodeSecond": "",
"PersonalNumber": "",
"RegistrationNumber": "",
"Religion": "",
"Restrictions": "",
"Sex": "Male M",
"Type": "",
"VehicleClass": "",
"Weight": ""
},
"DeviceInfoLevel": "1",
"FakeDetectResult": 1,
"HeadImage": "https://ekyc-card-test-1258344699.cos.ap-singapore.myqcloud.com/tokenOcr/head/20260706/92BB3D0FA02A24E001F8AC569771237D02D_v0.jpg?q-sign-algorithm=sha1&q-ak=*******************P0KN*hxw*8KFs******************************************************************************head************************************************15368ddbba56618c1ba406fe2891ce6a76b",
"ResultCode": "Success",
"Status": "COMPLETE",
"WarnCardInfos": [
-9108
],
"RequestId": "c41ddbee-142f-48a3-a289-7f4eab196329"
}
}
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 |
|---|---|
| AuthFailure.SignatureExpire | Token expired |
| FailedOperation.FieldException | The field value does not meet expectations. |
| FailedOperation.ImageNoIdCard | No second-generation resident identity card or temporary ID card is detected in the image. |
| FailedOperation.ImageNoSpecifiedCard | Image is not of the specified card category. |
| FailedOperation.NoHKIDCard | Not a Hong Kong, China ID card. |
| FailedOperation.NoPassport | Not a passport. |
| FailedOperation.OcrFailed | OCR recognition failed. |
| FailedOperation.UnKnowError | Unknown error. |
| FailedOperation.UnOpenError | The service has not been activated. |
| FailedOperation.WarningServiceFailed | General warning service exception |
| InvalidParameterValue.InvalidParameterValueLimit | Incorrect parameter value. |
| LimitExceeded.TooLargeFileError | File content too large. |
| ResourceUnavailable.InArrears | The account has insufficient balance. |
| ResourceUnavailable.ResourcePackageRunOut | The resource package has been exhausted. |
| ResourcesSoldOut.ChargeStatusException | The billing status is abnormal. |
文档反馈