Queries the playback credential that is required for playing a video.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetVideoPlayAuth

The operation that you want to perform. Set the value to GetVideoPlayAuth.

VideoId String Yes dfde02284a5c46622a097adaf44a****

The ID of the video.

AuthInfoTimeout Long No 100

The validity period of the playback credential. Unit: seconds.

  • Default value: 100.
  • Valid values: [100,3000].
ApiVersion String No 1.0.0

The version of API. Set the value to 1.0.0.

Response parameters

Parameter Type Example Description
RequestId String E4EBD2BF-5EB0-4476-8829-9D94E1B1****

The ID of the request.

VideoMeta Struct

The metadata of the video.

CoverURL String https://example.aliyundoc.com/****.jpg

The URL of the video thumbnail.

Duration Float 120.0

The duration of the video. Unit: seconds.

Status String Normal

The status of the video. For more information about the value range and description, see the Status table.

Title String ApsaraVideo VOD

The title of the video.

VideoId String dfde02284a5c46622a097adaf44a****

The ID of the video.

PlayAuth String sstyYuew6789000000xtt7TYUh****

The playback credential of the video.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK

        <Title>ApsaraVideo VOD</Title>

JSON format

HTTP/1.1 200 OK

  "PlayAuth" : "sstyYuew6789000000xtt7TYUh****",
  "RequestId" : "E4EBD2BF-5EB0-4476-8829-9D94E1B1****",
  "VideoMeta" : {
    "Status" : "Normal",
    "Duration" : 120,
    "Title" : "ApsaraVideo VOD",
    "VideoId" : "dfde02284a5c46622a097adaf44a****",
    "CoverURL" : "https://example.aliyundoc.com/****.jpg"

Error codes

For a list of error codes, visit the API Error Center.

Common errors

The following table describes the common errors that this operation can return.

Error code

Error message

HTTP status code



Status of the video is illegal.


The error message returned because the video status is invalid.


The video does not exist.


The error message returned because the video does not exist.

SDK examples

We recommend that you use a server SDK to call this operation. For more information about the sample code that is used to call this operation in various languages, see the following topics: