Skip to main content
Version: /v2

Fetch Participant Quality Stats - API

This API lets you fetch the quality statistics of the session using the sessionId.

HTTP method and endpoint

GET

|

https://api.videosdk.live/v2/sessions/${sessionId}/participant/${participantId}/stats
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

Parameters
REQUIRED
This is ID of the session you want to fetch quality statistics for.
This is ID of the participant for which you want to fetch quality statistics.
GET
|
https://api.videosdk.live/v2/sessions/${sessionId}/participant/${participantId}/stats
import fetch from 'node-fetch';
const options = {
method: "GET",
headers: {
"Authorization": "$YOUR_TOKEN",
"Content-Type": "application/json",
},
};
const sessionId = "your_sessionId";
const url= `https://api.videosdk.live/v2/sessions/${sessionId}/participant/${participantId}/stats`;
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
RESPONSE
{
"sessionId": "62d13ccea0f6ac85649d7931",
"meetingId": "61bw-723k-p4mp",
"participantId": "fj9jxhtw",
"participantName": "rajan",
"deviceInfo": {
"deviceName": "Chrome",
"deviceVersion": "102.0.0.0"
},
"sdkInfo": {
"sdkName": "prebuilt",
"sdkVersion": "0.3.10"
},
"location": {
"country": "unknown",
"city": "unknown",
"region": "unknown"
},
"network": {
"asn": "unknown",
"org": "unknown"
},
"stats": [
{
"time": "2022-07-15T10:10:18.601Z",
"recvAudioPacketLost": 0,
"recvVideoPacketLost": 0,
"sendAudioPacketLost": 0,
"sendVideoPacketLost": 0,
"averageAudioRtt": 0.8544921875,
"averageVideoRtt": 0.244140625,
"averageAudioJitter": 0,
"averageVideoJitter": 2,
"averageSendAudioBitrate": 60218,
"averageSendVideoBitrate": 103900,
"averageRecvAudioBitrate": 60054,
"averageRecvVideoBitrate": 307229,
"qualityScore": {
"audio": 4.42,
"video": 3.46
}
}
],
"resolutionUsage": [
{
"180": 0,
"360": 1,
"720": 0,
"1080": 0,
"1440": 0,
"2160": 0,
"time": "2022-07-15T10:10:18.848Z"
}
]
}

Got a Question? Ask us on discord