Integrate the SDK
Updated
Shows how to integrate the Server Gateway SDK and run the sample project.
This article shows how to integrate the Server Gateway Go SDK and run the sample project.
Set up the development environment
Make sure your server meets the following requirements.
Hardware environment
Operating system
- Ubuntu 18.04 or higher
- CentOS: 7.0 or higher
CPU architecture
- x86-64
If you need to run the SDK on other architectures, submit a ticket to contact technical support.
Performance
- CPU:8-core, 1.8 GHz or higher.
- 2 GB of RAM or higher. 4 GB or higher is recommended.
Network
- The server is connected to the internet and has an internet IP.
- The server can access
*.agora.ioand*.agoralab.co.
Software environment
- Go 1.21 or above
Get an Agora app ID and a Video SDK temporary token
See Get Started with Agora to learn how to get an Agora app ID and a Video SDK temporary token.
Get the SDK
Run the following command to get the latest SDK.
git clone https://github.com/AgoraIO-Extensions/Agora-Golang-Server-SDK.git go_rtc_sdkCompile the sample project
Run the following commands to compile the sample project:
# Enter the SDK directory
cd go_rtc_sdk
# Execute the build
make buildAdd the required dependencies
In the project’s go.mod or builds file, add the following lines to include the required SDK dependencies.
# Replace /path/to/go_rtc_sdk with the actual path of the SDK you downloaded in Step 1
replace github.com/AgoraIO-Extensions/Agora-Golang-Server-SDK/v2 => /path/to/go_rtc_sdk
# Replace version_number with the actual SDK version number, which you can find in the release notes, e.g., v2.1.0
require github.com/AgoraIO-Extensions/Agora-Golang-Server-SDK/v2 version_number