Skip to main content
Version: /v2

Start Track Recording - API

This API lets you record a track of participant of your room by passing roomId, participantId and kind as body parameters.

HTTP method and endpoint

POST

|

https://api.videosdk.live/v2/recordings/participant/track/start
Headers Parameters

values : YOUR_TOKEN_WITHOUT_ANY_PREFIX

This will be a JWT token generate using VideoSDK ApiKey and Secret.

Note that the token will not include any prefix such as "Basic " or "Bearer ". Just pass a token as value.

You can generate a new token by refering this Guide: Generate Auth token

REQUIRED

values : application/json

This is usefull for json body parameters, so that VideoSDK servers can understand that the incoming body parameter will be a JSON string.

Body Parameters
REQUIRED
The ID of the Room.
The ID of the Participant.
REQUIRED

The kind of the Track.

- kind: "audio" | "video" | "screen_audio" | "screen_video"

OPTIONAL
  • fileFormat:
    • values: "webm"
    • default: "webm"
OPTIONAL
Webhook URL
Your Cloud Storage Bucket Path.
POST
|
https://api.videosdk.live/v2/recordings/participant/track/start
import fetch from 'node-fetch';
const options = {
method: "POST",
headers: {
"Authorization": "$YOUR_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({
"roomId" : "abcd-efgh-ijkl",
"participantId" : "abcd",
"kind" : "audio",
"fileFormat" : "webm",
"webhookUrl" : "https://www.example.com/",
"bucketDirPath" : "s3path"
}),
};
const url= `https://api.videosdk.live/v2/recordings/participant/track/start`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
RESPONSE
"track recording started successfully."

Got a Question? Ask us on discord