Domain name for API request: faceid.intl.tencentcloudapi.com.
This API is used to apply for a token before calling the eKYC SDK service each time. This token is required for initiating the verification process and getting the result after the verification is completed.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: ApplySdkVerificationToken. |
| Version | Yes | String | Common Params. The value used for this API: 2018-03-01. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-bangkok, ap-hongkong, ap-jakarta, ap-singapore, sa-saopaulo. |
| CheckMode | No | Integer | The verification mode. Valid values: 1: OCR + liveness detection + face comparison 2: Liveness detection + face comparison 3: Liveness detection Default value: 1 |
| SecurityLevel | No | Integer | The security level of the verification. Valid values: 1: Video-based liveness detection 2: Motion-based liveness detection 3: Reflection-based liveness detection 4: Motion- and reflection-based liveness detection Default value: 4 |
| IdCardType | No | String | Specifies the identity document type used for authentication. valid values:. HK (default): hong kong (china) identity card. 2. ML: malaysian identity card. Indonesian identity card. 4. PhilippinesVoteID: specifies the voter card in the philippines. 5. PhilippinesDrivingLicense: specifies the driving license in philippines. 6. PhilippinesTinID: specifies the philippines tin id. 7. PhilippinesSSSID: specifies the SSSID in the philippines. 8. philippines UMID: specifies the philippines UMID. 9. MLIDPassport: specifies the passport for hong kong (china), macao (china), and taiwan (china) as well as overseas passports. ThailandIDCard: specifies the thai identity card. Mainland id card. 12. SingaporeIDCard: specifies the Singapore id card. 13. HMTPermit: specifies the hong kong, macau and taiwan travel permit. |
| CompareImage | No | String | The Base64-encoded value of the photo to compare, which is required only when CheckMode is set to 2. |
| DisableChangeOcrResult | No | Boolean | Whether to forbid the modification of the OCR result by users. Default value: false (modification allowed). (Currently, this parameter is not applied.) |
| DisableCheckOcrWarnings | No | Boolean | Whether to disable the OCR warnings. Default value: false (not disable), where OCR warnings are enabled and the OCR result will not be returned if there is a warning.This feature applies only to Hong Kong (China) identity cards, Malaysian identity cards, and passports. |
| SelectedWarningCodes.N | No | Array of Integer | Customize which alarm codes to block. If left blank, all alarm codes will be blocked by default. Optional alarm codes are: -9101 (occlusion or incomplete border), -9102 (photocopying), -9103 (screen capture by camera), -9104 (image editing/PS modification), -9107 (glare/reflection), -9108 (blurriness), -9901 (other alarms). |
| Extra | No | String | A passthrough field, which is returned together with the verification result and can contain up to 1,024 bits. |
| SdkVersion | No | String | ENHANCED: enhanced. BASIC: basic version (default). |
| ActionList | No | String | This interface is used to control th action sequences. Action types are as follows: "blink" "mouth" "nod" "shake" You can choose 1-2 actions out of the four. Single action example: "blink" Multiple action example: "blink,mouth" The default value is blink. The different action types passed in this parameter take effect only when the SecurityLevel is 2 or 4; otherwise, the interface reports an error. |
| AllowExpiredDocument | No | Boolean | Whether expired identity documents are permitted to proceed to the liveness detection process. This parameter only takes effect when the document type is Hong Kong Identity Card (HKID). true (default value): Expired HKID is allowed to enter the liveness process. false : Expired HKID is rejected and cannot enter the liveness process. |
| Parameter Name | Type | Description |
|---|---|---|
| SdkToken | String | A token that identifies an SDK verification process. the validity time is 10 minutes. after the process is complete, the token can be used to retrieve the verification result. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to apply for a verification token.
POST / HTTP/1.1
Host: faceid.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ApplySdkVerificationToken
<Common request parameters>
{
"CheckMode": 1,
"SecurityLevel": 4,
"NeedVerifyIdCard": true,
"Extra": "fewfewf",
"IdCardType": "HK"
}{
"Response": {
"SdkToken": "A561B769-C347-4724-A69A-6C3B3483E107",
"RequestId": "d73c0c05-f7ff-419c-84cb-0756303b1925"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
There is no error code related to the API business logic. For other error codes, please see Common Error Codes.
Feedback