Using the server SDK, you can compile code to call ApsaraVideo for VOD operations and have quick access to ApsaraVideo for VOD services. ApsaraVideo for VOD provides the server SDK in multiple mainstream languages to help you access ApsaraVideo for VOD without complex programming.
The server SDK packages the API request and response to spare you from the complex calculation of an API signature.
It supports all ApsaraVideo for VOD operations and provides relevant sample code.
It supports the following seven development languages: Java, Python, PHP, .NET, Node.js, Go, and C/C++.
After publishing new operations, Alibaba Cloud usually updates the server SDK in a timely manner. If you cannot find the sample code of an operation, you can still refer to the existing sample code to call the operation by yourself.
- Register an Alibaba Cloud account and complete real-name verification.
- Activate ApsaraVideo for VOD and complete relevant configurations. For more information, see Quick Start.
Obtain an AccessKey for access to ApsaraVideo for VOD. ApsaraVideo for VOD allows you to use an Alibaba Cloud account AccessKey, a RAM user AccessKey, or a temporary STS token. For more information, see Access authorization.
- Alibaba Cloud account AccessKey: You can create an AccessKey for your Alibaba Cloud account on the AccessKey management page of the Alibaba Cloud console. However, an Alibaba Cloud account has access permissions on many other Alibaba Cloud services. The leakage of the Alibaba Cloud account can cause huge risks. Therefore, an Alibaba Cloud account AccessKey is strongly not recommended.
- RAM user AccessKey: You can create a RAM user in the RAM console and grant the user the permission to access ApsaraVideo for VOD, such as
AliyunVODFullAccess. For more information, see RAM user access. To ensure account security, we strongly recommend that you use a RAM user AccessKey to access ApsaraVideo for VOD.
- Temporary STS token: You can also use STS to generate a temporary token for access to ApsaraVideo for VOD. For more information, see STS authorization.
The server SDK supports multiple platforms and operating environments such as Linux, Windows, and Mac. We recommend that you install the compiler or interpreter of the relevant development language and set up the environment in advance. For more information about version requirements, see the
installation instructions of the server SDK in various languages.
The C/C++ server SDK is currently not supported in Windows, but will be supported in the near future.
The latest version of the server SDK is
2.15.3. For more information about the update logs and version history, see Server SDK version history. Ensure that the latest version is installed. Otherwise, you may fail to use some operations directly.
- For Java, Python, PHP, .NET, and Go, the server SDK uses the specific request and response for each operation. You need to upgrade the server SDK for new operations or new features.
- For Node.js and C/C++, the server SDK uses general libraries and does not package the API request and response. You do not need to upgrade the server SDK for new operations, but need to upgrade general libraries as required.
Generally, you need to install the SDK core library and ApsaraVideo for VOD library. The following table lists the instructions of the server SDK in various languages.
|Development language||Installation instructions||Initialization instructions||Source code download|
|Java SDK||Installation||Initialization||Source code|
|Python SDK||Installation||Initialization||Source code|
|PHP SDK||Installation||Initialization||Source code|
|.NET SDK||Installation||Initialization||Source code|
|Node.js SDK||Installation||Initialization||Source code|
|Go SDK||Installation||Initialization||Source code|
|C/C++ SDK||Installation||Initialization||Source code|
After installing the server SDK, you can refer to the initialization instructions and use the obtained AccessKey to initialize a client.
You can access ApsaraVideo for VOD in many regions around the world. For more information, see ApsaraVideo for VOD regions and endpoints. You can use a
region ID in the list to initialize a client, for example, enter
cn-shanghai for mainland China or
ap-southeast-1 for Singapore.
Note: An access region is different from a storage region. The former indicates the region where you can use ApsaraVideo for VOD operations. The latter indicates a region where you can store media files in Object Storage Service (OSS). For example, you can enter cn-shanghai as an access region and cn-beijing as a storage region.
By default, ApsaraVideo for VOD limits the resource usage and the number of API calls. For more information, see Limits on use. To increase the limits, you can contact after-sales technical support or open a ticket to contact us. In the meantime, you need to describe your scenarios and expected thresholds (such as the number of endpoints and the frequency of playback operation calls) in detail.
The server SDK provides complete API call examples in various languages. For more information, see various topics in the same directory as the
installation instructions of the server SDK in each language, such as media import and audio and video playback.
You can troubleshoot errors occurred during the use of the server SDK according to error codes. For more information, see the following common errors in different languages:
In fact, common errors are similar for the server SDK in various languages. You can share most troubleshooting solutions among different languages. For example, you can use the solution to the
InvalidAccessKeyId.NotFound error in the preceding languages to troubleshoot this error for the PHP server SDK.
If you have any problems while using the SDK, you are welcome to seek help from the Alibaba Cloud SDK Q&A community. We recommend that you read the feedback instructions before asking questions. For more information, see Submit feedback.