### Install SDK and Prerequisites Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/mdx_includes/rcv-sdk-quick-start-ios.md Navigates to the QuickStart directory and installs the necessary SDK dependencies using CocoaPods. ```shell cd ringcentral-videosdk-ios-samples/QuickStart pod install ``` -------------------------------- ### Install Mkdocs and Dependencies Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/README.md Commands to clone the repository, install Mkdocs and its requirements, and start the local development server for the RingCentral Developer Guide. ```shell git clone https://github.com/ringcentral/ringcentral-api-docs.git cd ringcentral-api-docs pip install mkdocs pip install -r requirements.txt mkdocs serve ``` -------------------------------- ### Install RingCentral Ruby SDK & dotenv Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Installs the RingCentral Ruby SDK and the dotenv gem for managing environment variables. ```bash $ gem install ringcentral-sdk dotenv ``` -------------------------------- ### Install RingCentral PHP SDK & phpdotenv Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Installs the RingCentral PHP SDK and the phpdotenv library using Composer. ```bash $ curl -sS https://getcomposer.org/installer | php $ php composer.phar require ringcentral/ringcentral-php vlucas/phpdotenv ``` -------------------------------- ### Create and Start Server App in Ruby Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Installs the Sinatra gem, creates a server.rb file, and starts a Ruby server. Ensure the PORT is set correctly to match the ngrok tunnel. ```ruby require 'sinatra' require 'json' set :port, 3000 post '/webhook' do request.body.rewind payload = JSON.parse(request.body.read) puts "Received webhook: #{payload}" status 200 end ``` ```bash ruby server.rb ``` -------------------------------- ### RingCentral C# Quick Start - Project Setup Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/authentication/quick-start.md Sets up a new .NET Core web project and adds the RingCentral.Net and Newtonsoft.Json packages. ```bash mkdir authorization-demo cd authorization-demo dotnet new sln mkdir my-project cd my-project dotnet new web cd .. dotnet sln add ./my-project/my-project.csproj cd my-project dotnet add package RingCentral.Net dotnet add package Newtonsoft.Json ``` -------------------------------- ### Setup Python Virtual Environment and Install Code Checking Framework Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/README.md Steps to set up a Python virtual environment and install the mkdocs-codecheck package for verifying code samples within the RingCentral Developer Guide. ```shell cd $GITHUB/ringcentral-api-docs python3 -m venv . source ./bin/activate python3 -m pip install --upgrade pip pip3 install mkdocs-codecheck ``` -------------------------------- ### Install RingCentral JS SDK & dotenv Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Installs the necessary RingCentral JavaScript SDK and dotenv library for managing environment variables. ```bash $ npm install @ringcentral/sdk dotenv ``` -------------------------------- ### Ruby SDK Installation and Setup Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/authentication/quick-start.md Instructions for setting up a new Ruby on Rails application with the RingCentral Ruby SDK and dotenv for managing credentials. Includes generating a controller and editing configuration files. ```bash rails new authorization-flow cd authorization-flow bundle add ringcentral-sdk bundle add dotenv ``` ```bash rails generate controller main login ``` ```ruby class MainController < ApplicationController def login # Your login logic here end end ``` ```ruby Rails.application.routes.draw do get 'main/login' # Other routes end ``` ```html Login

Login with RingCentral

Login ``` ```bash rails generate controller main test ``` ```html Test Page

Welcome to the Test Page

You have successfully logged in.

