All Products
Search
Document Center

ID Verification:Use OpenAPI

Last Updated:Jul 01, 2026

Debug ID Verification server-side APIs on the Alibaba Cloud OpenAPI portal and get SDK sample code for integration.

Prerequisites

You have activated ID Verification service.

Server-side API endpoints

Note

Endpoints vary by API service. Check the API documentation for the correct endpoint.

China (Hong Kong)

  • Public endpoint: cloudauth-intl.cn-hongkong.aliyuncs.com

  • Internal endpoint: cloudauth-intl-vpc.cn-hongkong.aliyuncs.com

Singapore

  • Public endpoint: cloudauth-intl.ap-southeast-1.aliyuncs.com

  • Internal endpoint: cloudauth-intl-vpc.ap-southeast-1.aliyuncs.com

Indonesia

  • Public endpoint: cloudauth-intl.ap-southeast-5.aliyuncs.com

  • Internal endpoint: cloudauth-intl-vpc.ap-southeast-5.aliyuncs.com

Germany (Frankfurt)

  • Public endpoint: cloudauth-intl.eu-central-1.aliyuncs.com

  • Internal endpoint: cloudauth-intl-vpc.eu-central-1.aliyuncs.com

US (Silicon Valley)

  • Public endpoint: cloudauth-intl.us-west-1.aliyuncs.com

  • Internal endpoint: cloudauth-intl-vpc.us-west-1.aliyuncs.com

Malaysia (Kuala Lumpur)

  • Public endpoint: cloudauth-intl.ap-southeast-3.aliyuncs.com

  • Internal endpoint: cloudauth-intl-vpc.ap-southeast-3.aliyuncs.com

Integration methods

Alibaba Cloud provides SDKs for popular programming languages that encapsulate the ID Verification APIs. Use an SDK to call APIs without handling low-level details.

If the SDKs do not meet your requirements, you can construct signed HTTPS requests manually. The signature process is complex, so evaluate whether this approach is justified.

Integration method

Description

Alibaba Cloud SDK

For supported programming languages, SDK versions, and installation instructions, see the ID Verification SDK Center.

Online debugging and sample code

In the API documentation, use the Debugging section to access the Response or SDK Sample Code page.image

Step

Description

1

Go to the ID Verification OpenAPI portal and sign in to your Alibaba Cloud account.

2

Select or search for the target API. If you navigated from the API documentation, the corresponding API page opens automatically.

3

Select an endpoint. The code sample on the right updates accordingly.

Note

Endpoints vary by API service. Check the API documentation for the correct endpoint.

4

Enter the debugging parameters. Filled parameters appear in the code sample on the right. To call the API online, click Initiate Call at the bottom right. The result displays on the Call Result page.

Note

Fees may apply for paid API calls.

5

At the top of the right-side panel, click SDK Sample Code.

6

Select an SDK version and programming language.

Note

SDK V2.0 is recommended for improved security and efficiency.

7

The code sample updates in real time as you change settings. In the upper-left corner of the code area:

  • Click Example to run the sample code online.

  • Click Download Project to download the project locally.

In the upper-right corner of the code area:

  • Click SDK installation information to view dependency installation instructions.

Warning

Reuse the Client instance provided by the Alibaba Cloud SDK across multiple requests. Do not create a new Client instance for each request, as this may cause performance issues.

Access credentials

ID Verification API calls require valid access credentials for authentication. Common credential types include:

  • AccessKey: An AccessKey (AK) is a permanent credential consisting of an AccessKey ID and AccessKey Secret, issued to Alibaba Cloud accounts and RAM users. For more information, see Create an AccessKey.

  • STS Token: A Security Token Service (STS) token is a temporary credential issued to RAM roles with configurable validity period and permissions. For more information, see What is Security Token Service (STS)?.

Note

If you use a RAM user or RAM role to call ID Verification APIs, after creating the RAM user or RAM role, contact your system administrator to grant policy AliyunAntCloudAuthFullAccess.

Leaked credentials pose security risks. Use the following solutions to protect your access credentials:

Credential type

Solution

Applicable scenario

AccessKey

Configure environment variables in Linux, macOS, and Windows systems

Store credentials in system environment variables to configure credentials for calling Alibaba Cloud OpenAPIs.

STS Token

Container instance role assumption

For applications on Alibaba Cloud ACK (Container Service for Kubernetes) clusters, use RRSA (RAM Roles for Service Accounts) to assign independent RAM roles per application.

Follow the Best practices for using access credentials to access Alibaba Cloud OpenAPI.

Errors and solutions

Troubleshoot common integration issues:

SDK language

How to catch exceptions

Common issues and solutions

Java

Java exception handling

Java FAQ

Python

Python exception handling

Python FAQ

PHP

PHP exception handling

PHP FAQ

TypeScript

TypeScript exception handling

TypeScript FAQ

.NET

.NET exception handling

.NET FAQ

Go

Go exception handling

Go FAQ

SDK integration FAQ

Sample code reference

Follow the steps in the Online debugging and sample code section to get sample code from the OpenAPI Portal. In addition, we provide a limited number of ready-to-run sample code examples for your reference. See IDV server-side sample code.

Address high API call latency

For high latency when calling server-side APIs, refer to Server-side network latency analysis and optimization for troubleshooting and optimization guidance.

Construct HTTPS requests manually

To construct HTTPS requests manually, see Request structure and signature mechanism.