How to connect a guest to a conference directly
In some cases it is necessary to host a conference directly on a website. For example, in telemedicine settings, a patient can communicate with a doctor through a hospital website without installing any third-party software.
The goal is to create a conference for communicating with a healthcare worker so that a user can join this meeting directly on the website.
To check how this feature can be implemented, visit our GitHub.
In this article, you’ll learn how to use TrueConf Server API v3 to implement video communication directly in a browser for telemedicine purposes without authentication on TrueConf Server. This approach simplifies users’ interaction with a doctor.
In the context of telemedicine, the following implementation options are possible:
- Automatically connect a patient with one of available medical workers
- Create a scheduled conference on the website and add an event to the calendar
- Create a chat with a doctor so that this chat can be turned into a video conference.
Below, we will show how to set up direct guest access to a conference. Guests are participants who do not have an account on your video conferencing server. Keep in mind that in this scenario, neither doctors nor patients need an account on the server.
In our example, we will use a guest connection from a browser via WebRTC, since this option can be easily integrated into any website. If necessary, you can also use a connection via a client application.
Preconfiguration of TrueConf Server
-
First, open the control panel, go to the Dashboard → Summary, and check if there is the required number of guest connections in your license. In this case, a patient can be logged in as a guest while the doctor will be authenticated as a user registered on the server.
If you are using TrueConf Server Free, you can create public conferences with one guest connection. If you need to increase the number of guest connections, contact our sales team to purchase this extension or request a free trial for up to 3 weeks.
- Set up an HTTPS connection to work with the API.
Next, you can use various API methods over OAuth 2.0 protocol. Learn more about how to set up interaction with TrueConf Server over this protocol in our article “How to get started with TrueConf API”.
Step 1: Create a public conference
By using the Create Conference method, create a new video conference and set the following required parameters:
“id”: “Conference_ID”– the conference ID which makes it easier to join the meeting;“topic”– the conference name;“type”: 0– conference mode, in our case, “All on screen” mode is selected;“owner”: “user1@server.name”– the owner (if you are adding the doctor as an authenticated user, enter the doctor’s TrueConf ID; (username))“max_participants”: 2– the maximum number of participants – 2;{“type”: -1}– conference schedule – you can select a different value, if necessary. In our case, we will use a virtual room so that the conference can be created on demand at any time;“allow_guests”: true– the parameter which determines whether guests are allowed to join the conference;“allow_only_planned_participants”:false– conference type – public;“state”: “running”– the conference state at the time of creation; in our case, we are creating a conference that starts running immediately.
As a result, the following Conference object will be passed to the request body:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
“id”: “Conference_ID”, "type": 0, "topic": "Conference name", "owner": "user1@server.name", "max_podiums": 2, "max_participants": 2, "schedule": {"type": -1}, "allow_guests": true, "rights": { chat_send: true, chat_rcv: true, slide_show_send: true, slide_show_rcv: true, white_board_send: true, white_board_rcv: true, file_transfer_send: true, file_transfer_rcv: true, desktop_sharing: true, recording: true, audio_send: true, audio_rcv: true, video_send: true, video_rcv: true }, "state": "running", "recording": 1, } |
In response, you’ll get the JSON version of the conference object you’ve created. In this case, the conference ID will be generated automatically if the user did enter a custom ID, e.g., 0987654321.
Please note that if a doctor joins as a guest, you have to use a separate TrueConf Server account with conference owner privileges.
If you need to create a scheduled conference, use the Schedule object. It has to include the following parameters:
- Launch type 1 (one-time event);
- Start time in the Unix timestamp format;
- Session duration (in seconds).
For example, when scheduling a 30-minute consultation for January 1, 2027, at 12:00 PM Moscow Time (GMT+3), we will get the following Schedule object that will be sent in the request body:
|
1 2 3 4 5 |
"schedule":{ "type":1, "start_time":1798794000, "duration":1800 } |
Step 2: Generate links to connect guests automatically
You can now create and provide a patient with a link to automatically join a video consultation. In this case, you can get names, e.g., from the patient’s profile on the website of the medical service provider.
- Get authorization data using the GET method Software_Clients – Get Client List.
call_id: 0987654321— the ID of the created conferencecase: join_conference_button– the generation of direct links needed for joining the conference from client applications.user: 2$Ian Taylor*Ian Taylor– The guest’s name displayed during the conference. The $ symbol is required. There are two ways to authenticate a guest when connecting via TrueConf API:2$Ian Taylor*Ian Taylor– the 2$ parameter allows you to manually specify the guest’s TrueConf ID. This option is helpful because you don’t need to retrieve the ID from the server after connecting to a conference. However, if there are multiple users named Ian Taylor, you’ll need to ensure the ID is unique, for example by using suffixes or hashes.$Ian Taylor– a parameter for which a unique ID is automatically generated and returned in the response to the request.- To embed the conference window in your website, find the section with the property
“name”: “TrueConf Web”in the JSON response. Copy theiframetag from it. Before pasting, replace//with/in the frame URL. Below is an example of a response with theiframefragment highlighted:
And specify the following parameters:
In our example, the query will look like this:
|
1 |
https://video.company.com/api/v3.3/software/clients?call_id=0987654321&case=join_conference_button&user=2$Ian Taylor*Ian Taylor |
|
1 2 3 4 5 6 7 8 9 10 |
{ "name": "TrueConf Web", "type": "web", "platform": "webrtc", "download_url": "", "download_urls": null, "market_url": "", "web_url": "https://video.company.com/webrtc/0987654321#login=*guest*%D0%98%D0%B2%D0%B0%D0%BD%20%D0%98%D0%B2%D0%B0%D0%BD%D0%BE%D0%B2&token=$29cc834f607b1bffd0d5e68e47b4ead16*1619898725*641aad7d9e1e1a674416e16813939633&lang=auto", "iframe": "<iframe src=\"https://video.company.com/webrtc/0987654321#login=*guest*%D0%98%D0%B2%D0%B0%D0%BD%20%D0%98%D0%B2%D0%B0%D0%BD%D0%BE%D0%B2&token=$29cc834f607b1bffd0d5e68e47b4ead16*1619898725*641aad7d9e1e1a674416e16813939633&lang=auto\" allowfullscreen=\"allowfullscreen\" allow=\"microphone; camera; autoplay; display-capture\" ><\\iframe>" } |
Alternative connection options:
- The value of the web_url parameter is a link used to automatically connect a participant to an online consultation from a browser.
- The JSON file also includes the “deeplinks” object with links that are needed for joining the meeting from client applications. The “default” link can be used for joining either from TrueConf desktop applications (Windows, Linux, macOS) or from TrueConf for iOS/iPadOS. The “android” link will be used by TrueConf for Android/Android TV.
- It is also necessary to replace double slashes with single slashes; so the links will look in this way:
|
1 2 3 4 |
"deeplinks": { "default": "trueconf:\\c\\5016799639@video.company.com%23vcs&h=172.18.246.126,172.17.0.1&force=1&templogin=1&login=*guest*%D0%98%D0%B2%D0%B0%D0%BD%20%D0%A1%D1%82%D0%B5%D0%BF%D0%B0%D0%BD&password=$291bcfe8bfc567822b4ff133c1b668fb7*1671525797*377ee8856b0404911fdeed524854d198&encrypt=0&autoclose=1", "android": "intent:\\c\\5016799639%40video.company.com%23vcs%26h%3d172.18.246.126,172.17.0.1%26force%3d1%26templogin%3d1%26login%3d*guest*%D0%98%D0%B2%D0%B0%D0%BD%20%D0%A1%D1%82%D0%B5%D0%BF%D0%B0%D0%BD%26password%3d$291bcfe8bfc567822b4ff133c1b668fb7*1671525797*377ee8856b0404911fdeed524854d198%26encrypt%3d0%26autoclose%3d1#Intent;scheme=trueconf;package=com.trueconf.videochat;end" } |
|
1 |
trueconf:\c\[ConferenceID]@[server_address]%23vcs&h=[server_address]&force=1&templogin=1&login=*guest*[guest_login]&password=$[password]&encrypt=0&autoclose=1 |
If the TrueConf client application is installed on a user’s device, it will be launched automatically when the link is clicked, and a user will join the meeting.
Please note that all links generated by this request are temporary, and for security reasons, they expire after 1 minute. Therefore, you must connect immediately after they are generated; for example, you can generate them directly when you click the “Join” button that you add to your website.
Step 3: Join a conference call
When you get the iframe element, all that remains is to start the conference and join it. To start the conference, use the Run Conference API request and include the conference ID in it.
https://server.name/api/v3.11/{conference_id}/run
As soon as the conference has started, users will be able to join this meeting either via the iframe link they received or via a direct link.
Features for managing scheduled conferences
If you choose to create scheduled conferences, you can add them to the patient’s and doctor’s personal calendars so that participants don’t miss the video consultation. To do it, provide both participants with calendar event integration links by retrieving them via the GET Conference Calendars request. In response, you will receive a JSON object containing links that are needed for adding events to Google and Outlook calendars. Additionally, you will receive an ics file for other services.
When it’s time for a video consultation to start, a conference will start automatically and the doctor will receive a corresponding call. The patient will need to follow the link added to the calendar and will immediately join an event under his/her name.
To check your event, you can follow this link in your browser. If previously you did not enable access to audio and video devices, then you’ll see the microphone and camera setup window before connecting to the conference.
Note!
This method works correctly only when a guest joins a scheduled conference after it has started, as only the owner can join the meeting before it starts.







