InitSmartVerify

Updated at:

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

ParameterTypeRequiredExampleDescription
SceneIdLongYes100000xxxx

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.

OuterOrderNoStringYese0c34a77f5ac40a5aa5e6ed20c35xxxxA 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.
ModeStringYesMARKET_SAFEThe business scenario type for enhanced real-person authentication. Valid values:
  • MARKET_SAFE: marketing security.
  • FINANCE_SAFE: financial security.
  • ACCOUNT_SAFE: registration security.
  • DEVICE_SAFE: device security.
CertTypeStringYesIDENTITY_CARDThe document type. The only valid value is IDENTITY_CARD, which indicates an ID card.
OcrStringYesTSpecifies whether to perform document OCR. Valid values:
  • T: Perform document OCR.
  • F: Do not perform document OCR.
CertNameStringYesZhang SanThe user's legal name.
Note If Ocr is set to TCertName, this parameter is optional.
CertNoStringYes330103xxxxxxxxxxxxThe user's ID number.
Note If Ocr is set to TCertNo, this parameter is optional.
MetaInfoStringYes{"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.

MobileStringYes130xxxxxxxxThe user's mobile phone number.
Note If Mode is set to DEVICE_SAFEMobile, this parameter is optional.
IpStringNo114.xxx.xxx.xxxThe user's IP address.
UserIdStringNo12345xxxx

A custom user ID from your business system. The ID must be unique.

callbackUrlStringNohttps://www.aliyun.com

The callback URL for the authentication result. The URL must start with https.

After the authentication is complete, the platform sends a callback to this URL with the certifyId, passed, and subcode fields automatically appended. Example: https://www.aliyun.com?certifyId=xxxx&passed=T&subcode=200.

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.

CallbackTokenStringNoNMjvQanQgplBSaEI0sL86WnQplBA security token used to prevent replay attacks and data tampering. If you provide this parameter, it is included in the callback.

Response parameters

ParameterTypeRequiredExampleDescription
RequestIdStringYes130A2C10-B9EE-4D84-88E3-5384FF039795The request ID.
MessageStringNosuccessThe response message.
CodeStringYes200The status code. Valid values:
  • 200: The request was successful.
  • Other values: The request failed. For more information, see Error codes.
ResultObject.CertifyIdStringNo91707dc296d469ad38e4c5efa6a0xxxx

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

See Java SDK example.
Note

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

CodeMessageDescription
200successThe operation was successful.
400Parameter cannot be emptyA required parameter is missing.
401Illegal parameterThe name or ID number does not meet formatting requirements, such as for length or allowed characters.
404The authentication scene does not existThe authentication scene is not configured. You must create an authentication scene in the console.

For more information, see Add an authentication scene.

410Service is not activatedThe 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.
411RAM user has no permissionsYou must grant the AliyunYundunCloudAuthFullAccess permissions to the RAM user.
412Account is overdueYour account has an overdue bill for enhanced real-person authentication or OSS. Top up your account and try again.
428Format validation failedA parameter failed format validation. Check the parameter format and try again.
500Internal server errorAn internal system error occurred. Contact support through intelligent online support.