tencent cloud

Cloud Infinite

Querying HLS Playback Key

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

Feature Overview

When playing encrypted videos, call this API to query the HLS playback key (playKey) for generate signature token service.

Authorization Guide

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

Request

Request Sample

GET /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 Body

This API has no request body.

Response

Response Headers

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

GET /playKey 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>122fde9d792c4238be64925b3189e718</MasterPlayKey>
<BackupPlayKey>acd233e114a74394ac3e3eac0b86fe68</BackupPlayKey>
</PlayKeyList>
</Response>


도움말 및 지원

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

피드백