Start recording a meeting
Starts recording a meeting. The meeting can be started by an App admin directly, or a participant with permissions to start a recording, based on the type of authorization used.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Accepted Permissions (at least one required)
Parameters
By default, a meeting allows only one recording to run at a time. Enabling the allow_multiple_recordings parameter to true allows you to initiate multiple recordings concurrently in the same meeting. This allows you to record separate videos of the same meeting with different configurations, such as portrait mode or landscape mode.
Start recording a meeting
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
response = client.realtime_kit.recordings.start_recordings(
app_id="14a396e7-ca44-4937-bf1f-050a69118543",
account_id="023e105f4ecef8ad9ca31a8372d0c353",
meeting_id="97440c6a-140b-40a9-9499-b23fd7a3868a",
allow_multiple_recordings=False,
audio_config={
"channel": "stereo",
"codec": "AAC",
"export_file": True,
},
file_name_prefix="string",
interactive_config={
"type": "ID3"
},
max_seconds=60,
realtimekit_bucket_config={
"enabled": True
},
video_config={
"codec": "H264",
"export_file": True,
"height": 720,
"watermark": {
"position": "left top",
"size": {
"height": 1,
"width": 1,
},
"url": "http://example.com",
},
"width": 1280,
},
)
print(response.success){
"success": true,
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"audio_download_url": "https://example.com",
"download_url": "https://example.com",
"download_url_expiry": "2019-12-27T18:11:19.117Z",
"file_size": 0,
"invoked_time": "2019-12-27T18:11:19.117Z",
"output_file_name": "output_file_name",
"session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"started_time": "2019-12-27T18:11:19.117Z",
"status": "INVOKED",
"stopped_time": "2019-12-27T18:11:19.117Z",
"recording_duration": 0,
"start_reason": {
"caller": {
"name": "RealtimeKit_test",
"type": "ORGANIZATION",
"user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec"
},
"reason": "API_CALL"
},
"stop_reason": {
"caller": {
"name": "RealtimeKit_test",
"type": "ORGANIZATION",
"user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec"
},
"reason": "API_CALL"
},
"storage_config": {
"auth_method": "KEY",
"bucket": "bucket",
"host": "host",
"path": "path",
"port": 0,
"region": "us-east-1",
"type": "gcs",
"username": "username"
}
}
}Returns Examples
{
"success": true,
"data": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"audio_download_url": "https://example.com",
"download_url": "https://example.com",
"download_url_expiry": "2019-12-27T18:11:19.117Z",
"file_size": 0,
"invoked_time": "2019-12-27T18:11:19.117Z",
"output_file_name": "output_file_name",
"session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"started_time": "2019-12-27T18:11:19.117Z",
"status": "INVOKED",
"stopped_time": "2019-12-27T18:11:19.117Z",
"recording_duration": 0,
"start_reason": {
"caller": {
"name": "RealtimeKit_test",
"type": "ORGANIZATION",
"user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec"
},
"reason": "API_CALL"
},
"stop_reason": {
"caller": {
"name": "RealtimeKit_test",
"type": "ORGANIZATION",
"user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec"
},
"reason": "API_CALL"
},
"storage_config": {
"auth_method": "KEY",
"bucket": "bucket",
"host": "host",
"path": "path",
"port": 0,
"region": "us-east-1",
"type": "gcs",
"username": "username"
}
}
}