ApsaraVideo VOD provides SDKs for multiple mainstream programming languages. You can use server SDKs to write code and call ApsaraVideo VOD operations.
Features
- The SDKs encapsulate the API request and response classes to spare you from the complex calculation of an API signature. For more information, see Signature.
- The SDKs support all ApsaraVideo VOD operations and provide relevant sample code. For more information, see List of operations by function.
- ApsaraVideo VOD supports SDKs for Java, Python, PHP, .NET, Node.js, C/C++, and Go.
Prerequisites
- Service activation
- An Alibaba Cloud account is created. To create an Alibaba Cloud account, visit the account registration page. Real-name verification is completed.
- ApsaraVideo VOD is activated and configured. For more information, see ApsaraVideo VOD and Quick Start.
- Account preparation
An AccessKey pair is created to access ApsaraVideo VOD. You can access ApsaraVideo VOD by using an Alibaba Cloud account, a Resource Access Management (RAM) user, or a Security Token Service (STS) token. For more information, see Accounts and authorization.
- By using an Alibaba Cloud account: You can create the AccessKey pair of your Alibaba
Cloud account in the User Management console.
Notice An Alibaba Cloud account has the most permissions. If the AccessKey pair is leaked, damages may occur. We recommend that you do not use an Alibaba Cloud account.
- By using a RAM user: You must create a RAM user in the RAM console and grant the user the permissions on ApsaraVideo VOD, such as
AliyunVODFullAccess
. For more information, see Create and grant permissions to a RAM user.Note To ensure account security, we recommend that you use a RAM user to access ApsaraVideo VOD. - By using an STS token: You can access ApsaraVideo VOD by using an STS token. For more information, see Create a role and grant temporary access permissions to the role by using STS.
- By using an Alibaba Cloud account: You can create the AccessKey pair of your Alibaba
Cloud account in the User Management console.
Development environments
Server SDKs support multiple platforms and runtime environments such as Linux, Windows, and macOS. We recommend that you install the compiler or interpreter of the relevant programming language and set up the environment in advance. For more information about version requirements, see the "Installation" topic of the SDK for each programming language.
SDK installation
- Versions
The latest version of a server SDK is
2.15.11
. For more information about the release notes, see Release notes of server operation SDKs. Make sure that the latest version is installed. Otherwise, you may fail to call some API operations.- SDKs for Java, Python, PHP, .NET, and Go use the specific request and response classes for each API operation. You must update the SDKs for new API operations or features.
- SDKs for Node.js and C/C++ use general libraries and do not encapsulate the API request and response classes. You do not need to update the SDKs for new API operations but must update general libraries as required.
- Installation
In most cases, you must install both the SDK core library and ApsaraVideo VOD library. The following table lists the instructions of the SDKs for various programming languages.
- Description
After you install an SDK, initialize the client of the SDK. For more information, see the description of AccessKey pair-based client initialization in the "Initialization" topic of the SDK for each programming language.
Endpoints
API region
column of the table to initialize a client. The API region ID
column of the table indicates the value of RegionId for the required API operation
or SDK. For example, enter cn-shanghai
for the China (Shanghai) region and ap-southeast-1
for the Singapore (Singapore) region.
Limits
By default, ApsaraVideo VOD limits the resource usage and the number of API calls. For more information, see Limits on usage. To increase the limits, you can contact after-sales technical support or submit a ticket to contact us. In the meantime, you must describe your scenarios and expected thresholds, such as the number of domain names and the frequency of playback operation calls.
SDK calls
SDKs for different programming languages provide complete API call examples. For more information, see the related modules, such as media upload and video playback, for the SDK for each programming language.
Feedback
If you have any questions while you use the SDKs, you can seek help from Yunqi Community.