Domain name for API request: vod.intl.tencentcloudapi.com.
The API is used to generate access credentials for VOD professional applications, such as generating credentials for client uploads.
A maximum of 20 requests can be initiated per second for this API.
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: CreateStorageCredentials. |
| Version | Yes | String | Common Params. The value used for this API: 2024-07-18. |
| Region | No | String | Common Params. This parameter is not required. |
| SubAppId | Yes | Integer | The ID of VOD Professional Application. |
| Policy | Yes | String | The policy string serialized by URL Encode is used as the input parameter Policy. The server will URL Decode the Policy value and grant temporary access credentials according to the parsed policy. Please pass in parameters according to the specification. Note: 1.The policy syntax refers to Cloud Access Management. 2.The policy cannot contain the principal element. 3.The policy actions include: qcs::vod:[region]:uid/[AppID]:prefix//[SubAppId]/[BucketId]/[Path], where AppID, SubAppId, BucketId and Path need to be filled in as required. |
| DurationSeconds | No | Integer | Specifies the validity period of credentials in seconds. The default value is 1800 seconds and the maximum value is 129600 seconds. |
| Parameter Name | Type | Description |
|---|---|---|
| Credentials | Credentials | Credentials. |
| 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. |
Apply for credentials to upload a single file.
{
"SubAppId": 220209,
"DurationSeconds": 7200,
"Policy": "%7B%22statement%22%3A%5B%7B%22action%22%3A%5B%22name%2Fvod%3AInitiateMultipartUpload%22%2C%22name%2Fvod%3AListMultipartUploads%22%2C%22name%2Fvod%3AListParts%22%2C%22name%2Fvod%3AUploadPart%22%2C%22name%2Fvod%3ACompleteMultipartUpload%22%5D%2C%22effect%22%3A%22allow%22%2C%22resource%22%3A%5B%22qcs%3A%3Avod%3Aap-beijing%3Auid%2F251197738%3Aprefix%2F%2F220209%2Fa%2F001.png%22%5D%7D%5D%2C%22version%22%3A%222.0%22%7D"
}{
"Response": {
"Credentials": {
"SessionToken": "***********************************",
"AccessKeyId": "***********************************",
"SecretAccessKey": "***********************************",
"Expiration": "2024-08-20T13:55:53Z"
},
"RequestId": "59a5e07e-4147-4d2e-a808-dca76ac5b3fd"
}
}
Apply for credentials to upload multiple files.
{
"SubAppId": 220209,
"DurationSeconds": 7200,
"Policy": "%7B%22statement%22%3A%5B%7B%22action%22%3A%5B%22name%2Fvod%3AInitiateMultipartUpload%22%2C%22name%2Fvod%3AListMultipartUploads%22%2C%22name%2Fvod%3AListParts%22%2C%22name%2Fvod%3AUploadPart%22%2C%22name%2Fvod%3ACompleteMultipartUpload%22%5D%2C%22effect%22%3A%22allow%22%2C%22resource%22%3A%5B%22qcs%3A%3Avod%3Aap-beijing%3Auid%2F251197738%3Aprefix%2F%2F220209%2Fa%2F1024x1024.png%22%2C%22qcs%3A%3Avod%3Aap-beijing%3Auid%2F251197738%3Aprefix%2F%2F220209%2Fa%2Fb%2Fc%2F1042x1042.png%22%2C%22qcs%3A%3Avod%3Aap-beijing%3Auid%2F251197738%3Aprefix%2F%2F220209%2Fpath%2F2060.gif_wh300.gif%22%5D%7D%5D%2C%22version%22%3A%222.0%22%7D"
}{
"Response": {
"Credentials": {
"SessionToken": "***********************************",
"AccessKeyId": "***********************************",
"SecretAccessKey": "***********************************",
"Expiration": "2024-08-20T13:55:53Z"
},
"RequestId": "59a5e07e-4147-4d2e-a808-dca76ac5b3fd"
}
}
Apply for credentials to get all objects with a specified object key prefix in the bucket.
{
"SubAppId": 220209,
"DurationSeconds": 7200,
"Policy": "%7B%22statement%22%3A%5B%7B%22action%22%3A%5B%22name%2Fvod%3AGetBucket%22%5D%2C%22effect%22%3A%22allow%22%2C%22resource%22%3A%5B%22qcs%3A%3Avod%3Aap-beijing%3Auid%2F251197738%3Aprefix%2F%2F220209%2F98gw6e1b4hds0zh%2F%22%5D%7D%5D%2C%22version%22%3A%222.0%22%7D"
}{
"Response": {
"Credentials": {
"SessionToken": "***********************************",
"AccessKeyId": "***********************************",
"SecretAccessKey": "***********************************",
"Expiration": "2024-08-20T13:55:53Z"
},
"RequestId": "59a5e07e-4147-4d2e-a808-dca76ac5b3fd"
}
}
Apply for credentials to automatically upload files nearby.
{
"SubAppId": 220209,
"DurationSeconds": 7200,
"Policy": "%7B%22statement%22%3A%5B%7B%22action%22%3A%5B%22name%2Fvod%3AInitiateMultipartUpload%22%2C%22name%2Fvod%3AListMultipartUploads%22%2C%22name%2Fvod%3AListParts%22%2C%22name%2Fvod%3AUploadPart%22%2C%22name%2Fvod%3ACompleteMultipartUpload%22%5D%2C%22effect%22%3A%22allow%22%2C%22resource%22%3A%5B%22qcs%3A%3Avod%3Aauto%3Auid%2F251197738%3Aprefix%2F%2F220209%2Fauto%2F001.png%22%5D%7D%5D%2C%22version%22%3A%222.0%22%7D"
}{
"Response": {
"Credentials": {
"SessionToken": "***********************************",
"AccessKeyId": "***********************************",
"SecretAccessKey": "***********************************",
"Expiration": "2024-08-20T13:55:53Z"
},
"RequestId": "59a5e07e-4147-4d2e-a808-dca76ac5b3fd"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
There is no error code related to the API business logic. For other error codes, please see Common Error Codes.
Feedback