All Products
Search
Document Center

ApsaraVideo VOD:Audio and video playback

Last Updated:Jan 28, 2026

This document provides API call examples for the Java SDK to obtain video playback URLs and playback credentials.

API call instructions

  • For detailed descriptions of API parameters and returned fields, visit the Alibaba Cloud OpenAPI Portal. You can find this information on the Document tab for each API.

  • To obtain SDK code samples, go to the Alibaba Cloud OpenAPI Portal. On the Parameter Settings tab on the left side of the API page, enter the required parameters and make a call. Then, on the SDK Sample tab on the right, select the SDK version and target language to view and download the sample code. For more information, see How to automatically generate SDK samples.image.png

Initialize the client

You must initialize the client before use. For more information, see Initialization.

Get a video playback URL

Call the GetPlayInfo API to obtain a video playback URL.

Alibaba Cloud OpenAPI Portal URL: GetPlayInfo.

After obtaining the playback URL, the client can use the URL for video playback. For more information, see Get a playback URL.

Get a video playback credential

Call the GetVideoPlayAuth API to obtain a video playback credential.

Alibaba Cloud OpenAPI Portal URL: GetVideoPlayAuth.

After obtaining the credential, the client can use the credential for video playback. For more information, see Get a playback credential.