``` ```bash bin/rails server -p 5000 ``` -------------------------------- ### Ruby Analytics API Quick Start Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/analytics/quick-start.md Installs the RingCentral Ruby SDK and dotenv gem, then provides a Ruby code example for interacting with the Analytics API. Assumes .env file is configured. ```bash gem install ringcentral-sdk dotenv ruby analytics.rb ``` ```ruby # Quick Start for RingCentral Call Performance Analytics API require 'ringcentral' require 'dotenv' # Load environment variables from .env file Dotenv.load # Initialize the SDK rc_client = RingCentral::SDK.new( ENV['RC_CLIENT_ID'], ENV['RC_CLIENT_SECRET'], ENV['RC_SERVER_URL'] ) platform = rc_client.platform begin # Authenticate the user platform.authorize( ENV['RC_USER_USERNAME'], ENV['RC_USER_EXTENSION'], ENV['RC_USER_PASSWORD'] ) puts 'Successfully logged in.' # Define the API endpoint and parameters for call performance analytics # Example: Get analytics for the last 7 days endpoint = '/analytics/telephony/v1/call-performance' query_params = { # Add your desired query parameters here, e.g.: # 'dateFrom': '2023-10-01', # 'dateTo': '2023-10-07', # 'groupBy': 'user' } # Make the API request response = platform.get(endpoint, query_params) data = response.body puts 'Call Performance Analytics Data:' puts data.to_json # Logout the user platform.revoke() puts 'Successfully logged out.' rescue StandardError => e puts "An error occurred: #{e.message}" end ``` -------------------------------- ### Install RingCentral Python SDK & python-dotenv Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Installs the RingCentral Python SDK and the python-dotenv library for handling environment variables. ```bash $ pip install ringcentral $ pip install python-dotenv ``` -------------------------------- ### Node.js Analytics API Quick Start Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/analytics/quick-start.md Installs the RingCentral JS SDK and dotenv, then provides a JavaScript code example for interacting with the Analytics API. Assumes .env file is configured. ```bash npm init npm install @ringcentral/sdk dotenv node analytics.js ``` ```javascript /* * Quick Start for RingCentral Call Performance Analytics API */ // Load environment variables from .env file require('dotenv').config(); // Import the RingCentral SDK const SDK = require('@ringcentral/sdk').SDK; // Initialize the SDK const platform = new SDK({ server: process.env.RC_SERVER_URL, clientId: process.env.RC_CLIENT_ID, clientSecret: process.env.RC_CLIENT_SECRET, }).platform; // Function to get call performance analytics async function getCallPerformanceAnalytics() { try { // Authenticate the user await platform.login({ username: process.env.RC_USER_USERNAME, extension: process.env.RC_USER_EXTENSION, password: process.env.RC_USER_PASSWORD, }); console.log('Successfully logged in.'); // Define the API endpoint and parameters for call performance analytics // Example: Get analytics for the last 7 days const endpoint = '/analytics/telephony/v1/call-performance'; const queryParams = { // Add your desired query parameters here, e.g.: // dateFrom: '2023-10-01', // dateTo: '2023-10-07', // groupBy: 'user' }; // Make the API request const response = await platform.get(endpoint, queryParams); const data = await response.json(); console.log('Call Performance Analytics Data:'); console.log(JSON.stringify(data, null, 2)); // Logout the user await platform.logout(); console.log('Successfully logged out.'); } catch (e) { console.error('An error occurred:', e.message); } } // Call the function to get analytics getCallPerformanceAnalytics(); ``` -------------------------------- ### RingCentral Video SDK Quick Start - Javascript Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/video/client-sdk/quick-start.md This snippet demonstrates how to get started with the RingCentral Video Client SDK in Javascript. It includes setup and basic usage for creating and managing video meetings. ```javascript /* * RingCentral Video Client SDK Quick Start - Javascript * * This file contains the core logic for the Javascript quick start. * It demonstrates how to initialize the SDK, create a meeting bridge, * and join a meeting. * * Dependencies: * - @ringcentral/video-sdk * * Usage: * 1. Initialize the SDK with your credentials. * 2. Create a meeting bridge. * 3. Join the meeting using the bridge PIN. */ // Placeholder for actual SDK initialization and usage console.log('RingCentral Video SDK Quick Start - Javascript'); // Example: Initialize SDK (replace with actual initialization) // const sdk = new RingCentralVideo.SDK({ clientId: 'YOUR_CLIENT_ID', clientSecret: 'YOUR_CLIENT_SECRET' }); // Example: Create a meeting bridge (replace with actual API call) // sdk.createMeetingBridge().then(bridge => { // console.log('Meeting bridge created:', bridge); // }); // Example: Join a meeting (replace with actual API call) // sdk.joinMeeting({ bridgePin: 'YOUR_BRIDGE_PIN' }).then(meeting => { // console.log('Joined meeting:', meeting); // }); ``` -------------------------------- ### Python Analytics API Quick Start Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/analytics/quick-start.md Installs the RingCentral Python SDK and python-dotenv, then provides a Python code example for interacting with the Analytics API. Assumes .env file is configured. ```bash pip install ringcentral python-dotenv python analytics.py ``` ```python ''' Quick Start for RingCentral Call Performance Analytics API ''' import os from dotenv import load_dotenv from ringcentral import SDK # Load environment variables from .env file load_dotenv() # Initialize the SDK sdk = SDK({ 'server': os.environ.get('RC_SERVER_URL'), 'client_id': os.environ.get('RC_CLIENT_ID'), 'client_secret': os.environ.get('RC_CLIENT_SECRET'), }) platform = sdk.platform def get_call_performance_analytics(): try: # Authenticate the user platform.login( username=os.environ.get('RC_USER_USERNAME'), extension=os.environ.get('RC_USER_EXTENSION'), password=os.environ.get('RC_USER_PASSWORD') ) print('Successfully logged in.') # Define the API endpoint and parameters for call performance analytics # Example: Get analytics for the last 7 days endpoint = '/analytics/telephony/v1/call-performance' query_params = { # Add your desired query parameters here, e.g.: # 'dateFrom': '2023-10-01', # 'dateTo': '2023-10-07', # 'groupBy': 'user' } # Make the API request response = platform.get(endpoint, query_params) data = response.json() print('Call Performance Analytics Data:') print(data) # Logout the user platform.logout() print('Successfully logged out.') except Exception as e: print(f'An error occurred: {e}') # Call the function to get analytics get_call_performance_analytics() ``` -------------------------------- ### Create and Start Server App in Javascript Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Creates a server.js file and starts a Node.js server. Ensure the PORT is set correctly to match the ngrok tunnel. ```javascript const express = require('express'); const app = express(); const port = process.env.PORT || 3000; app.use(express.json()); app.post('/webhook', (req, res) => { console.log('Received webhook:', req.body); res.sendStatus(200); }); app.listen(port, () => { console.log(`Server listening on port ${port}`); }); ``` ```bash node server.js ``` -------------------------------- ### Install RingCentral PHP SDK Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/notifications/websockets/quick-start.md Installs the RingCentral PHP SDK and phpdotenv using Composer. ```bash $ curl -sS https://getcomposer.org/installer | php $ php composer.phar require ringcentral/ringcentral-php vlucas/phpdotenv ``` -------------------------------- ### Start ngrok Server Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Command to start an ngrok server to proxy requests from RingCentral to a local server running on port 3000. ```bash $ ngrok http 3000 Forwarding https://xxxx-yy-181-201-33.ngrok-free.app -> https://localhost:3000 ``` -------------------------------- ### Run the Sample Application Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/mdx_includes/rcv-sdk-quick-start-js.md Installs dependencies and runs the development server for the sample application. ```shell yarn install yarn run dev ``` -------------------------------- ### Create and Start Server App in Java Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Sets up a Gradle project with Jetty dependencies, creates a WebhookServer class, and runs the application. Ensure the port configuration aligns with the ngrok tunnel. ```java import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.AbstractHandler; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.BufferedReader; public class WebhookServer extends AbstractHandler { public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { if ("POST".equalsIgnoreCase(request.getMethod())) { try (BufferedReader reader = request.getReader()) { StringBuilder buffer = new StringBuilder(); String line; while ((line = reader.readLine()) != null) { buffer.append(line); } System.out.println("Received webhook: " + buffer.toString()); response.setStatus(HttpServletResponse.SC_OK); baseRequest.setHandled(true); } } else { response.setStatus(HttpServletResponse.SC_BAD_REQUEST); baseRequest.setHandled(true); } } public static void main(String[] args) throws Exception { Server server = new Server(3000); server.setHandler(new WebhookServer()); server.start(); server.join(); } } ``` -------------------------------- ### Download .env Template Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/team-messaging/quick-start.md Instructions for downloading and setting up the `.env` file with RingCentral API credentials. ```Shell wget https://raw.githubusercontent.com/ringcentral/ringcentral-api-docs/main/code-samples/env-template -O .env # Edit .env file: # RC_APP_CLIENT_ID= # RC_APP_CLIENT_SECRET= # RC_USER_JWT= ``` -------------------------------- ### RingCentral Python Quick Start - index.html Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/authentication/quick-start.md The HTML template for the login page in the Python quick start example. ```html {!> code-samples/auth/quick-start/python/index.html !} ``` -------------------------------- ### Install SDK and Prerequisites Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/mdx_includes/rcv-sdk-quick-start-js.md Navigates to the basic meeting sample directory and installs the necessary Node.js dependencies using Yarn. ```shell cd ringcentral-videosdk-js-samples/basicMeeting yarn install ``` -------------------------------- ### Detailed AI App Creation Instructions Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Step-by-step instructions for creating an AI application in the RingCentral Developer Portal, including selecting app type, auth flow, and required scopes. ```mdx
  1. Login or create an account if you have not done so already.
  2. Go to Console/Apps and click 'Create App' button.
  3. Select "REST API App" under "What type of app are you creating?" Click "Next."
  4. Under "Auth" select "JWT auth flow."
  5. Under "Security" add the following app scopes:
    • AI
  6. Under "Security" select "This app is private and will only be callable using credentials from the same RingCentral account."
