RingCentral Video REST API Quick Start
RingCentral Video REST API and Client SDKs are in beta
The RingCentral Video REST API and Client SDKs are currently in beta. Developers should be aware of the following:
- Their feature sets are not reflective of the full scope currently planned.
- Backwards compatibility is not guaranteed from one release to the next during the beta period. Changes can be introduced at any time that may impact your applications with little notice.
Calling the RingCentral API for the first time? We recommend you try out getting started experience.
In this quick start, we are going to help you create your first meeting on the platform in just a few minutes. Let's get started.
Create an app
The first thing we need to do is create an app in the RingCentral Developer Portal. This can be done quickly by clicking the "Create Video App" button below. Just click the button, enter a name and description if you choose, and click the "Create" button. If you do not yet have a RingCentral account, you will be prompted to create one.
Create Video App Show detailed instructions
- Login or create an account if you have not done so already.
- Go to Console/Apps and click 'Create App' button.
- Select "REST API App" under "What type of app are you creating?" Click "Next."
- Under "Authentication" select "JWT auth flow."
- Under "Security" select "This app is private and will only be callable using credentials from the same RingCentral account."
When you are done, you will be taken to the app's dashboard. Make note of the Client ID and Client Secret. We will be using those momentarily.
Request help from support
Access to the RingCentral Video API currently requires help from support in order to grant the "Video" application scope to your application, and graduate it to production.
Download and edit a .env
file
Follow the instructions found in our guide to running Developer Guide code samples. Or:
- Download our env-template and save it as a file named
.env
. - Edit your newly downloaded
.env
file, setting its variables with the proper values for the app you created above, paying close attention to the following:RC_CLIENT_ID
- set to the Client ID of the app you created aboveRC_CLIENT_SECRET
- set to the Client Secret of the app you created aboveRC_JWT
- set to the JWT credential you created for yourself
Create a meeting bridge
Install RingCentral Node.js SDK
$ npm install @ringcentral/sdk
Create and edit meetings.js
Create a file called meetings.js
. Be sure to edit the variables in ALL CAPS with your app and user credentials.
const RC = require('@ringcentral/sdk').SDK
require('dotenv').config();
var rcsdk = new RC({
'server': process.env.RC_SERVER_URL,
'clientId': process.env.RC_CLIENT_ID,
'clientSecret': process.env.RC_CLIENT_SECRET
});
var platform = rcsdk.platform();
platform.login({ 'jwt': process.env.RC_JWT })
platform.on(platform.events.loginSuccess, () => {
create_meeting()
})
async function create_meeting() {
try {
var resp = await platform.post("/rcvideo/v2/account/~/extension/~/bridges", {
name: "Test Meeting",
allowJoinBeforeHost: true,
muteAudio: false,
muteVideo: true
})
var json = await resp.json()
console.log("Start Your Meeting: " + json.discovery.web)
} catch (e) {
console.log(e.message)
}
}
Run Your Code
You are almost done. Now run your script.
$ node meetings.js
Install RingCentral Python SDK (Python version 3.x recommended)
$ pip install ringcentral
Create and edit meetings.py
Create a file called meetings.py
. Be sure to edit the variables in ALL CAPS with your app and user credentials.
#!/usr/bin/python
# You get the environment parameters from your
# application dashbord in your developer account
# https://developers.ringcentral.com
import os
import sys
from dotenv import load_dotenv
from ringcentral import SDK
load_dotenv()
rcsdk = SDK( os.environ.get('RC_CLIENT_ID'),
os.environ.get('RC_CLIENT_SECRET'),
os.environ.get('RC_SERVER_URL') )
platform = rcsdk.platform()
try:
platform.login( jwt=os.environ.get('RC_JWT') )
except Exception as e:
sys.exit("Unable to authenticate to platform: " + str(e))
params = {
'name': 'Test Meeting'
}
try:
resp = platform.post('/rcvideo/v2/account/~/extension/~/bridges', params)
print("Start your meeting: " + resp.web.discovery)
except Exception as err:
print("Exception: " + err.message)
Run Your Code
You are almost done. Now run your script.
$ python meetings.py
Install RingCentral PHP SDK
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar require ringcentral/ringcentral-php
Create and edit meetings.php
Create a file called meetings.php
. Be sure to edit the variables in ALL CAPS with your app and user credentials.
<?php
/* You get the environment parameters from your
application dashbord in your developer account
https://developers.ringcentral.com */
require('vendor/autoload.php');
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__ . '/../');
$dotenv->load();
$rcsdk = new RingCentral\SDK\SDK( $_ENV['RC_CLIENT_ID'],
$_ENV['RC_CLIENT_SECRET'],
$_ENV['RC_SERVER_URL'] );
$platform = $rcsdk->platform();
$platform->login( [ "jwt" => $_ENV['RC_JWT'] ] );
$params = array(
'name' => 'Test Meeting'
);
try {
$resp = $platform->post('/rcvideo/v2/account/~/extension/~/bridges', $params);
print_r ('Start Your Meeting: ' . $resp->json()->web->discovery . "\n");
} catch (Exception $e) {
print_r ("An error occurred: " . $e->getMessage() . "\n");
}
Run Your Code
You are almost done. Now run your script.
$ php meetings.php
Install RingCentral Ruby SDK
$ gem install ringcentral-sdk
Create and edit meetings.rb
Create a file called meetings.rb
. Be sure to edit the variables in ALL CAPS with your app and user credentials.
#!usr/bin/ruby
# You get the environment parameters from your
# application dashbord in your developer account
# https://developers.ringcentral.com
require 'ringcentral'
require 'dotenv/load'
$rc = RingCentral.new(ENV['RC_CLIENT_ID'],
ENV['RC_CLIENRT_SECRET'],
ENV['RC_SERVER_URL'])
$rc.authorize(jwt: ENV['RC_JWT'])
resp = rc.post('/rcvideo/v2/account/~/extension/~/bridges', payload: {
'name': 'Test Meeting'
})
puts "Start your meeting: " + resp.body['discovery']['web']
Run Your Code
You are almost done. Now run your script.
$ ruby meetings.rb
C# and .NET SDKs are not currently available
If you are looking to call RingCentral Video APIs using Java or C#, RingCentral Video APIs can't be invoked using RingCentral's Java or C# SDK at the moment. You can however call the APIs directly from those programming lanugaes using a REST based helper library if needed.
A Java SDK is not currently available
If you are looking to call RingCentral Video APIs using Java or C#, RingCentral Video APIs can't be invoked using RingCentral's Java or C# SDK at the moment. You can however call the APIs directly from those programming lanugaes using a REST based helper library if needed.
Need help?
Having difficulty? Feeling frustrated? Receiving an error you don't understand? Our community is here to help and may already have found an answer. Search our community forums, and if you don't find an answer please ask!
What's next?
When you have successfully made your first API call, it is time to take your next step towards building a more robust RingCentral application. Have a look at our private sample (please provide us your GitHub username to allow access to this repo) Node.JS application for reference purpose.