DescribeCardVerify - Retrieve authentication results

更新时间:
复制 MD 格式

This topic describes how to call the DescribeCardVerify API to query authentication results.

API reference

Important

Before you call this API, make sure that you have read the onboarding process and activated the service.

API name: DescribeCardVerify

Global endpoint: cloudauth.aliyuncs.com (IPv4) or cloudauth-dualstack.aliyuncs.com (IPv6)

Request method: POST and GET

Transport protocol: HTTPS

Description: After you receive a callback notification, you can call this API on your server to retrieve the authentication status and details.

QPS limit: This API has a dedicated QPS limit. For more information, see QPS limit for information verification APIs.

Request parameters

Parameter

Type

Required

Description

Example

CertifyId

String

Yes

The ID of the authentication request.

This parameter is returned by the InitCardVerify API.

91707dc296d469ad38e4c5ef********

Response

Parameter

Type

Description

Example

RequestId

String

The ID of the request.

130A2C10-B9EE-4D84-88E3-5384********

Message

String

The message returned from the API call.

success

Code

String

The response code. A value of 200 indicates success. Other values indicate an error.

Important
  • This parameter indicates whether the API call was successful. For detailed descriptions of the return codes, refer to server-side error codes.

  • To see the business verification result, check the fields in ResultObject.

200

ResultObject

BizCode

String

The identity verification result:

  • 1: Match

  • 2: Mismatch

  • 3: No record found

1

CardInfo

String

The ID card information submitted for verification.

For details, see ResultObject.CardInfo.

{
  "address": "969 West Wenyi Road, Yuhang District, Hangzhou City, Zhejiang Province",
  "birthDate": "19901226",
  "certName": "Zhang San",
  "certNo": "1234561990122*****",
  "nationality": "Han",
  "authority": "xxx Public Security Bureau",
  "startDate": "20201130",
  "endDate": "20301130"
}

PictureInfo

String

The card images edited on the client, returned as a JSON string.

{
  "certUrl": "https://cn-shanghai-aliyun-nmeta.cn-shanghai.oss.aliyuncs.com/verify/xxxxxxx/xxxxxxxxxx_ocridface_dbf2_normal.jpeg",
  "certNationalUrl": "https://cn-shanghai-aliyun-nmeta.cn-shanghai.oss.aliyuncs.com/verify/xxxxxxxxxx/xxxxxxxxxxx_ocridback_e8a3_normal.jpeg"
}

FaceDetail

String

The face comparison score. The value ranges from 0 to 100. A higher score indicates a higher probability that the faces belong to the same person. The default threshold is 90. A score greater than or equal to 90 is considered a match.

Note

Due to adjustments in authoritative source data, the face comparison score may not be returned or may be unreliable. We recommend using the final authentication result (BizCode) as the authoritative reference.

{
  // The score for the face comparison against the public security database. A score of 90 or higher is considered a match.
  "verifyScore": 50.28594166529785
}

OcrCardInfo

String

The ID card information read using OCR.

For details, see ResultObject.CardInfo.

ResultObject.CardInfo

Parameter

Type

Description

Example

address

String

The address on the ID card.

No. 969, XX Street, XX District, XX City

birthDate

String

The date of birth on the ID card.

19901xxx

certName

String

The name on the ID card.

Zhang San

certNo

String

The ID card number.

1234561990122*****

nationality

String

The ethnicity.

Han

authority

String

The issuing authority.

xxx Public Security Bureau

startDate

String

The start date of the validity period.

20201130

endDate

String

The end date of the validity period.

20301130

SDK examples

Important

Before you integrate, read the integration process, activate the service, and get an AccessKey and configure the environment variables.

Get SDK samples and installation packages:

  • On the online API debugging page in OpenAPI, find the SDK sample code on the right. Click SDK installation information in the upper-right corner of the code sample to view installation details.

    Note

    Select the required programming language.

    image

  • For offline installation, go to the SDK installation page, select the SDK for your programming language, and download it from the publishing address.

    image