``` -------------------------------- ### RingCentral JavaScript Quick Start - index.ejs Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/authentication/quick-start.md The EJS template for the login page in the JavaScript quick start example. ```html {!> code-samples/auth/quick-start/javascript/index.ejs !} ``` -------------------------------- ### Show Detailed Instructions Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Button to toggle the display of detailed instructions for creating an AI application. ```mdx [Show detailed instructions](#create-app-instructions){class="btn-link btn-collapse" data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="create-app-instructions"} ``` -------------------------------- ### Getting Started with SMS and Fax Messaging Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/messaging/index.md Provides links to Quick Start guides for sending SMS messages in various programming languages. These guides help developers quickly set up and send their first SMS. ```Javascript Javascript » ``` ```PHP PHP » ``` ```Python Python » ``` ```Ruby Ruby » ``` ```Java Java » ``` ```C# C# » ``` -------------------------------- ### Quick Start WebSocket Subscription (Ruby) Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/notifications/websockets/quick-start.md A quick start example for setting up a WebSocket subscription using the RingCentral Ruby SDK. Requires editing environment variables with app and user credentials. ```ruby {!> code-samples/websockets/quick-start.rb !} ``` -------------------------------- ### Speech to Text Quick Start Response Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Example JSON response received from RingCentral after processing a speech-to-text request. ```json // Placeholder for quick-start-response.json content ``` -------------------------------- ### Download .env Template Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Link to download the .env template file for configuring application credentials. ```mdx Download our [env-template](https://raw.githubusercontent.com/ringcentral/ringcentral-api-docs/main/code-samples/env-template) and save it as a file named `.env`. ``` -------------------------------- ### Quick Start WebSocket Subscription (Python) Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/notifications/websockets/quick-start.md A quick start example for setting up a WebSocket subscription using the RingCentral Python SDK. Requires filling in the .env file with credentials. ```python {!> code-samples/websockets/quick-start.py !} ``` -------------------------------- ### Quick Start WebSocket Subscription (Java) Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/notifications/websockets/quick-start.md A quick start example for setting up a WebSocket subscription using the RingCentral Java SDK. Requires editing environment variables with app and user credentials. ```java package WebSockets_Notifications; public class WebsSockets_Notifications { public static void main(String[] args) { // TODO Auto-generated method stub } } {!> code-samples/java-samples/src/main/java/com/ringcentral/WebSocketQuickStart.java !} ``` -------------------------------- ### RingCentral JavaScript Quick Start - index.js Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/authentication/quick-start.md The main JavaScript file for the RingCentral authorization quick start, handling server setup and routing. ```javascript {!> code-samples/auth/quick-start/javascript/index.js !} ``` -------------------------------- ### Install RingCentral PHP SDK Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/authentication/quick-start.md Installs the RingCentral PHP SDK and vlucas/phpdotenv using Composer. ```bash curl -sS https://getcomposer.org/installer | php php composer.phar require ringcentral/ringcentral-php vlucas/phpdotenv ``` -------------------------------- ### Create and Start Server App in C# Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Sets up a .NET Core web project, adds Newtonsoft.Json package, modifies Startup.cs, and runs the server. Ensure the applicationUrl in launchSettings.json matches the ngrok tunnel port. ```csharp using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using Newtonsoft.Json; using System.IO; using System.Text; using System.Threading.Tasks; public class Startup { public void ConfigureServices(IServiceCollection services) { } public void Configure(IApplicationBuilder app, IWebHostEnvironment env) { app.UseRouting(); app.UseEndpoints(endpoints => { endpoints.MapPost("/webhook", async context => { using var reader = new StreamReader(context.Request.Body, Encoding.UTF8); var requestBody = await reader.ReadToEndAsync(); var data = JsonConvert.DeserializeObject(requestBody); System.Console.WriteLine($"Received webhook: {data}"); context.Response.StatusCode = 200; }); }); } } ``` ```bash dotnet run ``` -------------------------------- ### Create C# Project and Add SDKs Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Instructions for creating a C# console application project in Visual Studio and adding the necessary RingCentral.Net SDK and DotEnv NuGet packages. ```csharp // Placeholder for Program.cs content ``` -------------------------------- ### RingCentral JavaScript Quick Start - test.ejs Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/authentication/quick-start.md The EJS template for API call test cases and the logout button in the JavaScript quick start example. ```html {!> code-samples/auth/quick-start/javascript/test.ejs !} ``` -------------------------------- ### RingCentral Python Quick Start - test.html Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/authentication/quick-start.md The HTML template for API call test cases and the logout button in the Python quick start example. ```html {!> code-samples/auth/quick-start/python/test.html !} ``` -------------------------------- ### Bash Project Setup Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/notifications/webhooks/quick-start.md Commands to set up a new C# console project for webhook notifications, including adding necessary RingCentral and dotenv packages. ```bash mkdir setup-webhook cd setup-webhook dotnet new console dotnet add package RingCentral.Net -v "6.0.0" dotnet add package dotenv.Net ``` -------------------------------- ### Install RingCentral Python SDK and Flask Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/authentication/quick-start.md Installs the RingCentral Python SDK, python-dotenv, and the Flask framework using pip. ```bash pip install ringcentral pip install python-dotenv pip install flask ``` -------------------------------- ### Quick Start WebSocket Subscription (JavaScript) Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/notifications/websockets/quick-start.md A quick start example for setting up a WebSocket subscription using the RingCentral JavaScript SDK. Requires editing environment variables with app and user credentials. ```javascript {!> code-samples/websockets/quick-start.js !} ``` -------------------------------- ### Install RingCentral JavaScript SDK and Dependencies Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/authentication/quick-start.md Installs the necessary npm packages for the RingCentral JavaScript SDK, dotenv, express, express-session, and ejs. ```bash npm install @ringcentral/sdk --save npm install dotenv --save npm install express --save npm install express-session --save npm install ejs --save ``` -------------------------------- ### Setup WebSocket Notifications (C#) Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/notifications/websockets/quick-start.md Instructions for setting up a C# Console Application for WebSocket notifications. Includes adding RingCentral SDK NuGet packages and editing the Program.cs file. ```csharp {!> code-samples/websockets/quick-start.cs !} ``` -------------------------------- ### PHP Analytics API Quick Start Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/analytics/quick-start.md Installs the RingCentral PHP SDK and vlucas/phpdotenv, then provides a PHP code example for interacting with the Analytics API. Assumes .env file is configured. ```bash curl -sS https://getcomposer.org/installer | php php composer.phar require ringcentral/ringcentral-php vlucas/phpdotenv php analytics.php ``` ```php platform; try { // Authenticate the user $platform->login( $_ENV['RC_USER_USERNAME'], $_ENV['RC_USER_EXTENSION'], $_ENV['RC_USER_PASSWORD'] ); echo 'Successfully logged in.\n'; // Define the API endpoint and parameters for call performance analytics // Example: Get analytics for the last 7 days $endpoint = '/analytics/telephony/v1/call-performance'; $queryParams = [ // Add your desired query parameters here, e.g.: // 'dateFrom' => '2023-10-01', // 'dateTo' => '2023-10-07', // 'groupBy' => 'user' ]; // Make the API request $response = $platform->get($endpoint, $queryParams); $data = $response->json(); echo 'Call Performance Analytics Data:\n'; print_r($data); // Logout the user $platform->logout(); echo 'Successfully logged out.\n'; } catch (Exception $e) { echo 'An error occurred: ' . $e->getMessage() . '\n'; } ``` -------------------------------- ### Quick Start WebSocket Subscription (PHP) Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/notifications/websockets/quick-start.md A quick start example for setting up a WebSocket subscription using the RingCentral PHP SDK. Requires editing environment variables with app and user credentials. ```php {!> code-samples/websockets/quick-start.php !} ``` -------------------------------- ### Get Started with RingCentral Voice API Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/voice/index.md Provides quick start links for developers to begin using the RingCentral Voice API for placing calls. It highlights the RingOut API and offers guides in multiple programming languages. ```Javascript See quick-start.md#Javascript ``` ```PHP See quick-start.md#PHP ``` ```Python See quick-start.md#Python ``` ```Ruby See quick-start.md#Ruby ``` ```Java See quick-start.md#Java ``` ```C# See quick-start.md#C# ``` -------------------------------- ### Clone Video Client SDK Sample Repository Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/mdx_includes/rcv-sdk-quick-start-js.md Clones the Git repository containing the RingCentral Video Client SDK sample applications. ```shell git clone https://github.com/ringcentral/ringcentral-videosdk-js-samples.git ``` -------------------------------- ### Create and Start Server App in Python Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/ai/quick-start.md Creates a server.py file using Flask and starts a Python server. Ensure the PORT is set correctly to match the ngrok tunnel. ```python from flask import Flask, request app = Flask(__name__) @app.route('/webhook', methods=['POST']) def webhook(): print('Received webhook:', request.json) return '', 200 if __name__ == '__main__': app.run(port=3000) ``` ```bash python server.py ``` -------------------------------- ### Create RingCentral App Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/authentication/quick-start.md Provides a direct link to create a RingCentral User Login App with pre-filled parameters for the Authorization Code Flow Quick Start. This simplifies the initial setup for developers. ```html Create User Login App ``` -------------------------------- ### PHP JWT Authentication Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/authentication/jwt/quick-start.md This snippet illustrates JWT authentication using the RingCentral PHP SDK. It requires Composer to install the `ringcentral/ringcentral-php` and `vlucas/phpdotenv` packages. ```bash curl -sS https://getcomposer.org/installer | php php composer.phar require ringcentral/ringcentral-php vlucas/phpdotenv ``` ```php {!> code-samples/auth/jwt.php !} ``` -------------------------------- ### C# Analytics API Quick Start Source: https://github.com/ringcentral/ringcentral-api-docs/blob/main/docs/analytics/quick-start.md Sets up a C# project, adds the RingCentral.Net SDK, and provides a C# code example for the Analytics API. Assumes .env file is configured. ```csharp /* * Quick Start for RingCentral Call Performance Analytics API */ using System; using System.IO; using System.Threading.Tasks; using dotenv.net; using RingCentral; public class AnalyticsQuickStart { public static async Task Main(string[] args) { // Load environment variables from .env file DotEnv.Load(); // Initialize the SDK var rcClient = new SDK( Environment.GetEnvironmentVariable("RC_CLIENT_ID"), Environment.GetEnvironmentVariable("RC_CLIENT_SECRET"), Environment.GetEnvironmentVariable("RC_SERVER_URL") ); var platform = rcClient.Platform; try { // Authenticate the user await platform.Login( Environment.GetEnvironmentVariable("RC_USER_USERNAME"), Environment.GetEnvironmentVariable("RC_USER_EXTENSION"), Environment.GetEnvironmentVariable("RC_USER_PASSWORD") ); Console.WriteLine("Successfully logged in."); // Define the API endpoint and parameters for call performance analytics // Example: Get analytics for the last 7 days var endpoint = "/analytics/telephony/v1/call-performance"; var queryParams = new System.Collections.Generic.Dictionary { // Add your desired query parameters here, e.g.: // {"dateFrom", "2023-10-01"}, // {"dateTo", "2023-10-07"}, // {"groupBy", "user"} }; // Make the API request var response = await platform.Get(endpoint, queryParams); var data = await response.GetContentAsJsonAsync(); Console.WriteLine("Call Performance Analytics Data:"); Console.WriteLine(data); // Logout the user await platform.Logout(); Console.WriteLine("Successfully logged out."); } catch (Exception ex) { Console.WriteLine($"An error occurred: {ex.Message}"); } } } ```