tencent cloud

Cloud Infinite

Updating HLS Playback Key

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-09-08 18:59:38

Feature Overview

This interface is used to update the HLS playback key.

Authorization Guide

Set action to ci:UpdatePlayKey in the authorization policy. View all actions.

Request

Request Sample

PUT /playKey HTTP/1.1
Host: <BucketName-APPID>.ci.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Content-Length: <length>
Content-Type: application/xml

Note:
Authorization: Auth String. For details, see the Request Signature documentation.
When using with a sub-account, required permissions must be granted. For details, see the Authorization Granularity Detail documentation.

Request Header

This API only uses common request headers. For details, see Common Request Headers documentation.

Request Parameters

The parameters are as described below:
Parameter
Parent Node
Description
Type
Required
masterPlayKey
None
Primary playback key
Length: 6 to 40 characters
String
No (either masterPlayKey or backupPlayKey must exist)
backupPlayKey
None
Backup playback key
Length limit: 6 to 40 characters.
String
No

Request Body

This API has no request body.

Response

Response Header

This API only returns common response headers. For details, see Common Response Headers documentation.

Response Body

The response body is returned as application/xml. An example including the complete node data is shown below:
<Response>
<RequestId></RequestId>
<PlayKeyList>
<MasterPlayKey></MasterPlayKey>
<BackupPlayKey></BackupPlayKey>
</PlayKeyList>
</Response>
The data content is as follows:
Node Name (Keyword)
Parent Node
Description
Type
Response
None
Container for saving results
Container

The content of Response container node
:
Node Name (Keyword)
Parent Node
Description
Type
RequestId
Response
Unique request ID
String
PlayKeyList
Response
Container for saving playback keys
Container

The content of PlayKeyList container node
:
Node Name (Keyword)
Parent Node
Description
Type
MasterPlayKey
Response.PlayKeyList
Primary playback key
String
BackupPlayKey
Response.PlayKeyList
Backup playback key
String

Error Codes

This request returns common error responses and error codes. For more information, see Error Codes.

Practical Example

Request

PUT /playKey?masterPlayKey=abdcfeafdavdaa&backupPlayKey=fqefefdavdaedfdsfva HTTP/1.1
Authorization: q-sign-algorithm=sha1&q-ak=**********************************&q-sign-time=1497530202;1497610202&q-key-time=1497530202;1497610202&q-header-list=&q-url-param-list=&q-signature=**************************************
Host: test-1234567890.ci.ap-beijing.myqcloud.com
Content-Length: 0
Content-Type: application/xml


Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 100
Connection: keep-alive
Date: Thu, 14 Jul 2022 12:37:29 GMT
Server: tencent-ci
x-ci-request-id: NTk0MjdmODlfMjQ4OGY3XzYzYzhf****

<Response>
<RequestId>NjQ0NGNlNDZfMThhYTk0MGFfY*********</RequestId>
<PlayKeyList>
<MasterPlayKey>abdcfeafdavdaa</MasterPlayKey>
<BackupPlayKey>fqefefdavdaedfdsfva</BackupPlayKey>
</PlayKeyList>
</Response>


도움말 및 지원

문제 해결에 도움이 되었나요?

피드백