All Products
Document Center

Parameter parsing

Last Updated: Sep 13, 2018

What are VideoId, AccessKeyId, AccessKeySecret, playKey (apikey), and playauth in Alibaba Cloud VoD? What are they for? How to obtain these values? What are the differences among them? This article answers these questions and recommend correct modes to upload, download, and play videos.

Obtain videoID

What is videoID? What is videoID for?

The video ID after a VoD is uploaded. For security, users get video IDs instead of video URLs to avoid data stealing.
You can also obtain the video URL by using the API.

Where can I obtain this value?

After a VoD is uploaded, a video ID is generated. The video list in the VoD console contains the videoID. You can obtain the video ID in the console to test downloading and playback.
For information about how to upload a VoD, see the instruction.

Obtain AccessKeyId and AccessKeySecret

What are AccessKeyId and AccessKeySecret?

Alibaba Cloud AccessKey ID and AccessKey secret are the only credential for you to access Alibaba Cloud APIs. The Accesskey ID is similar to an identity and the Accesskey secret signs your access parameters to prevent tampering. The AccessKey secret is similar to your logon password and must be kept confidential.

Where can I obtain these values?

  1. 1. Log on to the Alibaba Cloud official website.
  2. 2. Click Console on the menu at the top of the page.
  3. 3. Place the cursor in the username area in the upper-right corner, and select AccessKeys from the shortcut menu that appears.
  4. 4. In the security dialog box that appears, click Continue Using AccessKey. The page displays the AccessKey ID and AccessKey Secret.

Obtain playKey (apikey)

What is playKey?

playkey(apikey): Playback key, used to verify the identity when the player SDK obtains the video stream playback address. Playback authentication is the second authentication of VoD based on Alibaba Cloud AK security certification.The playback key is used to verify the identity when the player SDK obtains the video stream playback address for effective anti-leech.Based on the platform that users may use for playback, playback keys for Flash, H5, iOS, and Android platforms are provided by default.

  1. For security, you must enter the mobile verification code to confirm the identity to view the playback key.

Where can I obtain this value?

  1. 1. Log on to the Alibaba Cloud official website.
  2. 2. Click Console on the menu at the top of the page.
  3. 3. Select Cloud computing services.
  4. 4. Select VoD.
  5. 4. Select Security Settings.
  6. 5. Select Playback Authentication.
  7. 6. Select the corresponding platform and click Show.

Obtain playauth

What is playauth?

Currently, the player can play videos in three modes for different scenarios. Among them, playauth is the most secure method realized in setAuthInfo.

Playback mode Application scenario Advantage/Disadvantage Recommended or not
setDataSource Applicable to test and facilitating test Dangerous. The AccessKey is written on the client and will be leaked if the client is cracked. Not recommended for commercial use
setAuthInfo Applicable to official commercial use Secure. All video addresses and links are not exposed. Recommended for commercial use
Playback local and network URL Local videos and video URLs can be played. Simple. Videos on other platforms can be played. Used when local videos and network videos are required to play.

Where can I obtain this value?

You can consider playauth as that the VoD service merges VideoId, AccessKeyId, and AccessKeySecret and encrypts them. In this case, you obtain a string of data that contains various information. Then, the player can play.For information about how to obtain the value, see the process:

Note: The process is that the server obtains the playback credential > the server issues the playback credential to the client > the client plays the video.

  1. 1. Obtain the playback credential.
  2. The customer calls the playback authentication SDK (server-end SDK) on the server to obtain the playback credential for the VoD service.
  3. 2. Play a video.
  4. The player SDK obtains the video stream playback address for the VoD service based on the video ID and playback credential so as to load the video stream and decode for playback.


  • A playback credential is valid for 100 seconds. Use it to obtain the stream playback address of the specified video only. It cannot be reused or used to obtain the stream playback address of a video other than the specified one. If the credential expires, the stream playback address cannot be obtained. Please re-obtain the credential.
  • The player SDK automatically obtains the stream playback address for decoding and playback based on the playback credential. The stream playback address is valid for 30 minutes. If it expires, re-obtain the playback credential and transmit it to the player SDK to refresh the stream playback address.
  • For primary account security, we recommend that you use the AccessKey of the RAM user, especially in a Web playback scenario.