This topic describes how to call the Initialize operation to initiate a document verification request.
Initiate a verification request
Operation name: Initialize.
Endpoint: cloudauth-intl.cn-hongkong.aliyuncs.com.
Request method: HTTPS POST.
Operation description: Before you start a verification process, you must call this operation to obtain a transaction ID for different operations that are involved in the verification process.
Request parameters
Parameter | Type | Required | Description | Example |
ProductCode | String | Yes | The solution that you want to use. Set the value to IDR_GLOBAL. | IDR_GLOBAL |
MerchantBizId | String | Yes | The unique identifier of your business, which is used for troubleshooting. You can specify a custom value that is 32 characters in length and contains letters and digits. Note ID Verification does not check the uniqueness of the value. For tracing purposes, we recommend that you specify a unique value. | e0c34a77f5ac40a5aa5e6ed20c35**** |
MetaInfo | String | The environment parameters, which are obtained by using a client SDK. For more information, see Integration by using the APP SDK mode. Note Specify the obtained parameters as environment parameters. You do not need to modify the parameters. |
| |
MerchantUserId | String | Yes | The ID of a customer. You can specify a custom value, such as a mobile phone number or an email address. Before you specify a value, we recommend that you perform data masking. For example, you can perform hashing. | 123456789 |
DocType | String | Yes | The document type. You can specify an 8-digit value to uniquely identify a document type. For more information, see the "Document types" section of this topic. | 01560000 |
DocScanMode | String | No | The mode in which the photo of a document is collected. Valid values: manual | manual |
ProductFlow | String | No | The sequence of document recognition and face liveness verification. Valid values:
| DOC_FACE |
CallbackUrl | String | No | The callback URL that is used to notify the verification result. The GET method is used to send callback request by default. The callback URL must start with | https://www.aliyun.com?callbackToken=1000004826&transactionId=shaxxxx&passed=Y&subCode=200&code=Success |
CallbackToken | String | No | The security token that is used for anti-duplication and anti-tampering verification. You can specify a custom value. If the CallbackToken parameter is specified, the specified value is displayed in the specified callback URL. | NMjvQanQgplBSaEI0sL86WnQplB |
Document types
You can click Supported document types in common countries and regions and Supported document types in other countries and regions to download the lists of supported document types in different countries and regions.
Response parameters
Parameter | Type | Description | Example | |
HTTP Status Code | Integer | The HTTP status code. | 200 | |
HTTP Body | RequestId | String | The request ID. | 130A2C10-B9EE-4D84-88E3-5384FF039795 |
Code | String | The code that is returned for the request. For more information, see HTTP status codes and messages. | Success | |
Message | String | The message that is returned for the request. | success | |
Result.TransactionId | String | The unique identifier of the verification process. This parameter is used for billing. This parameter is also used to call the CheckResult operation. Note If an error occurred in the request, such as an invalid parameter, Result.TransactionId is not returned. | hksb7ba1b28130d24e015d694361bee4 |
HTTP status codes and messages
Code | Message | Description |
200 | Success | The request is successful. |
400 | MissingParameter | A required parameter is empty. |
400 | InvalidParameter | A parameter is set to an invalid value. |
401 | OcrFail | Text parsing failed. |
403 | Forbidden.RAMUserAccessDenied | The RAM user is not granted the required permission AliyunAntCloudAuthFullAccess. |
403 | Forbidden.AccountAccessDenied | The account has overdue payments. We recommend that you top up your account and try again. |
403 | Throttling.Api | API throttling is triggered. |
403 | HighRisk | The number of verification failures exceeds the upper limit on the current day. Try again tomorrow. |
500 | InternalError | An internal error occurred. To troubleshoot the error, we recommend that you submit your feedback to engineers. |