Server-side-only (API) integration

更新时间:
复制 MD 格式

This topic describes the API for two-element identity verification. This API validates a user's name and ID card number to ensure they are authentic and consistent.

API information

Important

Before calling this API, read the integration process and activate the service.

  • API name: Id2MetaVerify

  • API description: Verifies a name and ID card number against an authoritative data source and returns the result.

  • QPS limit: This API has a dedicated QPS limit. For more information, see QPS Limit Description for Identity Verification APIs.

  • Endpoint:

    Region

    IPv4

    IPv6

    common

    cloudauth.aliyuncs.com

    cloudauth-dualstack.aliyuncs.com

    China (Beijing)

    cloudauth.cn-beijing.aliyuncs.com

    cloudauth-dualstack.cn-beijing.aliyuncs.com

    China (Shanghai)

    cloudauth.cn-shanghai.aliyuncs.com

    cloudauth-dualstack.cn-shanghai.aliyuncs.com

    Note
    • To reduce latency, select an endpoint that is geographically close to your servers.

    • You can also create a list of endpoints and poll them in rotation to improve availability.

    Important

    The Information Verification Service does not support a hard cap on call volume or automatic deactivation. To control costs and prevent high bills, configure spending alert rules after you integrate the service:

    1. Configure spending alerts: Set a spending alert rule (Set high-spending alerts) to monitor your bills in real time.

    2. Monitor data transfer plan balance: If you purchased a data transfer plan, also monitor its balance (Configure remaining quota alerts) to add resources or adjust your call policy promptly.

Request parameters

Parameter

Type

Required

Description

Example

ParamType

String

Yes

The encryption method:

  • normal: Plaintext. The value is not encrypted.

  • md5: MD5 encryption.

    Important
    • The ciphertext for all parameters must be a 32-bit lowercase MD5 string.

    • If an API call succeeds without encryption but fails with it, try using a different MD5 tool.

  • sm2: SM2 encryption.

    Important

    For details on SM2 parameter encryption, see Parameter encryption reference.

normal

IdentifyNum

String

Yes

The ID card number.

Note

Only ID numbers from Resident Identity Card and Residence Permit for Hong Kong, Macao, and Taiwan residents are supported.

  • If paramType is set to normal: Provide the ID card number in plaintext.

  • If paramType is set to md5:

    The value is a concatenation of the ID card number's first six digits (plaintext), date of birth (ciphertext), and last four digits (plaintext).

  • Plaintext: 429001********8211

  • Ciphertext:

    42900132fa7bcd874161bea8ec8fd98f390ec98211

UserName

String

Yes

The name.

  • If paramType is set to normal: Provide the name in plaintext.

  • If paramType is set to md5: The value is a concatenation of the name's first character (ciphertext) and the remaining characters (plaintext).

  • Plaintext: Zhang San

  • Ciphertext:

    6499fc7409049355527ef6a2ba5706b8San

Response parameters

Parameter

Type

Description

Example

RequestId

String

The request ID.

130A2C10-B9EE-4D84-88E3-5384FF039795

Message

String

The status message for the API call.

Important

This message provides a human-readable summary of the call status indicated by the "Code" parameter.

success

Code

String

The status code. A value of 200 indicates the call succeeded; other values indicate failure.

Important
  • This parameter indicates whether the API call was successful. For detailed descriptions of the return codes, refer to server-side error codes.

  • To see the business verification result, check the fields in ResultObject.

200

ResultObject

BizCode

String

The identity verification result:

  • 1: Match

  • 2: Mismatch

1

SDK call examples

Important

Before you integrate, read the integration process, activate the service, and get an AccessKey and configure the environment variables.

Get SDK samples and installation packages:

  • On the online API debugging page in OpenAPI, find the SDK sample code on the right. Click SDK installation information in the upper-right corner of the code sample to view installation details.

    Note

    Select the required programming language.

    image

  • For offline installation, go to the SDK installation page, select the SDK for your programming language, and download it from the publishing address.

    image

  • OpenAPI Explorer: Debug APIs online and dynamically generate SDK sample code.

  • Code sample project: Sample projects for calling the SDK in various programming languages, which can be used as a reference for integration.