tencent cloud

GetFaceIdTokenIntl

Baixar
Modo Foco
Tamanho da Fonte
Última atualização: 2026-05-22 14:17:03

1. API Description

Domain name for API request: faceid.intl.tencentcloudapi.com.

This API is used to apply for an SDK token before calling the selfie verification SDK each time. The SDK token is used throughout the eKYC process and to get the verification result after the verification is completed. A token is valid for one eKYC process only.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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: GetFaceIdTokenIntl.
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.
CheckMode No String

Indicates the detection mode. Parameter values as follows:
"liveness": liveness detection only;
"compare": liveness detection + face comparison;
Default value: "liveness".

SecureLevel No String

Indicates the security level of authentication. Security levels are divided into:
"1": silent liveness;
"2": action liveness detection;
"3": light liveness;
"4": action + light liveness;
Default value is "4".


Note: Security level increases from 1 to 4, with 4 providing the highest security.
Image No String

The base64 code of the image for comparison, used for the "liveness comparison" mode. This parameter is required when CheckMode is "compare".

Extra No String

This parameter is a business passthrough parameter and can be omitted unless otherwise needed.

ActionList No String

This API is used to control the sequence of actions. The action types are as follows:
"blink"
"mouth"
"nod"
"shake"
Choose 1-2 actions from the four.
Single action example: "blink"
Multi-action example: "blink,mouth".
Default value is blink.
Input this parameter only when SecureLevel is 2 or 4 for different action types to take effect; otherwise, the API returns an error.

SdkVersion No String

PLUS: PLUS version, PRO: PRO version, ENHANCED: enhanced, BASIC: basic (default)

RetryLimit No Integer

Liveness retry count

Value ranges from 1 to 5

Default value: 5

3. Output Parameters

Parameter Name Type Description
SdkToken String

SdkToken, used to connect the identity verification process. The verification result can be retrieved with this token. Each SdkToken has a validity of 10 minutes.

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.

4. Example

Example1 GetFaceIdTokenIntl Example

Specify liveness retry count, call succeeded

Input Example

POST / HTTP/1.1
Host: faceid.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: GetFaceIdTokenIntl
<Common request parameters>

{
    "CheckMode": "liveness",
    "RetryLimit": 1
}

Output Example

{
    "Response": {
        "RequestId": "ace1147a-d761-49a2-a180-0c95263b50ff",
        "SdkToken": "C8CFF283-539AF-014E77-A5CF-DD9CAD93EFE2"
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
FailedOperation.ImageSizeTooLarge The image is too large.
InternalError Internal error.
InvalidParameter Invalid parameter.

Ajuda e Suporte

Esta página foi útil?

comentários