By using TrueConf Server API requests, you can manage the whole recording process and even start recording of ongoing conferences. This feature is convenient if you’ve disabled automatic recording for all events on TrueConf Server and forgotten to enable it for the conference you’re creating, or if you want to manage recording on the fly, e.g., save only one speaker’s video feed in a virtual meeting.
Table of Contents
Getting started
Read our article Getting Started with TrueConf API to learn how to use TrueConf Server API and what steps you need to take. You will also need to create a conference in any convenient way: in the client application, in the TrueConf Server control panel or via API.
Step 1: Starting a conference
You can only record an ongoing event; therefore, you need to start your conference using a Run Conference POST request. Make sure that it’s started successfully by making a Get Conference GET request:
1 |
https://{{$server_name}}/api/v3.3/conferences/{{$conference_id}}?access_token={{$access_token}} |
where:
{{$server_name}}
– is an IP address or external address of your TrueConf Server control panel from the Web → Settings section, e.g.,server.company.name
.{{$access_token}}
– is an access token created as shown in the article on how to get started with API, e.g., example,dvN1tpoy7BmVhN8nUMzXcqJ8vsDYt4IN
.{{$conference_id}}
– is your conference ID, e.g.,0007
.
Our case:
1 |
https://server.company.name/api/v3.3/conferences/0007?access_token=dvN1tpoy7BmVhN8nUMzXcqJ8vsDYt4IN |
In the conference’s JSON object you’ve received as the response, you need to pay attention to the "state"
parameter. It can have one of the following values:
"running"
means an ongoing conference."stopped"
means a stopped conference.
Eventually, you should get the following value: "state": "running"
.
Step 2: Start recording
To start or resume recording, you need to use a Conference Record Start POST request:
1 |
https://{{$server_name}}/api/v3.3/conferences/{{$conference_id}}/start-record?access_token={{$access_token}} |
Here’s the case for a conference with the ID 0007:
1 |
https://server.company.name/api/v3.3/conferences/0007/start-record?access_token=dvN1tpoy7BmVhN8nUMzXcqJ8vsDYt4IN |
Step 3: Checking the recording status
To check the recording status, you need to get a Conference object again by its ID using a Get Conference GET request.
In the JSON object you’ve received as the response, you need to pay attention to the "stream_recording_state"
parameter. It can have one of the following values:
- 0 — No recording
- 1 — Recording
- 2 — Recording paused
Eventually, you should get the following value: "stream_recording_state": 1
.
Step 4: Pausing the recording
To pause the recording for a while, you need to use a Conference Record Pause POST request:
1 |
https://{{$server_name}}/api/v3.3/conferences/{{$conference_id}}/pause-record?access_token={{$access_token}} |
For instance:
1 |
https://server.company.name/api/v3.3/conferences/0007/pause-record?access_token=dvN1tpoy7BmVhN8nUMzXcqJ8vsDYt4IN |
You can pause and resume recording as in Steps 2 and 4 as many times as you want. Once you’ve resumed the recording process, the system uses an existing video file rather than creates a new one.
Step 5: Stop the recording
Stop recording using a Conference Record Stop POST request:
1 |
https://{{$server_name}}/api/v3.3/conferences/{{$conference_id}}/stop-record?access_token={{$access_token}} |
In this case:
1 |
https://video.trueconf.com/api/v3.3/conferences/0007/stop-record?access_token=dvN1tpoy7BmVhN8nUMzXcqJ8vsDYt4IN |
The recording process will stop automatically when your conference comes to an end.