How to Use TrueConf API to Make Video Calls from the Website

Elizaveta Nesova
June 21, 2019
Elizaveta Nesova
Categories: Knowledge Base

With TrueConf Server API, you can create a click-to-call widget to make instant video calls from your website.

This widget allows your website guests to call their managers for a personal video consultation at any time. They don’t need to fill out any contact forms — just type in the name.

Adding the widget to your website is easy. Install TrueConf Server to get started

You won’t spend more than 15 minutes setting up the server.

How to Interact with API

The server API is accessed via OAuth 2.0. For more information, please refer to TrueConf Server documentation.

TrueConf Server API is accessed through HTTP requests sent to the server.

The server sends back replies as JSON objects.

A list of TrueConf Server API-based functions can be found below:

API v3 Documentation

How to Add the Widget

Step 1: Make a video call to TrueConf Server through API requests. For this purpose, you should create a conference with two participants (one of them is your website manager).

Step 2: Get HTML code of your widget in TrueConf Server control panel.

Step 3: Add the widget to your website.

How to use API

TrueConf Server Setup

  1. Configure the server to support HTTPS connections
  2. Add your website manager as a server user to let them receive video calls from guests.
  3. Get the secret API access key in Web → Security in the server control panel.

Let’s get started!

How to Use TrueConf API

  1. Create a conference by using Conferences method and set the following parameters:
  • "schedule":{"type":"-1"}without schedules.
  • "max_participants": 2 for 2 participants.
  • "auto_invite": 1 automatic invitation for participants at startup.

Appoint your website manager as the conference owner and indicate their TrueConf Server username, e.g. "owner":"george".

The following examples of TrueConf Server API requests are intended to be used with cURL

If the conference has been successfully created, the server sends back a reply with the conference data.

Saveid and url parameters of your conference page.

  1. Add your website manager as a participant of the conference you have created (previously you have appointed them as the conference owner) by using  Conferences_Invitations method. In $conference_id, indicate id given in the previous paragraph.

In response, the server sends back the object that contains data on the participant you have added.

Well done!

You can make a test call through TrueConf Server API on our website.

Add the Widget to the Website

Use HTML code template of your widget which is available in TrueConf Server control panel as shown in our article. Add url from the object with conference data you have previously received to src parameter.

Once your website guest joins the conference via the widget, TrueConf Server automatically sends an invitation to the website manager (auto_invite parameter).

Happy video conferencing!

Still have questions? Please contact our support team directly via online chat.

Sign up for newsletter