This topic describes how to submit a recognition task to the asynchronous credential detection service. Calling this API operation is the first step in using the asynchronous service.
API information
Operation name: CredentialSubmitIntlV2
Description: Submits a recognition task to the asynchronous credential detection service.
Request method: POST
Transport protocol: HTTPS
QPS limit: Each API has its own QPS limit. For more information, see QPS limits of ID Verification server-side APIs.
Endpoints:
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
The forgery detection feature is an AI-based prediction product. It achieves 90% accuracy on internal test datasets. Actual accuracy may vary due to differences in real-world scenarios.
The forgery detection performs better on images captured by a camera than on digitally synthesized or altered images.
Do not rely on forgery detection as the sole method for verifying credential authenticity. Use it as a supplement to manual review or as a tool to improve review efficiency.
Forgery detection is widely used for reviewing electronic materials in scenarios such as financial payment acquiring and e-commerce merchant onboarding, effectively improving manual review efficiency. If you need to use this feature in other scenarios, contact your business manager.
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 use OpenAPI Explorer to debug this operation and automatically generate SDK code examples.
Request parameters
The file corresponding to the CredentialOcrPictureBase64, CredentialOcrPictureUrl, or CredentialOcrPictureFile parameter must meet the following requirements:
Submission method: Choose one of the three upload methods.
File format: When
FileInputType=IMAGE(default), the supported formats are PNG, JPG, JPEG, BMP, and WebP. WhenFileInputType=PDF, the supported format is PDF.File dimensions: Both width and height must be greater than 15 pixels and less than 8,192 pixels, and the aspect ratio must be less than 50.
File size: Cannot exceed 10 MB.
For optimal recognition results, we recommend that both the width and height of the image are greater than 500 pixels.
Large files can increase the API response time. We recommend using files smaller than 3 MB.
Parameter | Type | Required | Description | Example |
ProductCode | String | Yes | Set the value to CREDENTIAL_RECOGNITION. | CREDENTIAL_RECOGNITION |
SceneCode | String | No | A custom authentication scenario ID. You can use this ID to query related records in the console. The ID can contain up to 10 letters, digits, and underscores (_). | 1234567890 |
MerchantBizId | String | Yes | A custom unique business ID used for troubleshooting. It can contain up to 32 letters and digits. Ensure that the ID is unique. Note Alibaba Cloud does not enforce uniqueness for this parameter. For better traceability, we strongly recommend that you use a unique ID for each request. | - |
CredentialOcrPictureBase64 | String | No. Use only one of the three parameters to upload the file. | The Base64-encoded content of the image or PDF file. If you use this parameter, make sure the file does not exceed the size limit. | base64 |
CredentialOcrPictureUrl | String | The URL of the image or PDF file. The URL must be a publicly accessible HTTP or HTTPS link. | https://***.jpg | |
CredentialOcrPictureFile | InputStream | The file stream of the credential. For more information, see Advanced feature: Configure file upload. | ||
FileInputType | String | No | The input file type.
| IMAGE |
DocType | String | Yes | The credential type:
| 02 |
OcrArea | String | Yes | The extraction type:
| 0201 |
FraudCheck | String | Yes | Specifies whether to enable tamper detection.
| true |
CheckRuleConfig | String | No | The field validation rule configuration, specified as a JSON string. | |
OcrValueStandard | String | No | Specifies whether to standardize OCR results.
| 0 |
OcrTranslation | String | No | Specifies whether to enable translation.
| 0 |
Response parameters
Parameter | Type | Description | Example | |
HTTP status code | Integer | The HTTP status code. | 200 | |
HTTP Body | RequestId | String | The unique ID for the request. | 130A2C10-B9EE-4D84-88E3-5384FF039**** |
Result.TransactionId | String | The unique ID for the entire process. | hksb7ba1b28130d24e015d694361b**** | |
Code | String | The result code. For details, see Server-side HTTP status codes. Important
| Success | |
Message | String | A message that provides details about the response. | success | |