### Install Dependencies and Start Development Server Source: https://github.com/agoraio/docs-source/blob/staging/shared/video-sdk/get-started/get-started-sdk/project-test/react-js.mdx Commands to prepare the local environment and launch the development server for the voice calling quickstart. ```bash cd agora-sdk-quickstart npm install ``` ```bash npm run dev ``` -------------------------------- ### Initialize Go Starter Project Source: https://github.com/agoraio/docs-source/blob/staging/conversational-ai/get-started/quickstart.mdx Clones the official Go starter project, binds it to your Agora project, and sets up the environment file. After initialization, navigate into the project directory and run 'make setup' to install dependencies, then 'make dev' to start the development server. ```bash agora init my-go-demo --template go cd my-go-demo make setup make dev ``` -------------------------------- ### Install and run the project Source: https://github.com/agoraio/docs-source/blob/staging/shared/interactive-whiteboard/get-started-uikit/web.mdx Commands to install project dependencies and start the local development server. ```bash npm install ``` ```bash npm run dev ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/agoraio/docs-source/blob/staging/shared/video-sdk/get-started/compile-run-sample-project/project-setup/electron.mdx After switching to the example directory, run this command to install the necessary SDK dependencies. ```bash yarn ``` -------------------------------- ### Run iOS Example Source: https://github.com/agoraio/docs-source/blob/staging/shared/chat-sdk/get-started/get-started-uikit/project-test/react-native.mdx Navigate to the example directory, install pods, and run this command to compile and launch the iOS sample application. ```bash cd example && yarn run pods && yarn run iOS ``` -------------------------------- ### Run Demo Server Source: https://github.com/agoraio/docs-source/blob/staging/shared/video-sdk/token-authentication/deploy-token-server/index.mdx Installs dependencies and starts the local token generation server. ```shell npm i node DemoServer.js ``` -------------------------------- ### Start Development Server Source: https://github.com/agoraio/docs-source/blob/staging/shared/video-sdk/get-started/get-started-sdk/project-test/web.mdx Use this command to start the local development server. Ensure you have the necessary dependencies installed. ```shell npm run dev ``` -------------------------------- ### Run the Example Source: https://github.com/agoraio/docs-source/blob/staging/convo-ai-device-kit/get-started/run-the-demo.mdx Steps to connect the R1 device, configure Wi-Fi, start and end conversations, and restart the device. ```APIDOC ## Run the Example Connect the R1 development board to your computer using a Type-C cable connected to the `USB TO UART` interface. Follow these steps to test the voice AI functionality: 1. **Configure Wi-Fi** (first-time setup): Press and hold the **S1** button for 5 seconds to enter network configuration mode. Use the Android app to complete the Wi-Fi setup. 1. **Wake the device**: Short press the **Middle button** to start a conversation with the AI agent. 1. **End the conversation**: After the conversation, short press the **Middle button** to exit the conversation with the AI agent. 1. **Restart from sleep**: The device enters deep sleep mode after 3 minutes of inactivity. Press the **RST** button to restart. * The `USB TO UART` interface also charges the battery. The device automatically activates when you connect a battery or data cable. * If the programming tool fails to restart the development board automatically, press the **RST** button to manually restart and restore programming capability. ``` -------------------------------- ### Initialize Project Dependencies Source: https://github.com/agoraio/docs-source/blob/staging/shared/chat-sdk/get-started/get-started-uikit/project-test/react-native.mdx Run these commands in the terminal to install dependencies and set up the example environment. ```bash yarn && yarn run example-env && yarn run sdk-version ``` -------------------------------- ### Go HTTP Server Setup Source: https://github.com/agoraio/docs-source/blob/staging/shared/notification-center-service/maintain-user-online-status.mdx Sets up and starts an HTTP server on port 80, registering handlers for the root and notification endpoints. Logs fatal errors if the server fails to start. ```go func main() { http.HandleFunc("/", rootHandler) http.HandleFunc("/ncsNotify", ncsHandler) port := ":80" fmt.Printf("Notifications webhook server started on port %s\n", port) if err := http.ListenAndServe(port, nil); err != nil { log.Fatalf("Failed to start server: %v", err) } } ``` -------------------------------- ### Setup Local Video Source: https://github.com/agoraio/docs-source/blob/staging/shared/video-sdk/get-started/get-started-sdk/project-implementation/windows.mdx Configures the local video canvas and starts the preview. ```cpp void CAgoraQuickStartDlg::setupLocalVideo() { VideoCanvas canvas; canvas.renderMode = RENDER_MODE_TYPE::RENDER_MODE_HIDDEN; canvas.uid = 0; canvas.view = m_staLocal.GetSafeHwnd(); m_rtcEngine->setupLocalVideo(canvas); m_rtcEngine->startPreview(); } ``` -------------------------------- ### Install Frontend Dependencies Source: https://github.com/agoraio/docs-source/blob/staging/ten-agent/get-started/codespace-quickstart.mdx Navigate to the playground directory and install the necessary frontend dependencies using pnpm. This is required before starting the development server. ```bash cd playground pnpm install ``` -------------------------------- ### Initialize Signaling Client Usage Source: https://github.com/agoraio/docs-source/blob/staging/shared/signaling/reference/api-ref/flutter/_configuration-en.flutter.mdx Complete example showing configuration setup and client initialization. ```dart final proxyConfig = RtmProxyConfig( protocolType : RtmProxyType.http, server : "x.x.x.x", port : 8080, account : "Tony", password : "pwd" ); final logConfig = RtmLogConfig( filePath : "xxxx", fileSizeInKB : 1024, leave : RtmLogLevel.info ); final encryptionConfig = RtmEncryptionConfig( encryptionMode : RtmEncryptionMode.aes256gcm, encryptionKey : "XXXXX", encryptionSalt : [1,2,3,4,5]); final rtmConfig = RtmConfig( heartbeatInterval : 10, presenceTimeout : 5, proxyConfig : proxyConfig, logConfig : logConfig, areaCode : {RtmAreaCode.cn, RtmAreaCode.na}, encryptionConfig : encryptionConfig ); var (status,rtmClient) = await RTM("myAppId", "Tony", rtmConfig:rtmConfig); if (status.error == true) { print(status); } else { print(response); } ``` -------------------------------- ### Initialize MiniCore and Use Plugins Source: https://github.com/agoraio/docs-source/blob/staging/shared/chat-sdk/client-api/messages/manage-messages/project-implementation/web.mdx Full example demonstrating SDK initialization, plugin registration, event handling, and user login. ```javascript import MiniCore from "agora-chat/miniCore/miniCore"; import * as contactPlugin from "agora-chat/contact/contact"; const miniCore = new MiniCore({ appKey: "your appKey", }); // The fixed value "contact" is used here. miniCore.usePlugin(contactPlugin, "contact"); // Get the contact list. miniCore.contact.getContacts(); // Add the listener. miniCore.addEventHandler("handlerId", { onTextMessage: (message) => {}, }); // Login miniCore.open({ username: "username", accessToken: "accessToken", }); ``` -------------------------------- ### Get User Events with Node.js Source: https://github.com/agoraio/docs-source/blob/staging/signaling/rest-api/user-events.mdx This Node.js example uses `axios` to retrieve user events. Make sure `axios` is installed. Substitute `` with your authentication details. ```javascript const axios = require('axios'); const url = 'https://api.agora.io/dev/v2/project/876922cbca0098dff4323566daa89675/rtm/vendor/user_events'; const headers = { 'Authorization': 'Basic ' }; axios.get(url, { headers }) .then(response => { console.log("Status:", response.status); console.log("Response:", response.data); }) .catch(error => { console.error("Error:", error.response ? error.response.data : error.message); }); ``` -------------------------------- ### HTTP GET Request Example Source: https://github.com/agoraio/docs-source/blob/staging/shared/agora-analytics/_api.mdx Example of a GET request to the /beta/analytics/call/metrics endpoint with required query parameters. ```http GET /beta/analytics/call/metrics?start_ts=1548665345&end_ts=1548670821&appid=axxxxxxxxxxxxxxxxxxxx&call_id=cxxxxxxxxxxxxxxxxxxxx&sids=sxxxxxxxxxxxxxxxx1,sxxxxxxxxxxxxxxxx2,sxxxxxxxxxxxxxxxx3 HTTP/1.1 Host: api.agora.io Accept: application/json Authorization: Basic ZGJhZDMyNmFkxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxWQzYTczNzg2ODdiMmNiYjRh ``` -------------------------------- ### Launch the sample client Source: https://github.com/agoraio/docs-source/blob/staging/shared/iot/get-started/get-started-sdk/project-test/linux-c.mdx Execute the binary with the required App ID, channel ID, and token. ```bash ./hello_rtsa --app-id --channel-id --token ``` -------------------------------- ### Compile the sample project Source: https://github.com/agoraio/docs-source/blob/staging/shared/iot/get-started/get-started-sdk/project-test/linux-c.mdx Navigate to the example directory and execute the build script. ```bash cd /agora_rtsa_sdk/example ./build-x86_64.sh ``` -------------------------------- ### Get Entry Point List Example Request Source: https://github.com/agoraio/docs-source/blob/staging/shared/broadcast-streaming-private-product/restful-api/_entry-points.mdx Example of an HTTP request to get the list of entry points for a given App ID. ```shell GET https://api.agora.io/v1/projects/{your_appid}/fls/entry_points HTTP/1.1 ``` -------------------------------- ### Example HTTP GET Request Header Source: https://github.com/agoraio/docs-source/blob/staging/extensions-marketplace/develop/implement/usage.md An example of a complete HTTP GET request header for retrieving a customer license, including authentication parameters. ```http GET https://api.agora.io/customers/1234567/license?apiKey=pz*************gd&signature=SF*************3D HTTP/1.1 ``` -------------------------------- ### GET request example Source: https://github.com/agoraio/docs-source/blob/staging/extensions-marketplace/develop/implement/signature-algorithm.md Example URL for a usage query request. ```text https://[host]/usage?fromTs=1619913600&toTs=1619917200&pageNum=1&apiKey=pzD5XinRSlmA64tZx81fL92YcBsJK0gd&signature={signature} ``` -------------------------------- ### Get Pull-from-Origin Example Source: https://github.com/agoraio/docs-source/blob/staging/shared/broadcast-streaming-private-product/restful-api/_pull-from-origin.mdx Example request and response for retrieving pull-from-origin settings. ```shellscript GET https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/settings/origin_site HTTP/1.1 ``` ```json { "enabled": true, "domain": "{your_domain}" } ``` ```shellscript HTTP/1.1 200 OK ``` -------------------------------- ### Example RTM Token GET Request Source: https://github.com/agoraio/docs-source/blob/staging/shared/common/_create-run-token-server.mdx An example URL for requesting an RTM token using the GET method. Replace 'bob' with your user ID and adjust the expiry time as needed. ```text https://agora-token-service-production-1234.up.railway.app/rtm/bob/?expiry=600 ``` -------------------------------- ### Launch the sample application Source: https://github.com/agoraio/docs-source/blob/staging/shared/iot/develop/ensure-channel-quality/project-test/linux-c.mdx Navigate to the output directory and run the executable with required authentication parameters. ```bash cd out/x86_64 ``` ```bash ./hello_rtsa --app-id --channel-id --token ``` -------------------------------- ### Install Dependencies with CocoaPods Source: https://github.com/agoraio/docs-source/blob/staging/shared/flexible-classroom/integrate-flexible-classroom/ios.mdx Run 'pod install' in your terminal within the project directory to install the dependencies listed in your Podfile. This output shows an example of the installation process. ```shell Analyzing dependencies Downloading dependencies Installing AgoraProctorSDK (1.0.0) Installing AgoraProctorUI (1.0.0) Installing AgoraEduCore (2.8.20) Installing AgoraLog (1.0.2) Installing AgoraMediaPlayer_iOS (1.3.0) Installing AgoraRtcEngine_iOS (3.7.2) Installing AgoraRtm_iOS (1.4.8) Installing AgoraUIBaseViews (2.8.0) Installing AgoraWidget (2.8.0) Installing AliyunOSSiOS (2.10.8) Installing Armin (1.1.0) Installing CocoaLumberjack (3.6.1) Installing Masonry (1.1.0) Installing Protobuf (3.17.0) Installing SDWebImage (5.12.0) Installing SSZipArchive (2.4.2) Installing SwifterSwift (5.2.0) Installing YYModel (1.0.4) Generating Pods project Integrating client project ``` -------------------------------- ### Launch the Electron sample project Source: https://github.com/agoraio/docs-source/blob/staging/shared/video-sdk/get-started/compile-run-sample-project/project-implementation/electron.mdx Execute this command within the /example directory to start the application. ```bash yarn start ``` -------------------------------- ### Get Custom Snapshot Example Source: https://github.com/agoraio/docs-source/blob/staging/shared/broadcast-streaming-private-product/restful-api/snapshot-moderation/_custom.mdx Example request and response for retrieving custom snapshot settings. ```shellscript GET https://api.agora.io/v1/projects/{your_appid}/fls/entry_points/live/settings/snapshot/custom/regions/cn HTTP/1.1 ``` ```shellscript HTTP/1.1 200 OK ``` ```json { "enabled": true, "enableModeration": true, "snapshotInterval": 30, "storageConfig": { "accessKey": "test access key", "region": 3, "secretKey": "test secret key", "vendor": 2 } } ``` -------------------------------- ### Pod Install Output Example Source: https://github.com/agoraio/docs-source/blob/staging/shared/flexible-classroom/integrate-flexible-classroom/ios.mdx This output shows the dependencies being installed after running 'pod install', including specific versions of Agora SDK components. ```shell Analyzing dependencies Downloading dependencies Installing AgoraClassroomSDK_iOS (2.8.20) Installing AgoraEduCore (2.8.20) Installing AgoraEduUI (2.8.20) Installing AgoraLog (1.0.2) Installing AgoraMediaPlayer_iOS (1.3.0) Installing AgoraRtcEngine_iOS (3.7.2) Installing AgoraRtm_iOS (1.4.8) Installing AgoraUIBaseViews (2.8.0) Installing AgoraWidget (2.8.0) Installing AgoraWidgets (2.8.20) Installing Agora_Chat_iOS (1.0.6) Installing AliyunOSSiOS (2.10.8) Installing Armin (1.1.0) Installing CocoaLumberjack (3.6.1) Installing Masonry (1.1.0) Installing NTLBridge (3.1.5) Installing Protobuf (3.17.0) Installing SDWebImage (5.12.0) Installing SSZipArchive (2.4.2) Installing SwifterSwift (5.2.0) Installing Whiteboard (2.16.51) Installing YYModel (1.0.4) Generating Pods project Integrating client project ``` -------------------------------- ### Execute Music Content Center Setup Source: https://github.com/agoraio/docs-source/blob/staging/shared/extensions-marketplace/drm-play/project-implementation/electron.mdx Call the setup function during application startup. ```javascript setupMusicContentCenter(); ``` -------------------------------- ### Run Android Example Source: https://github.com/agoraio/docs-source/blob/staging/shared/chat-sdk/get-started/get-started-uikit/project-test/react-native.mdx Navigate to the example directory and run this command to compile and launch the Android sample application. ```bash cd example && yarn run Android ``` -------------------------------- ### Get Turns Request Example (Node.js) Source: https://github.com/agoraio/docs-source/blob/staging/conversational-ai/rest-api/agent/turns.mdx This Node.js example shows how to make a GET request to the Conversational AI Agent API using the fetch API. It configures the request method, headers, and handles the response. ```javascript const url = 'https://api.agora.io/api/conversational-ai-agent/v2/projects/:appid/agents/:agentId/turns'; const options = { method: 'GET', headers: { 'Authorization': 'Basic ', 'Content-Type': 'application/json' } }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` -------------------------------- ### Execute setup at startup Source: https://github.com/agoraio/docs-source/blob/staging/shared/extensions-marketplace/drm-play/project-implementation/flutter.mdx Invoke the setup method during the engine initialization process. ```dart await setupMusicContentCenter(); ``` -------------------------------- ### Get Callback Storage Info Example Source: https://github.com/agoraio/docs-source/blob/staging/shared/chat-sdk/develop/_setup-webhooks.mdx Example cURL request to retrieve callback storage information. ```shell curl -X GET 'https://a1.easemob.com/easemob-demo/easeim/callbacks/storage/info' \ -H 'Authorization: Bearer ' ``` -------------------------------- ### Build Basic Examples Source: https://github.com/agoraio/docs-source/blob/staging/shared/cloud-gateway/get-started/compile-run-sample-project/go.mdx Compile the basic examples included in the Agora Golang Server SDK project. ```bash make examples ``` -------------------------------- ### Navigate to Sample Project Directory Source: https://github.com/agoraio/docs-source/blob/staging/shared/on-premise-recording/get-started/get-started-sdk/project-test/cpp.mdx Change to the sample project directory before building. ```sh cd agora_rtc_sdk/example ``` -------------------------------- ### Initialize Python Starter Project Source: https://github.com/agoraio/docs-source/blob/staging/conversational-ai/get-started/quickstart.mdx Clones the official Python starter project, binds it to your Agora project, and sets up the environment file. After initialization, navigate into the project directory and install dependencies using bun, then start the development server. ```bash agora init my-python-demo --template python cd my-python-demo bun install bun run dev ``` -------------------------------- ### Get domain attributes example request line Source: https://github.com/agoraio/docs-source/blob/staging/shared/broadcast-streaming-private-product/restful-api/_domain-names.mdx Example request line for querying specific domain attributes. ```shellscript GET https://api.agora.io/v1/projects/{your_appid}/fls/domains?id={your_domain} HTTP/1.1 ``` -------------------------------- ### Classroom State Change Event Example Source: https://github.com/agoraio/docs-source/blob/staging/flexible-classroom/restful-api/classroom-api.mdx Example JSON payload representing a classroom state change event where the class has started. ```json { "startTime": 1611561776588, "state": 1 } ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/agoraio/docs-source/blob/staging/shared/chat-sdk/get-started/get-started-uikit/project-setup/react-native.mdx Initialize the environment and install all required packages for the UI Kit. ```bash yarn && yarn run env ``` ```bash yarn add @react-native-async-storage/async-storage \ @react-native-camera-roll/camera-roll \ @react-native-clipboard/clipboard \ @react-native-firebase/app \ @react-native-firebase/messaging \ react-native-audio-recorder-player \ react-native-agora-chat \ react-native-agora-chat-uikit \ react-native-create-thumbnail \ react-native-document-picker \ react-native-fast-image \ react-native-file-access \ react-native-get-random-values \ react-native-image-picker \ react-native-permissions \ react-native-safe-area-context \ react-native-screens \ react-native-video ``` -------------------------------- ### Clone the API Examples repository Source: https://github.com/agoraio/docs-source/blob/staging/shared/video-sdk/get-started/compile-run-sample-project/project-setup/windows.mdx Use this command to download the repository containing native platform examples. ```bash git clone git@github.com:AgoraIO/API-Examples.git ``` -------------------------------- ### Navigate and Install Dependencies Source: https://github.com/agoraio/docs-source/blob/staging/shared/video-sdk/get-started/get-started-sdk/project-setup/web.mdx After creating the project, navigate into the project directory and install all necessary dependencies using npm. ```bash cd agora_web_quickstart npm install ``` -------------------------------- ### Start Agent Session (Python) Source: https://github.com/agoraio/docs-source/blob/staging/conversational-ai/develop/build-server-client.mdx Configures and starts an agent session using the Agora Agent Server SDK. Requires DeepgramSTT, MiniMaxTTS, and OpenAI to be installed. ```python from agora_agent_server_sdk import ( AgoraClient, Agent, Area, DeepgramSTT, MiniMaxTTS, OpenAI, ExpiresIn, ) agora_client = AgoraClient( area=Area.US, app_id=APP_ID, app_certificate=APP_CERTIFICATE, ) AGENT_UID = 123456 class InviteRequest(BaseModel): channel: str @app.post("/api/invite-agent") def invite_agent(body: InviteRequest): agent = ( Agent( name="support-agent", instructions="You are a friendly support agent for Acme Corp. Keep answers under 30 seconds.", greeting="Hi there! How can I help you today?", failure_message="Sorry, I had trouble hearing that. Could you repeat?", max_history=50, advanced_features={"enable_rtm": True, "enable_tools": False}, parameters={"data_channel": "rtm", "enable_error_message": True}, ) .with_stt(DeepgramSTT(model="nova-3", language="en")) .with_llm(OpenAI(model="gpt-4o-mini", max_history=15)) .with_tts(MiniMaxTTS(model="speech_2_6_turbo", voice_id="English_captivating_female1")) ) session = agent.create_session( agora_client, channel=body.channel, agent_uid=AGENT_UID, remote_uids=["*"], idle_timeout=30, expires_in=ExpiresIn.hours(1), ) try: result = session.start() return {"agentId": result.agent_id, "agentUid": AGENT_UID} except Exception as exc: raise HTTPException(status_code=502, detail=f"start failed: {exc}") ``` -------------------------------- ### Install and Use Node.js Version 16 with NVM Source: https://github.com/agoraio/docs-source/blob/staging/shared/flexible-classroom/quickstart/web.mdx Commands to install Node.js version 16 using NVM and then use it to start the Flexible Classroom project. ```bash yarn global add nvm ``` ```bash nvm install 16 ``` ```bash nvm use 16 ``` ```bash yarn dev ``` -------------------------------- ### Setup Media Player (Android) Source: https://github.com/agoraio/docs-source/blob/staging/assets/code/video-sdk/play-media/start-streaming.mdx Initializes the media player instance and registers an observer for callbacks. ```kotlin fun setupMediaPlayer(listener: MediaPlayerListener){ if (mediaPlayer == null) { // Create an instance of the media player mediaPlayer = agoraEngine?.createMediaPlayer() // Set the mediaPlayerObserver to receive callbacks mediaPlayer?.registerPlayerObserver(mediaPlayerObserver) // A listener to notify the UI mediaPlayerListener = listener } } ``` -------------------------------- ### Make GET Request using wget Source: https://github.com/agoraio/docs-source/blob/staging/shared/media-gateway/reference/rest-api/endpoints/message-notification-service/query-ip-address.mdx Use wget to perform a GET request to the API. This example specifies quiet output and sets necessary headers. ```shell wget --quiet \ --method GET \ --header 'Authorization: ' \ --header 'Accept: application/json' \ --output-document \ - https://api.sd-rtn.com/v2/ncs/ip ``` -------------------------------- ### GET Agents Request Example Source: https://github.com/agoraio/docs-source/blob/staging/real-time-stt/rest-api/v7.x/list.mdx Use this example to retrieve a list of agents. Ensure you replace ':appid' with your application ID and '' with your Basic Auth credentials. ```bash curl --request GET \ --url 'https://api.agora.io/api/speech-to-text/v1/projects/:appid/agents?state=2&limit=20' \ --header 'Authorization: Basic ' ``` ```python import requests url = "https://api.agora.io/api/speech-to-text/v1/projects/:appid/agents" params = { "state": 2, "limit": 20 } headers = {"Authorization": "Basic "} response = requests.request("GET", url, headers=headers, params=params) print(response.text) ``` ```javascript const url = 'https://api.agora.io/api/speech-to-text/v1/projects/:appid/agents?state=2&limit=20'; const options = { method: 'GET', headers: {Authorization: 'Basic '} }; fetch(url, options) .then(res => res.json()) .then(json => console.log(json)) .catch(err => console.error(err)); ``` -------------------------------- ### Run Basic send_recv_pcm Example Source: https://github.com/agoraio/docs-source/blob/staging/shared/cloud-gateway/get-started/compile-run-sample-project/go.mdx Execute the send_recv_pcm example after setting the AGORA_APP_ID and AGORA_APP_CERTIFICATE environment variables. Configure LD_LIBRARY_PATH for Linux or DYLD_LIBRARY_PATH for macOS. ```bash cd ./bin # Get AGORA_APP_ID and AGORA_APP_CERTIFICATE from agora console export AGORA_APP_ID=xxxx # To enable authentication for your project you need the AGORA_APP_CERTIFICATE from Agora console export AGORA_APP_CERTIFICATE=xxx # For linux, use the following command to load agora sdk library export LD_LIBRARY_PATH=../agora_sdk # For mac, use the following command # export DYLD_LIBRARY_PATH=../agora_sdk_mac ./send_recv_pcm ``` -------------------------------- ### Get Channel Metadata Usage Source: https://github.com/agoraio/docs-source/blob/staging/shared/signaling/reference/api-ref/flutter/_storage-en.flutter.mdx Example of retrieving metadata for a specific channel. ```dart var (status,response) = await rtmClient.getStorage.getChannelMetadata( "myChannel", RtmChannelType.message, ) if (status.error == true) { print(status); } else { print(response); } ``` -------------------------------- ### Initialize Go Project Source: https://github.com/agoraio/docs-source/blob/staging/shared/chat-sdk/develop/token-authentication/index.mdx Commands to create a new directory and initialize a Go module. ```bash mkdir chat-token-server cd chat-token-server go mod init chat-token-server ``` -------------------------------- ### Install dependencies and run in development mode Source: https://github.com/agoraio/docs-source/blob/staging/shared/flexible-classroom/integrate-flexible-classroom-fcr/web.mdx Commands to prepare the environment and launch the project for debugging. ```bash yarn install:packages ``` ```bash yarn dev:scene ``` -------------------------------- ### Final signature value Source: https://github.com/agoraio/docs-source/blob/staging/extensions-marketplace/develop/implement/signature-algorithm.md The resulting signature string for the provided GET example. ```text SFVnCVlRbrZcjMPGTWVxAE4QWZ8%3D ``` -------------------------------- ### Run the App (Development Server) Source: https://github.com/agoraio/docs-source/blob/staging/conversational-ai/develop/build-server-client.mdx Commands to start the development server for the web client. Choose the appropriate command based on your package manager. ```bash pnpm dev ``` -------------------------------- ### Make GET Request using HTTPie Source: https://github.com/agoraio/docs-source/blob/staging/shared/media-gateway/reference/rest-api/endpoints/message-notification-service/query-ip-address.mdx This example shows how to make a GET request using the HTTPie command-line tool. It includes setting the Accept and Authorization headers. ```shell http GET https://api.sd-rtn.com/v2/ncs/ip \ Accept:application/json \ Authorization:'' ``` -------------------------------- ### Make GET Request using Javascript XMLHttpRequest Source: https://github.com/agoraio/docs-source/blob/staging/shared/media-gateway/reference/rest-api/endpoints/message-notification-service/query-ip-address.mdx This example uses the XMLHttpRequest object in Javascript to make a GET request. It includes setting up event listeners and request headers. ```js const data = null; const xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener('readystatechange', function () { if (this.readyState === this.DONE) { console.log(this.responseText); } }); xhr.open('GET', 'http://api.sd-rtn.com/v2/ncs/ip'); xhr.setRequestHeader('Authorization', ''); xhr.setRequestHeader('Accept', 'application/json'); xhr.send(data); ``` -------------------------------- ### Run the project Source: https://github.com/agoraio/docs-source/blob/staging/shared/interactive-whiteboard/present-files/web.mdx Command to start the development server. ```sh npm run dev ``` -------------------------------- ### Get Rule List (Node.js) Source: https://github.com/agoraio/docs-source/blob/staging/shared/common/channel-management-api/endpoints/ban-user-privileges/get-rule-list.mdx This Node.js example demonstrates how to fetch ban user rules. It configures the request with the necessary headers and sends a GET request to the API endpoint. ```javascript const https = require('https'); const options = { method: 'GET', hostname: 'api.sd-rtn.com', port: null, path: '/dev/v1/kicking-rule?appid=4855xxxxxxxxxxxxxxxxxxxxxxxxeae2', headers: { Authorization: 'Basic ', Accept: 'application/json' } }; const req = https.request(options, function (res) { const chunks = []; res.on('data', function (chunk) { chunks.push(chunk); }); res.on('end', function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end(); ``` -------------------------------- ### Compile Go SDK Sample Project Source: https://github.com/agoraio/docs-source/blob/staging/shared/cloud-gateway/get-started/integrate-sdk/go.mdx Navigate to the SDK directory and run 'make build' to compile the sample project. ```shell # Enter the SDK directory cd go_rtc_sdk # Execute the build make build ``` -------------------------------- ### Activate IoT License REST API Request Example Source: https://github.com/agoraio/docs-source/blob/staging/shared/iot/develop/_licensing.mdx This is an example of a GET request to activate an IoT license. Ensure you replace placeholder values with your actual license details. ```http https://api.agora.io/dabiz/license/v2/active?pid=02F5xxxxxxxxxxxxxxxxxxxxxxxxEC30&licenseKey=111&appid=a6d6xxxxxxxxxxxxxxxxxxxxxxxxf75e ``` -------------------------------- ### Initialize the media engine instance Source: https://github.com/agoraio/docs-source/blob/staging/shared/video-sdk/develop/custom-video-and-audio/project-implementation/unreal.mdx Add this call to setupVideoSDKEngine in MyUserWidget.cpp to enable media engine functionality. ```cpp agoraEngine->queryInterface(AGORA_IID_MEDIA_ENGINE, (void**)&MediaEngine); ``` -------------------------------- ### Example RTC Token GET Request Source: https://github.com/agoraio/docs-source/blob/staging/shared/common/_create-run-token-server.mdx An example URL for requesting an RTC token. Replace placeholders with your actual channel name, user ID, and desired expiry time. ```text https://agora-token-service-production-1234.up.railway.app/rtc/MyChannel/1/uid/1/?expiry=300 ``` -------------------------------- ### Copy example environment file Source: https://github.com/agoraio/docs-source/blob/staging/shared/common/middleware/setup.mdx Create a local .env file by copying the provided example. ```bash cp .env.example .env ``` -------------------------------- ### GET Request Example for Projector Tasks Source: https://github.com/agoraio/docs-source/blob/staging/interactive-whiteboard/reference/whiteboard-api/file-conversion.md Use this example to retrieve task details from the Projector API. Ensure you replace placeholder values for region and token with your actual credentials. ```bash curl --request GET \ --url https://api.netless.link/v5/projector/tasks/:uuid \ --header 'region: ' \ --header 'token: ' ``` -------------------------------- ### Run the Agora Recording Sample Application Source: https://github.com/agoraio/docs-source/blob/staging/shared/on-premise-recording/get-started/get-started-sdk/project-test/java.mdx Execute this command from the Examples-Mvn directory to start the Spring Boot server. Ensure the LD_LIBRARY_PATH is set correctly to include the native libraries. The server defaults to port 18080, which can be changed using the -Dserver.port parameter. ```bash LD_LIBRARY_PATH="$LD_LIBRARY_PATH:libs/native/linux/x86_64" \ java -Dserver.port=18080 -jar target/agora-example.jar ``` -------------------------------- ### Initialize camera device Source: https://github.com/agoraio/docs-source/blob/staging/shared/video-sdk/develop/custom-video-and-audio/project-implementation/unity.mdx Set up the WebCamTexture to capture frames from the device and start playback. ```csharp private void InitCameraDevice() { WebCamDevice[] devices = WebCamTexture.devices; _webCameraTexture = new WebCamTexture(devices[0].name, (int)CameraSize.x, (int)CameraSize.y, CameraFPS); _webCameraTexture.Play(); } ``` ```csharp InitCameraDevice(); ``` -------------------------------- ### GET Request Example for Room Information Source: https://github.com/agoraio/docs-source/blob/staging/interactive-whiteboard/reference/whiteboard-api/room-management.md Use this example to retrieve information about a specific room using its UUID. Ensure the Host, region, Content-Type, and token are correctly set. ```http GET /v5/rooms/a7exxxxxxa69 Host: api.netless.link region: us-sv Content-Type: application/json token: NETLESSSDK_YWs9xxxxxxM2MjRi ```