Domain name for API request: trtc.intl.tencentcloudapi.com.
This API is used to trigger a page recording task. Specify parameters such as the recording URL, recording resolution, and recording result storage in the API parameter.
Because parameter or API logic issues will return immediate results. For page issues such as page unreachable, results will be returned in the callback, stay tuned.
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: StartWebRecord. |
| Version | Yes | String | Common Params. The value used for this API: 2019-07-22. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-singapore. |
| RecordUrl | Yes | String | [Required] webpage URL that needs to be recorded. |
| StorageParams | Yes | StorageParams | [Required] cloud storage related parameters. currently supports tencent cloud object storage as well as VOD. no support for third-party cloud storage. the storage format of the output file is only supported for hls or mp4. |
| SdkAppId | Yes | Integer | [Required] the SdkAppId of TRTC. |
| MaxDurationLimit | No | Integer | Maximum recording duration limit in seconds. valid values [1800, 86400]. default 86400s (24 hr). |
| WebRecordVideoParams | No | WebRecordVideoParams | Page recording video parameter. |
| RecordId | No | String | When sensitive to repetition tasks, pay attention to this value: to avoid triggering tasks repeatedly in a short time frame, which may lead to task duplication. Import the recording RecordId to identify the task, less than 32 bytes. if carrying RecordId initiates start recording requests more than twice, only one task will start up, and the second will report error FailedOperation.TaskExist. note that when StartWebRecord call fails instead of FailedOperation.TaskExist error, change RecordId and re-initiate the request. |
| PublishCdnParams.N | No | Array of McuPublishCdnParam | If you want to push stream to CDN, you can configure parameters in PublishCdnParams.N. it supports streaming simultaneously to up to 10 CDN addresses. if the relay address is tencent cloud CDN, set IsTencentCdn to 1. |
| ReadyTimeout | No | Integer | Timeout period for recording page resource loading, unit: second. default value is 0, which must be greater than or equal to 0 and less than or equal to 60. do not set this parameter when page loading timeout detection is disabled for the recording page. |
| EmulateMobileParams | No | EmulateMobileParams | Render the mobile mode parameter. do not set this parameter when not preparing to render the mobile mode webpage. |
| Parameter Name | Type | Description |
|---|---|---|
| TaskId | String | Unique Id of the recording task. |
| 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. |
POST / HTTP/1.1
Host: trtc.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: StartWebRecord
<Common request parameters>
{
"RecordUrl": "https://web-record-xxxxx.cos.ap-xxx.myqcloud.com/xxxx/xxx.mp4",
"StorageParams": {
"CloudStorage": {
"Vendor": 0,
"Bucket": "webrecord-1234589",
"Region": "ap-chengdu",
"AccessKey": "AKxxxxxx",
"SecretKey": "Idxxxxxx",
"FileNamePrefix": [
"record",
"video"
]
}
},
"SdkAppId": 1600011111,
"MaxDurationLimit": 3600,
"WebRecordVideoParams": {
"Width": 1280,
"Height": 720,
"Format": "mp4"
}
}
{
"Response": {
"TaskId": "HMLm5HWNuUAXSb0gTEOx0z1x+nLMZNjXrY3keyUSvu7uu8mF9O656uNtbUtvaWLkpMY134jTN2Ix4vuqgOJ68nQ8tho3ri",
"RequestId": "2a76ee73-6579-42f0-8d57-1f6c9b9d7208"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation.NotAbility | Unlock the required capability bit. |
| FailedOperation.NotAllowed | This operation is not allowed. submit a ticket to contact us. |
| FailedOperation.SdkAppIdNotUnderAppId | No resource belonging to this SdkAppId under the AppId. |
| FailedOperation.TaskExist | Task already exists |
| ResourceInsufficient.RequestRejection | Insufficient resources. |
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback