This topic describes how to query authentication results using the CheckResult API operation.
API information
API operation: CheckResult
Request method: HTTPS POST
Description: When the server-side receives a callback indicating that authentication is complete, call this API to retrieve the corresponding authentication status and information. This callback is sent when the client result code is 1001 or 1002. For more information, see Native SDK client result codes and sub-codes.
ImportantThe ID Verification service stores verification results for 30 days by default. Please retrieve them within this period, as they are automatically deleted afterward.
QPS limit: Each API has its own QPS limit. For more information, see QPS limits of ID Verification server-side APIs.
Service endpoint:
NoteBenefits of internal network access: An internal network is a private communication network connecting Alibaba Cloud products within the same region. If your application server is deployed in the same region, use the internal endpoint to access the ID Verification service for enhanced security and stability.
Optimizing overseas access: Overseas network environments can be complex. Refer to Optimize server network latency to tune your integration and reduce network latency and request failures.
Asia Pacific SE 1 (Singapore)
Public endpoint:
cloudauth-intl.ap-southeast-1.aliyuncs.comInternal endpoint:
cloudauth-intl-vpc.ap-southeast-1.aliyuncs.com
Indonesia
Public endpoint:
cloudauth-intl.ap-southeast-5.aliyuncs.comInternal endpoint:
cloudauth-intl-vpc.ap-southeast-5.aliyuncs.com
China (Hong Kong)
Public endpoint:
cloudauth-intl.cn-hongkong.aliyuncs.comInternal endpoint:
cloudauth-intl-vpc.cn-hongkong.aliyuncs.com
Asia Pacific SE 3 (Kuala Lumpur)
Public endpoint:
cloudauth-intl.ap-southeast-3.aliyuncs.comInternal endpoint:
cloudauth-intl-vpc.ap-southeast-3.aliyuncs.com
Online debugging and integration
Before debugging and integration, read the Use OpenAPI document to learn how to call APIs on the OpenAPI platform and obtain the SDK.
You can test this API operation directly in OpenAPI Explorer, and generate SDK sample code.
Integration notes
TransactionId storage: The TransactionId is a trusted server-side identifier for an authentication record. It must be bound to your business ID and stored persistently on the App Server.
Log retention period: Authentication result logs are stored for 30 days by default and then automatically deleted. You must query the results within this period and save the required data in compliance with relevant regulations.
Video acquisition and retention compliance: A video is returned only when the corresponding feature is enabled and the authentication is successful. The download URL for the evidence video is valid for 15 minutes. The original video is automatically deleted 30 minutes after the authentication is complete. If your business needs to retain the video, download it promptly and strictly comply with local privacy and data compliance requirements.
Image acquisition: An authentication image is returned only when IsReturnImage is set to Y and the face liveness verification is successful. Because Base64-encoded data is large, keep this parameter set to its default value of N if you do not need to display or retain the image.
API status vs. authentication result: A Code value of Success indicates only that the API operation was called successfully. The final authentication result depends on the Result.Passed and Result.SubCode fields.
Troubleshooting authentication failures: If Passed is N, analyze the SubCode and ExtFaceInfo fields to determine the cause of the failure.
Field distribution
Both App SDK and Web SDK integrations use the same CheckResult API operation and query parameters. The main authentication result structure is consistent. The main differences are the extension fields of ExtFaceInfo and the fallback information for mobile H5.
Category | Field | Description |
Shared outputs | Common response, authentication result | Returned in both integration modes. Whether it is returned depends on the authentication flow and the InitializeV2 configuration. |
Web SDK specific |
| Face quality, occlusion, age, gender, and the actual fallback policy on the web client. |
App specific | None | None |
Request parameters
Field | Type | Required | Description | Example |
MerchantBizId | String | Yes | A unique business ID from the merchant, consisting of 32 letters and numbers. It must be consistent with the value used in the InitializeV2 request. | e0c34a77f5ac40a5aa5e6ed20c35**** |
TransactionId | String | Yes | The unique authentication identifier returned by a successful init API call. To prevent tampering, always retrieve this value from your server-side storage and do not trust the value sent from the client-side. | hksb7ba1b28130d24e015d6******** |
IsReturnImage | String | No | Specifies whether to return authentication images. If the package includes a certificate, the certificate image is also returned.
| Y |
Response data
Name | Type | Description | Example | |
HTTP Status Code | Integer | The HTTP status code. | 200 | |
HTTP Body | RequestId | String | The request ID, which is used for troubleshooting. | 130A2C10-B9EE-4D84-88E3-5384FF03**** |
Code | String | The server-side return code. For more information, see Server-side HTTP status codes. | Success | |
Message | String | A detailed description of the return code. | success | |
Result.Passed | String | The final authentication result. Valid values:
| Y | |
Result.SubCode | String | A description of the authentication result. For more information, see Result.SubCode authentication result sub-codes. | 200 | |
Result.ExtFaceInfo | String | The results of face liveness verification. For more information, see Result.ExtFaceInfo. | | |
Result.ExtInfo | String | Other authentication information, which mainly includes the actual fallback information for mobile H5. For more information, see Result.ExtInfo. | | |
Result.ExtFaceInfo
Name | Type | Description | Example |
faceImg | String | The live face image in Base64 format. Returned only when | Base64 format |
docVideoUrl | String | The OSS download URL for the evidence video. This may be returned only when the | https://aliyun-cloudauth.oss-aliyuncs.com/******.webm |
faceAttack | String | Indicates whether a liveness attack was detected:
| N |
faceAttackScore (Deprecated) | Double | The liveness attack risk score, ranging from 0 to 100. The risk of liveness attacks is now determined by a Large Language Model (LLM), so the concept of a risk score is no longer applicable. This field is offline. | 80 |
guardRiskScore | Double | The device risk score, ranging from 0 to 100. A higher score indicates a higher device risk. | 90 |
deviceToken | String | The DeviceToken for Face Guard. It is returned when the Face Guard module is fully integrated and can be used to query the Face Guard server-side API operations to get device risk details.
| e0c34a77f5ac40a5aa5e6ed20c35**** |
faceAttributeInfo | String | Detects the facial attributes of the main face in an input image. The main face is the one that is largest, clearest, and closest to the camera. The detection results are returned as a string. You can use this string to make decisions about the content. The returned fields are defined as follows:
| |
Result.ExtInfo
Field | Type | Description |
procedurePriority | String | The actual downgrade method for mobile H5 authentication:
|
Result.SubCode authentication result sub-codes
Error code | Billing for authentication records | Description and suggestions |
200 | Yes | The authentication is passed. |
205 | Yes | [Liveness Attack] A risk was detected during liveness detection. |
206 | Yes | [Liveness Attack] Limited by business policy. After safe mode is enabled, the device and environment are checked for security. If a potential risk is detected, the authentication fails. You can troubleshoot and handle this as follows:
|