tencent cloud

文档反馈

GenerateReflectSequence

最后更新时间:2024-04-03 11:45:34

    1. API Description

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

    This API is used to generate an appropriate light sequence based on the information collected by the liveness comparison (reflection-based) SDK and pass the light sequence into the SDK to start the identity verification process.
    The data generated with the SDK must be stored in COS, and the region of the COS bucket must be same as that of requests made with this API. We recommend that you pass resources with upload link APIs.

    A maximum of 5 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: GenerateReflectSequence.
    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-singapore.
    DeviceDataUrl Yes String The resource URL of the data package generated by the SDK.
    DeviceDataMd5 Yes String The MD5 hash value of the data package generated by the SDK.
    SecurityLevel No String 1 - silent
    2 - blinking
    3 - light
    4 - blinking + light (default)

    3. Output Parameters

    Parameter Name Type Description
    ReflectSequenceUrl String The resource URL of the light sequence, which needs to be downloaded and passed through to the SDK to start the identity verification process.
    ReflectSequenceMd5 String The MD5 hash value of the light sequence, which is used to check whether the light sequence is altered.
    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 Obtaining a light sequence

    Input Example

    POST / HTTP/1.1
    Host: faceid.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: GenerateReflectSequence
    <Common request parameters>
    
    {
        "DeviceDataUrl": "https://faceid-resource-sg-1254418846.cos.ap-singapore.myqcloud.com/faceid%2FApplyWebVerificationToken%2F1300268875%2F20b11b59-572d-406d-8d94-e6e05782134c",
        "DeviceDataMd5": "d41d8cd98f00b204e9800998ecf8427e"
    }
    

    Output Example

    {
        "Response": {
            "ReflectSequenceUrl": "https://faceid-resource-sg-1254418846.cos.ap-singapore.myqcloud.com",
            "ReflectSequenceMd5": "d41d8cd98f00b204e9800998ecf8427e",
            "RequestId": "32-323233-323"
        }
    }
    

    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.DownLoadError File download failed.
    FailedOperation.DownLoadTimeoutError File download timed out.