tencent cloud

文档反馈

GetWebVerificationResult

最后更新时间:2024-04-03 11:45:28
This document is currently invalid. Please refer to the documentation page of the product.

    1. API Description

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

    This API is used to get the verification result with the corresponding token (BizToken) after the web-based verification is completed. The BizToken is valid for three days (3243,600s) after issuance and can be called multiple times.

    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: GetWebVerificationResult.
    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-jakarta, ap-singapore.
    BizToken Yes String The token for the web-based verification, which is generated with the ApplyWebVerificationToken API.

    3. Output Parameters

    Parameter Name Type Description
    ErrorCode Integer The final result of this verification. 0 indicates that the person is the same as that in the photo.
    Note: This field may return null, indicating that no valid values can be obtained.
    ErrorMsg String The description of the final verification result.
    Note: This field may return null, indicating that no valid values can be obtained.
    VideoBestFrameUrl String The temporary URL of the best face screenshot collected from the video stream. It is valid for 10 minutes. Download the image if needed.
    Note: This field may return null, indicating that no valid values can be obtained.
    VideoBestFrameMd5 String The MD5 hash value of the best face screenshot collected from the video stream. It can be used to check whether the image content is consistent with the file content.
    Note: This field may return null, indicating that no valid values can be obtained.
    VerificationDetailList Array of VerificationDetail The details list of this verification process.
    Note: This field may return null, indicating that no valid values can be obtained.
    VideoUrl String The temporary URL of the video collected from the video stream. It is valid for 10 minutes. Download the video if needed.
    Note: This field may return null, indicating that no valid values can be obtained.
    VideoMd5 String The MD5 hash value of the video collected from the video stream. It can be used to check whether the video content is consistent with the file content.
    Note: This field may return null, indicating that no valid values can be obtained.
    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 Getting the verification result

    Input Example

    POST / HTTP/1.1
    Host: faceid.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: GetWebVerificationResult
    <Common request parameters>
    
    {
        "BizToken": "EE13636D-1985-42CA-BD61-73F4C8B687E6"
    }
    

    Output Example

    {
        "Response": {
            "ErrorCode": 0,
            "ErrorMsg": "Succeed",
            "RequestId": "a6e62364-60d4-4eb6-8908-da3ff3d601f8",
            "VerificationDetailList": [
                {
                    "ErrorCode": 0,
                    "ErrorMsg": "Succeed",
                    "LivenessErrorCode": 0,
                    "LivenessErrorMsg": "Success",
                    "CompareErrorCode": 0,
                    "CompareErrorMsg": "Success",
                    "Similarity": 100,
                    "ReqTimestamp": 1637291599353,
                    "Seq": "7269e30e-c142-46ba-aa60-b5677bf69d24"
                }
            ],
            "VideoBestFrameMd5": "30fa34052530d0ba033b956d06eb89b5",
            "VideoBestFrameUrl": "https://xxx.cos.ap-singapore.myqcloud.com/faceid.png?q-sign-algorithm=sha1&q-ak=AKIDRPHPMw6HL4PeDO175x_vY2hjAja5nFelfAiy60n0irDQLQWYSZ0dfJ1tIrTjFOSJ&q-sign-time=1637637685;1637641285&q-key-time=1637637685;1637641285&q-header-list=host&q-url-param-list=&q-signature=bab269f6585d3f42a60d0ad4e94e229e6d3f8959&x-cos-security-token=ZR3Vx8aT4Dgb5c95F7FIMc9Pw6hC25baea5274fa45568cd34ca7c53a3867ec4aB5vbfkJ5tM3Td3p18cMurjkx1YsMN0WeEQFzoSTDpi9z0Y4UYktcEk6ewfErVQmuyX2za_xh0a1KhvWf7et0d0XHl4nHXhPTjzgUVazrdIRFhcfO0VKO12T2MoN-cN_Ltp5jasLW7PUTVRZFDvkXCxVSsvxb15W1gdX_7K8x2fORKSMjbQqAL51EB19SD4R2",
            "VideoMd5": "30fa34052530d0ba033b956d06eb89b5",
            "VideoUrl": "https://xxx.cos.ap-singapore.myqcloud.com/faceid.png?q-sign-algorithm=sha1&q-ak=AKIDRPHPMw6HL4PeDO175x_vY2hjAja5nFelfAiy60n0irDQLQWYSZ0dfJ1tIrTjFOSJ&q-sign-time=1637637685;1637641285&q-key-time=1637637685;1637641285&q-header-list=host&q-url-param-list=&q-signature=bab269f6585d3f42a60d0ad4e94e229e6d3f8959&x-cos-security-token=ZR3Vx8aT4Dgb5c95F7FIMc9Pw6hC25baea5274fa45568cd34ca7c53a3867ec4aB5vbfkJ5tM3Td3p18cMurjkx1YsMN0WeEQFzoSTDpi9z0Y4UYktcEk6ewfErVQmuyX2za_xh0a1KhvWf7et0d0XHl4nHXhPTjzgUVazrdIRFhcfO0VKO12T2MoN-cN_Ltp5jasLW7PUTVRZFDvkXCxVSsvxb15W1gdX_7K8x2fORKSMjbQqAL51EB19SD4R2"
        }
    }
    

    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
    InvalidParameter Invalid parameter.
    InvalidParameterValue.BizTokenExpired BizToken expired.
    InvalidParameterValue.BizTokenIllegal Invalid BizToken.
    OperationDenied Operation denied.
    ResourceUnavailable The resource is unavailable.