StreamPackage API Reference โ
The API service code for StreamPackage is mdp, and the API version is 2020-05-27. The basic order is: create a channel โ verify the input โ create an endpoint โ verify playback โ attach CDN.
Call Specification โ
| Item | Value |
|---|---|
| Endpoint | POST https://mdp.tencentcloudapi.com |
| Action | See the API list below |
| Request signing | Use Tencent Cloud API 3.0 signing from the official SDK / TCCLI |
Basic Information โ
| Item | Value |
|---|---|
| API service code | mdp |
| API version | 2020-05-27 |
| Authentication | Tencent Cloud API 3.0 / TC3-HMAC-SHA256 |
| Call tools | Tencent Cloud SDK / TCCLI |
Before You Run โ
Configure TCCLI authentication and permissions. The example region is ap-seoul, and values beginning with REPLACE_ should be replaced with real values. Use true and false for booleans inside JSON files.
API List and Request Parameters โ
| Action | Operation |
|---|---|
CreateStreamPackageChannel | Create |
DescribeStreamPackageChannel | Query |
CreateStreamPackageChannelEndpoint | Create |
BindNewLVBDomainWithChannel | Change settings |
Responses and Execution Flow โ
Keep the resource ID returned in the create response and check the status with the query API. Distinguish between a successful create request and successful actual input ingest and output delivery. Verify the status of the resource before running the next step.
Errors and Call Limits โ
Connection Checks โ
| Symptom | What to check first |
|---|---|
| Unknown option | Whether the field exists on that Action, and the TCCLI version |
| JSON | String quoting, array / object structure, lowercase booleans |
Endpoint 403 | IP allowlist, AuthKey header, CDN origin requests |
| Results only need verifying on CDN | DNS, TLS, the CDN certificate, and the origin access policy |
| Playlist opens but does not advance | Whether the input persists, cached responses, segment updates |
Record the Action, region, RequestId, response code, and the time of occurrence. Remove URL signatures, passwords, and authentication keys from shared logs.
Request Examples โ
1. Create / Query a Channel โ
tccli mdp CreateStreamPackageChannel --region ap-seoul --Name demo_package --Protocol HLSCheck the channel ID in the create response.
tccli mdp DescribeStreamPackageChannel --region ap-seoul --Id REPLACE_CHANNEL_IDCheck the input address and endpoint in the query response. A basic create request only needs the required fields.
2. Create a HLS Endpoint โ
Save the following JSON as package-endpoint.json. The IP is a documentation address, so replace it with the request origin you actually want to allow. If access goes through CDN, you must first review the origin request source of CDN and your access control design.
{
"Id": "REPLACE_CHANNEL_ID",
"Name": "demo_hls",
"Protocol": "HLS",
"Manifest": "main",
"AuthInfo": {
"WhiteIpList": [
"203.0.113.10/32"
],
"BlackIpList": ,
"AuthKey": ""
},
"TimeShiftEnable": false
}tccli mdp CreateStreamPackageChannelEndpoint --region ap-seoul --cli-input-json file://package-endpoint.jsonThis example uses allowlist-based access control. The AuthKey method is applied to the X-TENCENT-PACKAGE header of the request, while input HTTP authentication is configured separately.
Retrieve the generated URL from the API response or from the channel details query. Add time shifting / CMAF / DRM only after checking the support requirements in Endpoint configuration.
3. Playback Verification โ
After sending a signal to the channel from StreamLive or your publishing system, confirm that the endpoint playlist is being updated. The basic integration is complete only once you have also verified the child playlists, segment requests, and video / audio playback.
4. Attach CDN โ
Run this after CSS is enabled, cross-service permissions are granted, and the playback domain is ready. Replace play.example.com with a domain you actually own and have configured.
tccli mdp BindNewLVBDomainWithChannel --region ap-seoul \
--ChannelId REPLACE_CHANNEL_ID --LVBDomain play.example.comEven after the binding succeeds, verify CNAME, the HTTPS certificate, origin access control, and playlist / segment playback. For the detailed order, see CSS CDN integration.
Results and Resource Management โ
Modify / Delete API โ
| Purpose | Action | Notes |
|---|---|---|
| Modify a channel | ModifyStreamPackageChannel | Query the current settings first |
| Modify an endpoint | ModifyStreamPackageChannelEndpoint | Specify the exact channel ID and endpoint URL, and preserve the existing authentication settings |
| Change input authentication | ModifyStreamPackageChannelInputAuthInfo | Change it together with the credentials on the publishing side |
| Unbind CDN | UnbindCdnDomainWithChannel | Check the impact on playback over production domains |
| Delete an endpoint | DeleteStreamPackageChannelEndpoints | Check whether the playback URL is in use |
| Delete a channel | DeleteStreamPackageChannels | Clean up the attached endpoints first |
Query the current authentication settings, then apply the items you want to change. Carry out creation, authentication changes, and deletion while verifying the result of each step.
Distinguishing SSAI from Harvest โ
SSAI is a separate configuration that covers the ADS, ad markers, sessions, and the delivery path for ad assets. Verify plain HLS playback first, then choose the API that matches your SSAI configuration approach.
A Harvest Job is a task that stores a retained past segment as COS. Verify the target, time range, and COS permissions first, then follow the procedure in Harvest Job.