tencent cloud

文档反馈

ApplyCardVerification

最后更新时间:2024-09-19 10:41:06

1. API Description

Domain name for API request: faceid.tencentcloudapi.com.

The types of national cards supported by the API and whether instructions on the back of the card are required are as follows:

Nationality CardType Back side required
Indonesia ID card No
Indonesia Driving License No
Hongkong ID card Yes
Thailand ID card No
Thailand Driving License Yes
Malaysia ID card Yes
Malaysia Driving License Yes
Singapore ID card Yes
Singapore Driving License Yes
Philippine ID card Yes
Philippine Driving License No
Japan ID card Yes
Japan Driving License No
Taiwan ID Card Yes
We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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: ApplyCardVerification.
Version Yes String Common Params. The value used for this API: 2018-03-01.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-hongkong, ap-jakarta, ap-singapore.
Nationality Yes String Please select the country code of ID document.
IDN: Indonesia
HKG: Hong Kong
THA: Thailand
MYS: Malaysia
SGP: Singapore
JPN: Japan
TWN:Taiwan
AUTO: Automatic Identification
CardType Yes String Please select the type of ID document. The supported options are:
ID_CARD
PASSPORT
DRIVING_LICENSE
AUTO
ImageBase64Front No String Base64 value for the front of the document. Supported image formats: PNG, JPEG.
GIF format is not supported yet. Supported image size: The downloaded image cannot exceed 5M after Base64 encoding.
The image download takes no more than 3 seconds. Supported image resolution: 8000*8000. One of ImageUrlFront and ImageBase64 Front of the image must be provided. If both are provided, only ImageUrlFront will be used.
ImageBase64Back No String Base64 value of the reverse side of the document. Supported image formats: PNG, JPEG.
GIF format is not supported yet. Supported image size: The downloaded image cannot exceed 5M after Base64 encoding. The image download takes no more than 3 seconds. Maximum supported image resolution: 8000*8000. For some certificates, one of ImageUrlBack and ImageBase64Back must be provided. If both are provided, only ImageUrlBack will be used.
ImageUrlFront No String The URL value on the back of the certificate. Supported image formats: PNG, JPEG.
GIF format is not supported yet. Supported image size: The downloaded image cannot exceed 5M after Base64 encoding. The image download takes no more than 3 seconds. Maximum supported image resolution: 8000*8000. One of ImageUrlFront and ImageBase64Front of the image must be provided. If both are provided, only ImageUrlFront will be used.
ImageUrlBack No String The URL value on the back of the certificate. Supported image formats: PNG, JPEG.
GIF format is not supported yet. Supported image size: The downloaded image cannot exceed 5M after Base64 encoding. The image download takes no more than 3 seconds. Maximum supported image resolution: 8000*8000. For some certificates, one of ImageUrlBack and ImageBase64Back must be provided. If both are provided, only ImageUrlBack will be used.

3. Output Parameters

Parameter Name Type Description
CardVerificationToken String The token used to identify an verification process. It can be used to get the verification result after the process is completed.
AsyncCardVerificationMaxPollingTimes Integer The maximum number of polls for calling the pull result interface polling.
AsyncCardVerificationPollingWaitTime Integer The interval for polling when calling the pull result interface (in seconds).
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.

4. Example

Example1 Sample response

Input Example

POST / HTTP/1.1
Host: ocr.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ApplyIDVerification
<common parameters>

{
    "ImageBase64Front": "abc",
    "ImageBase64Back": "abc",
    "ImageUrlFront": "abc",
    "ImageUrlBack": "abc",
    "Nationality": "abc",
    "CardType": "abc"
}

Output Example

{
    "Response": {
        "CardVerificationToken": "abc",
        "RequestId": "abc"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.ImageSizeTooLarge The image is too large.
FailedOperation.UnKnowError Unknown error.
FailedOperation.UnOpenError The service is not activated.
InvalidParameter.EngineImageDecodeFailed Image decoding failed.
InvalidParameterValue.InvalidFileContentSize The image file content size is abnormal.
InvalidParameterValue.InvalidParameterValueLimit Parameter value is wrong.
ResourceUnavailable.ImageDownloadError Image file download failed.
ResourceUnavailable.InArrears The account is in arrears.
ResourceUnavailable.ResourcePackageRunOut The account has exhausted the resource package for this service.