Alibaba Cloud
Integrate Alibaba Cloud for ID card verification
Alibaba Cloud (Aliyun) offers a financial-grade ID verification service that specializes in validating national ID cards. This service verifies whether the provided ID number matches the real name through government databases, making it ideal for applications serving users.
Getting Started
You need an Alibaba Cloud account with the ID Verification (Real Person Verification) service enabled. Register at aliyun.com if needed.
To get credentials: log in to the Alibaba Cloud console → AccessKey management → create an AccessKey pair (Access Key ID and Secret Access Key). Enable the Real Person Verification service for your account.
The service uses the Id2MetaVerify API to verify ID cards against government records.
Configuration
Create a new provider in Hanzo IAM:
- Go to Providers and click Add
- Set Category to "ID Verification"
- Select Type as "Alibaba Cloud"
- Fill in the credentials:
- Access key: Your Alibaba Cloud Access Key ID
- Secret access key: Your Alibaba Cloud Secret Access Key
- Endpoint: Leave empty to use the default (
cloudauth.cn-shanghai.aliyuncs.com) or specify a custom endpoint
- Save and add the provider to your application
Usage
When users verify their identity, Hanzo IAM submits their ID card number and real name to Alibaba Cloud. The service checks whether these details match the records in national ID database.
Verification succeeds when:
- The ID card number format is valid
- The ID card exists in the government database
- The provided name matches the registered name for that ID card
After successful verification, the user's identity fields are locked and cannot be changed.
Requirements
- Users must have valid national ID cards (supports both 15-digit and 18-digit ID numbers)
- Both the ID card number and real name fields must be filled in before verification
- Your Alibaba Cloud account must have sufficient API call quotas
Testing
Test your configuration from the provider edit page in Hanzo IAM. Make sure to use valid test credentials provided by Alibaba Cloud to avoid consuming your production quota during development.
How is this guide?
Last updated on