tencent cloud



Last updated: 2022-08-12 14:33:36

1. API Description

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

This API is used to generate a temporary UploadUrl for uploading resource files (with the HTTP PUT method). After resource upload, ResourceUrl will be passed to the TargetAction API to complete the resource passing (specific fields vary by case).
The data will be stored in a COS bucket in the region specified by the parameter Region for two hours.

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: CreateUploadUrl.
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, ap-tokyo, eu-moscow
TargetAction Yes String Target API

3. Output Parameters

Parameter Name Type Description
UploadUrl String The URL for uploading contents with the HTTP PUT method.
ResourceUrl String The resource URL obtained after this upload is completed and to be passed in where it is required later.
ExpiredTimestamp Integer The point in time when the upload/download link expires, which is a 10-bit Unix timestamp.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Generating a resource URL

Input Example

Host: faceid.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateUploadUrl
<Common request parameters>

    "TargetAction": "ApplyWebVerificationToken"

Output Example

  "Response": {
    "ExpiredTimestamp": 1637212877,
    "RequestId": "2e546a7c-4e12-43f6-bf98-d33d3724ea5b",
    "ResourceUrl": "https://singapore-1257237511.cos.ap-singapore.myqcloud.com/faceid%2FApplyWebVerificationToken%2F2e546a7c-4e12-43f6-bf98-d33d3724ea5b?q-sign-algorithm=sha1&q-ak=AKIDeQ4Zsyob70ywoF8ijZDj5IJ8bzBHfuQk&q-sign-time=1637205677%3B1637212877&q-key-time=1637205677%3B1637212877&q-header-list=host&q-url-param-list=&q-signature=32302bad71219f9ebcae6f4703ae05b0ae33378f",
    "UploadUrl": "https://singapore-1257237511.cos.ap-singapore.myqcloud.com/faceid%2FApplyWebVerificationToken%2F2e546a7c-4e12-43f6-bf98-d33d3724ea5b?q-sign-algorithm=sha1&q-ak=AKIDeQ4Zsyob70ywoF8ijZDj5IJ8bzBHfuQk&q-sign-time=1637205677%3B1637212877&q-key-time=1637205677%3B1637212877&q-header-list=host&q-url-param-list=&q-signature=9495ea0b69a2b2fb6b53a0e8d8a0dcd836762bbd"

5. Developer Resources


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.
Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support