tencent cloud

All product documents
APIs
CreateUploadUrl
Last updated: 2024-04-03 11:45:35
This document is currently invalid. Please refer to the documentation page of the product.
CreateUploadUrl
Last updated: 2024-04-03 11:45:35

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.
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, 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 Generating a resource URL

Input Example

POST / HTTP/1.1
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

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.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

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