InitSmartVerify
Call the InitSmartVerify operation to initiate an enhanced real-person authentication request.
Operation: InitSmartVerify.
Endpoint: cloudauth.aliyuncs.com.
Request method: POST and GET.
Protocol: HTTPS.
Description: Call this operation before you start an authentication to obtain the CertifyId. This ID is used to link all related operations within the authentication request.
Request parameters
| Parameter | Type | Required | Example | Description |
| SceneId | Long | Yes | 100000xxxx | The authentication scene ID. Create an authentication scene in the CloudAuth console for enhanced real-person authentication to obtain the authentication scene ID. For more information, see Add an authentication scene. |
| OuterOrderNo | String | Yes | e0c34a77f5ac40a5aa5e6ed20c35xxxx | A unique business identifier from the customer server, used for tracking and troubleshooting. The value must be a unique alphanumeric string of up to 32 characters. |
| Mode | String | Yes | MARKET_SAFE | The business scenario type for enhanced real-person authentication. Valid values:
|
| CertType | String | Yes | IDENTITY_CARD | The document type. The only valid value is IDENTITY_CARD, which indicates an ID card. |
| Ocr | String | Yes | T | Specifies whether to perform document OCR. Valid values:
|
| CertName | String | Yes | Zhang San | The user's legal name. Note If Ocr is set to TCertName, this parameter is optional. |
| CertNo | String | Yes | 330103xxxxxxxxxxxx | The user's ID number. Note If Ocr is set to TCertNo, this parameter is optional. |
| MetaInfo | String | Yes | {"zimVer":"3.0.0","appVersion": "1","bioMetaInfo": "4.1.0:11501568,0","appName": "com.aliyun.antcloudauth","deviceType": "ios","osVersion": "iOS 10.3.2","apdidToken": "","deviceModel": "iPhone9,1"} | The environment parameters obtained from the client SDK. For more information, see Android client integration and iOS client integration. |
| Mobile | String | Yes | 130xxxxxxxx | The user's mobile phone number. Note If Mode is set to DEVICE_SAFEMobile, this parameter is optional. |
| Ip | String | No | 114.xxx.xxx.xxx | The user's IP address. |
| UserId | String | No | 12345xxxx | A custom user ID from your business system. The ID must be unique. |
| callbackUrl | String | No | https://www.aliyun.com | The callback URL for the authentication result. The URL must start with After the authentication is complete, the platform sends a callback to this URL with the Warning A callback is sent only after the authentication process completes, whether it passes or fails. No notification is sent if a user abandons the process, an exception occurs, or the authentication is never started. When you receive the callback, we recommend that you call the query operation for detailed authentication information. |
| CallbackToken | String | No | NMjvQanQgplBSaEI0sL86WnQplB | A security token used to prevent replay attacks and data tampering. If you provide this parameter, it is included in the callback. |
Response parameters
| Parameter | Type | Required | Example | Description |
| RequestId | String | Yes | 130A2C10-B9EE-4D84-88E3-5384FF039795 | The request ID. |
| Message | String | No | success | The response message. |
| Code | String | Yes | 200 | The status code. Valid values:
|
| ResultObject.CertifyId | String | No | 91707dc296d469ad38e4c5efa6a0xxxx | The certification ID, which uniquely identifies an enhanced real-person authentication request. You must provide this certification ID when querying the authentication result. Warning The CertifyId is a billing statistics field. We recommend that you store this ID locally for bill reconciliation. The CertifyId returned by this operation is valid for 30 minutes and can be used for only one authentication submission. Use it within the validity period and do not reuse it. |
Examples
If you need SDK examples in other programming languages, you can use OpenAPI Explorer to debug the operation online. After a successful execution, OpenAPI Explorer automatically generates an SDK example.
Error codes
| Code | Message | Description |
| 200 | success | The operation was successful. |
| 400 | Parameter cannot be empty | A required parameter is missing. |
| 401 | Illegal parameter | The name or ID number does not meet formatting requirements, such as for length or allowed characters. |
| 404 | The authentication scene does not exist | The authentication scene is not configured. You must create an authentication scene in the console. For more information, see Add an authentication scene. |
| 410 | Service is not activated | The OSS service is not activated, or the required read and write permissions for OSS have not been granted. Log on to the console to grant these permissions. |
| 411 | RAM user has no permissions | You must grant the AliyunYundunCloudAuthFullAccess permissions to the RAM user. |
| 412 | Account is overdue | Your account has an overdue bill for enhanced real-person authentication or OSS. Top up your account and try again. |
| 428 | Format validation failed | A parameter failed format validation. Check the parameter format and try again. |
| 500 | Internal server error | An internal system error occurred. Contact support through intelligent online support. |