tencent cloud

文档反馈

ApplyWebVerificationBizTokenIntl

最后更新时间:2024-09-11 16:55:58

    1. API Description

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

    This API is used to apply for a BizToken before calling the web-based verification service each time. This token is required for initiating a verification process and getting the result after the verification is completed.

    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: ApplyWebVerificationBizTokenIntl.
    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.
    RedirectURL Yes String The web callback URL to redirect to after the verification is completed, including the protocol, hostname, and path.
    After the verification process is completed, the BizToken of this process will be spliced to the callback URL in the format of https://www.tencentcloud.com/products/faceid?token={BizToken} before redirect.
    Example: https://www.tencentcloud.com/products/faceid.
    CompareImageBase64 No String The Base64-encoded string (max 8 MB in size) of the photo to be compared.The Data URI scheme header needs to be removed from the encoded string
    Example: xhBQAAACBjSFJNAAB6****AAAASUVORK5CYII=
    Extra No String The passthrough parameter of the business, max 1,000 characters, which will be returned in GetWebVerificationResultIntl.
    Config No WebVerificationConfigIntl The parameter control the page configuration.
    Example: {"AutoSkip": true,"CheckMode": 1,"IdCardType": "HKIDCard"}

    3. Output Parameters

    Parameter Name Type Description
    BizToken String The token for the web-based verification, which is generated using the ApplyWebVerificationBizTokenIntl API.
    Example: 81EEF678-28EE-4759-A82E-6CBBBE6BC442
    VerificationURL String The verification URL to be opened with a browser to start the verification process.
    Example: https://intl.faceid.qq.com/reflect/?token=81EEF678-28EE-4759-A82E-6CBBBE6BC442
    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 Apply Web Verification BizToken

    Apply Web Verification BizToken

    Input Example

    POST / HTTP/1.1
    Host: faceid.tencentcloudapi.com
    Content-Type: application/json
    X-TC-Action: GetWebFaceIDToken
    <Common request parameters>
    
    {
        "CompareImageBase64": "xhBQAAACBjSFJNAAB6****AAAASUVORK5CYII=",
        "RedirectURL": "https://www.tencentcloud.com/products/faceid",
        "Extra": "ExtraString"
    }
    

    Output Example

    {
        "Response": {
            "VerificationURL": "https://intl.faceid.qq.com/reflect/?token=81EEF678-28EE-4759-A82E-6CBBBE6BC442",
            "BizToken": "81EEF678-28EE-4759-A82E-6CBBBE6BC442",
            "RequestId": "b16194cd-8f52-4e66-882a-eb6bf15c016d"
        }
    }
    

    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
    InternalError Internal error.
    InvalidParameter Invalid parameter.
    InvalidParameterValue Incorrect parameter value.
    UnauthorizedOperation.ActivateError Service activation exception.
    UnauthorizedOperation.Activating Activating the service.
    UnauthorizedOperation.Arrears The account is in arrears.
    UnauthorizedOperation.Nonactivated The service has not been activated.