tencent cloud

ApplyCardVerificationExternal
Terakhir diperbarui:2025-12-08 14:42:48
ApplyCardVerificationExternal
Terakhir diperbarui: 2025-12-08 14:42:48

1. API Description

Domain name for API request: ocr.intl.tencentcloudapi.com.

This API is used for general recognition of overseas cards.

The following list details the countries or regions, document types supported by the overseas document recognition API and whether the back side of the document is required:

Nationality CardType Whether the Back Side is Required
Argentina Driver's License Yes
Argentina National ID Card Yes
Argentina Passport No
Australia Driver's License Yes
Australia National ID Card Yes
Australia Passport No
Australia Residence Permit Yes
Bangladesh Driver's License Yes
Bangladesh National ID Card Yes
Bangladesh Passport No
Cambodia Driver's License Yes
Cambodia National ID Card Yes
Cambodia Passport No
Canada Driver's License No
Canada National ID Card Yes
Canada Passport Yes
Canada Residence Permit Yes
Chile Driver's License Yes
Chile National ID Card Yes
Chile Passport No
Germany Driver's License Yes
Germany National ID Card Yes
Germany Passport No
Germany Residence Permit Yes
Mexico Driver's License No
Mexico National ID Card Yes
Mexico Passport No
Myanmar Driver's License No
Myanmar National ID Card Yes
Myanmar Passport No
New Zealand Driver's License Yes
New Zealand National ID Card No
New Zealand Passport No
New Zealand Residence Permit No
Nigeria Driver's License Yes
Nigeria National ID Card Yes
Nigeria Passport No
Nigeria Residence Permit Yes
Pakistan Driver's License Yes
Pakistan National ID Card Yes
Pakistan Passport No
Russia Driver's License Yes
Russia National ID Card No
Russia Passport No
Singapore Driver's License Yes
Singapore National ID Card Yes
Singapore Passport No
Singapore Residence Permit Yes
Indonesia National ID Card No
Indonesia Driver's License No
Hong Kong, China Identity Card Yes
Thailand National ID Card No
Thailand Driver's License Yes
Malaysia National ID Card Yes
Malaysia Driver's License Yes
Singapore National ID Card Yes
Singapore Driver's License Yes
Philippines National ID Card Yes
Philippines Driver's License No
Japan National ID Card Yes
Japan Driver's License No
Macau, China Identity Card Yes
Taiwan, China Identity Card Yes
Bangladesh National ID Card Yes
Nigeria National ID Card Yes
Nigeria Driver's License Yes
Pakistan National ID Card Yes
Pakistan Driver's License Yes

A maximum of 20 requests can be initiated per second for this API.

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: ApplyCardVerificationExternal.
Version Yes String Common Params. The value used for this API: 2018-11-19.
Region Yes String Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-singapore.
Nationality Yes String Specifies the country of the document.
ARG:Argentina
AUS:Australia
KHM:Cambodia
CAN:Canada
SGP:Singapore
CHL:Chile
DEU:Germany
MEX:Mexico
MMR:Myanmar
NZL:New Zealand
BGD:Bangladesh
NGA:Nigeria
PAK:Pakistan
RUS:Russia
IDN:Indonesia
HKG:Hong Kong, China
THA:Thailand
MYS:Malaysia
JPN:Japan
PHL:Philippines
MAC:Macao, China
CHN:ChinaPermit
TWN:Taiwan, China
BGD:Bangladesh
NGA:Nigeria
PAK:Pakistan

AUTO: supports cards and documents from 200+ countries
CardType Yes String Document type.
ID_CARD
PASSPORT
DRIVING_LICENSE
RESIDENCE_PERMIT (Supported in certain countries/regions, including Australia, Canada, Germany, New Zealand, Nigeria, Singapore).
ImageBase64Front No String The Base64 value of the document Front. supported image formats: PNG, JPG/JPEG.
Supported image size: the downloaded image after Base64 encoding must be no more than 2M. image download time must be no more than 5 seconds.
Supported image resolution: between 256 * 256 and 4096 * 4096. For some documents, either ImageUrlBack or ImageBase64Back must be provided. If both are provided, only ImageUrlFront will be used.
ImageBase64Back No String The Base64 value of the reverse side of the document. Supported image formats: PNG, JPG/JPEG.
Supported image size: the downloaded image after Base64 encoding must be no more than 2M. image download time must be no more than 5 seconds.
Supported image resolution: between 256 * 256 and 4096 * 4096. For some documents, either ImageUrlBack or ImageBase64Back must be provided. If both are provided, only ImageUrlBack is used.
ImageUrlFront No String Url of the document Front. supported image formats: PNG, JPG/JPEG.
Supported image size: the downloaded image after Base64 encoding must be no more than 2M. image download time must be no more than 5 seconds.
Supported image resolution: between 256 * 256 and 4096 * 4096. For some documents, either ImageUrlBack or ImageBase64Back must be provided. If both are provided, only ImageUrlFront will be used.
ImageUrlBack No String Specifies the Url of the document Back. supported image formats: PNG, JPG/JPEG
Supported image size: no more than 2M after Base64 encoding. image download time should not exceed 5 seconds.
Supported image resolution: between 256 * 256 and 4096 * 4096. For some documents, either ImageUrlBack or ImageBase64Back must be provided. If both are provided, only use ImageUrlBack.
ReturnHeadImage No Boolean Whether to extract the ID portrait. Default value: false.

3. Output Parameters

Parameter Name Type Description
CardVerificationToken String Process token, which is used to obtain the result.
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 Applying Card Verification External Sample Call

Input Example

POST / HTTP/1.1
Host: ocr.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ApplyCardVerificationExternal
<Common request parameters>

{
    "Nationality": "ARG",
    "CardType": "PASSPORT",
    "ImageBase64Front": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD//9k="
}

Output Example

{
    "Response": {
        "CardVerificationToken": "b76914c0-e1ca-4c36-aede-b64e418d2319",
        "RequestId": "1dab853b-0f54-4479-94d8-e94dbd0c6aea"
    }
}

Example2 URL Call Example

Input Example

POST / HTTP/1.1
Host: ocr.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ApplyCardVerificationExternal
<Common request parameters>

{
    "Nationality": "PHL",
    "CardType": "PASSPORT",
    "ImageUrlFront": "http://demo/demo.jpg"
}

Output Example

{
    "Response": {
        "CardVerificationToken": "969af1aa-dbb3-49df-b661-6d952bfdce2d",
        "RequestId": "74b25e14-27bc-48fd-a4f2-638066f16e83"
    }
}

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 size is too large. refer to the image size limit in the reference input.
FailedOperation.UnKnowError Unknown error.
FailedOperation.UnOpenError The service is not activated.
InvalidParameter.EngineImageDecodeFailed Image decoding failed.
InvalidParameterValue.InvalidFileContentSize The size of the image file content is abnormal.
InvalidParameterValue.InvalidParameterValueLimit Incorrect parameter value.
ResourceUnavailable.ImageDownloadError Image file download failed.
ResourceUnavailable.InArrears The account is in arrears.
ResourceUnavailable.ResourcePackageRunOut The account resource package is exhausted.
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
Ya
Tidak

masukan