The source code for the Cloud Video Conferencing service Software Development Kit (SDK) is hosted on the open source platform GitHub and in major dependency repositories. You can install the SDK using the dependency management tool for your programming language or by cloning it from GitHub. All SDKs depend only on the core SDK library. You can use the core library directly to make calls with the CommonRequest method.
Development steps
1. Install the Alibaba Cloud SDK
Please read the installation instructions. We provide SDKs for the following programming languages:
SDK | Installation instructions |
|---|---|
Java SDK | |
Go SDK | |
C++ SDK | |
PHP SDK |
2. Grant RAM permissions
Register for an Alibaba Cloud account and create an AccessKey. Then, grant the `AliyunCVCFullAccess` permission to the RAM user.
3. Download the SDK toolkit
The SDK toolkit contains two class libraries. Run the `mvn package` or `mvn deploy` command to package these libraries into JAR files. Then, add the JAR files as dependencies to your project.
aliyun-java-sdk-core
aliyun-java-sdk-aliyuncvc
Example
import java.util.ArrayList;
import java.util.List;
import com.alibaba.fastjson.JSON;
import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.aliyuncvc.model.v20191030.CreateUserRequest;
import com.aliyuncs.aliyuncvc.model.v20191030.CreateUserResponse;
import com.aliyuncs.aliyuncvc.model.v20191030.GetUserResponse.UserInfo;
import com.aliyuncs.profile.DefaultProfile;
import com.aliyuncs.profile.IClientProfile;
public class TestCvc {
public static void main(String[] args) throws Exception {
IClientProfile profile = DefaultProfile.getProfile("cn-hangzhou", "yourAccessKeyId", "yourAccessKeySecret");
IAcsClient client = new DefaultAcsClient(profile);
// Assemble the request object
CreateUserRequest createUserRequest = new CreateUserRequest();
// The domain name of the Cloud Video Conferencing API service. This endpoint is fixed and does not need to be changed.
createUserRequest.setSysEndpoint("aliyuncvc.cn-hangzhou.aliyuncs.com");
// Set the request parameters
List<UserInfo> list = new ArrayList();
UserInfo userInfo = new UserInfo();
userInfo.setUserId("test");
userInfo.setUserName("test");
userInfo.setGroupId("test");
userInfo.setGroupName("test");
list.add(userInfo);
String str = JSON.toJSON(list).toString();
createUserRequest.setUserInfo(str);
createUserRequest.setCount(1);
// Get the request result
CreateUserResponse createUserResponse = client.getAcsResponse(createUserRequest);
if(createUserResponse.getSuccess()) {
// Business logic
}
}
}