Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Video Log Analyzer API


(warning)

Warning

This documentation is for reference only. We are no longer onboarding new customers to Programmable Video. Existing customers can continue to use the product until December 5, 2026(link takes you to an external page).

We recommend migrating your application to the API provided by our preferred video partner, Zoom. We've prepared this migration guide(link takes you to an external page) to assist you in minimizing any service disruption.

The Video Log Analyzer REST API provides access to data generated by Programmable Video rooms and participants. Video Logs are available for two days for WebRTC Go rooms, and seven days for all other room types. Summarization and propagation of data may take up to thirty minutes following the end of a room, but most logs are available within ten minutes.


Base URL

base-url page anchor

Video Log Analyzer data is available under the following base URL. The REST API is served over HTTPS; unencrypted HTTP is not supported.


_10
https://insights.twilio.com/v1/Video/Rooms


HTTP requests to the REST API are protected with HTTP Basic authentication(link takes you to an external page). You will use your Twilio account SID as the username and your auth token as the password for HTTP Basic authentication. You can find your account SID and auth token on the console home page. To learn more about how Twilio handles authentication, please refer to our security documentation.


The Rooms list provides a queryable list of Programmable Video Rooms. By default only Rooms completed in the last 24 hours are listed. Use the CreatedBefore and CreatedAfter parameters to query a larger date range.


_10
GET https://insights.twilio.com/v1/Video/Rooms

Get Rooms List

get-rooms-list-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_16
// Download the helper library from https://www.twilio.com/docs/node/install
_16
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_16
_16
// Find your Account SID and Auth Token at twilio.com/console
_16
// and set the environment variables. See http://twil.io/secure
_16
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_16
const authToken = process.env.TWILIO_AUTH_TOKEN;
_16
const client = twilio(accountSid, authToken);
_16
_16
async function listVideoRoomSummary() {
_16
const rooms = await client.insights.v1.rooms.list({ limit: 20 });
_16
_16
rooms.forEach((r) => console.log(r.accountSid));
_16
}
_16
_16
listVideoRoomSummary();

Output

_45
{
_45
"meta": {
_45
"first_page_url": "https://insights.twilio.com/v1/Video/Rooms?PageSize=50&Page=0",
_45
"url": "https://insights.twilio.com/v1/Video/Rooms?PageSize=50&Page=0",
_45
"page_size": 50,
_45
"next_page_url": null,
_45
"key": "rooms",
_45
"page": 0,
_45
"previous_page_url": null
_45
},
_45
"rooms": [
_45
{
_45
"room_type": "go",
_45
"unique_participant_identities": 0,
_45
"codecs": [
_45
"VP8"
_45
],
_45
"max_participants": 0,
_45
"room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_45
"create_time": "2015-07-30T20:00:00Z",
_45
"end_reason": "room_ended_via_api",
_45
"duration_sec": 50000000,
_45
"room_status": "in_progress",
_45
"media_region": "us1",
_45
"recording_enabled": false,
_45
"edge_location": "ashburn",
_45
"max_concurrent_participants": 0,
_45
"unique_participants": 0,
_45
"room_name": "room_name",
_45
"created_method": "sdk",
_45
"total_participant_duration_sec": 50000000,
_45
"status_callback_method": "GET",
_45
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_45
"end_time": "2015-07-30T20:00:00Z",
_45
"total_recording_duration_sec": 50000000,
_45
"processing_state": "complete",
_45
"concurrent_participants": 0,
_45
"status_callback": "http://www.example.com",
_45
"url": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_45
"links": {
_45
"participants": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants"
_45
}
_45
}
_45
]
_45
}

Query parameters

query-parameters page anchor
Property nameTypeRequiredPIIDescription
RoomTypearray[enum<string>]Optional
Not PII

Type of room. Can be go, peer_to_peer, group, or group_small.

Possible values:
gopeer_to_peergroupgroup_small

Codecarray[enum<string>]Optional

Codecs used by participants in the room. Can be VP8, H264, or VP9.

Possible values:
VP8H264VP9

RoomNamestringOptional

Room friendly name.


CreatedAfterstring<date-time>Optional

Only read rooms that started on or after this ISO 8601 timestamp.


CreatedBeforestring<date-time>Optional

Only read rooms that started before this ISO 8601 timestamp.


PageSizeintegerOptional

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

PageintegerOptional

The page index. This value is simply for client state.

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.


Get Video Log Analyzer Data for a Room

get-video-log-analyzer-data-for-a-room page anchor

The Room resource returns the Video Log Analyzer data for the provided room SID.


_10
GET https://insights.twilio.com/v1/Video/Rooms/{Room_SID}

Get Video Log Analyzer Data for a Room

get-video-log-analyzer-data-for-a-room-1 page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function fetchVideoRoomSummary() {
_18
const room = await client.insights.v1
_18
.rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_18
.fetch();
_18
_18
console.log(room.accountSid);
_18
}
_18
_18
fetchVideoRoomSummary();

Output

_32
{
_32
"room_type": "go",
_32
"unique_participant_identities": 0,
_32
"codecs": [
_32
"VP8"
_32
],
_32
"max_participants": 0,
_32
"room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_32
"create_time": "2015-07-30T20:00:00Z",
_32
"end_reason": "room_ended_via_api",
_32
"duration_sec": 50000000,
_32
"room_status": "in_progress",
_32
"media_region": "us1",
_32
"recording_enabled": false,
_32
"edge_location": "ashburn",
_32
"max_concurrent_participants": 0,
_32
"unique_participants": 0,
_32
"room_name": "room_name",
_32
"created_method": "sdk",
_32
"total_participant_duration_sec": 50000000,
_32
"status_callback_method": "GET",
_32
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"end_time": "2015-07-30T20:00:00Z",
_32
"total_recording_duration_sec": 50000000,
_32
"processing_state": "complete",
_32
"concurrent_participants": 0,
_32
"status_callback": "http://www.example.com",
_32
"url": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"links": {
_32
"participants": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants"
_32
}
_32
}

Property nameTypeRequiredPIIDescription
RoomSidstringrequired

The SID of the Room resource.

Room Summary Resource Properties

room-summary-resource-properties page anchor

A Room Summary log is represented by the following properties:

Property nameTypePIIDescription
account_sidSID<AC>

Account SID associated with this room.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

room_sidSID<RM>

Unique identifier for the room.

Pattern: ^RM[0-9a-fA-F]{32}$Min length: 34Max length: 34

room_namestring

Room friendly name.


create_timestring<date-time>

Creation time of the room.


end_timestring<date-time>

End time for the room.


room_typeenum<string>

Type of room. Can be go, peer_to_peer, group, or group_small.

Possible values:
gopeer_to_peergroupgroup_small

room_statusenum<string>

Status of the room. Can be in_progress or completed.

Possible values:
in_progresscompleted

status_callbackstring<uri>

Webhook provided for status callbacks.


status_callback_methodenum<http-method>

HTTP method provided for status callback URL.

Possible values:
GETPOST

created_methodenum<string>

How the room was created. Can be sdk, ad_hoc, or api.

Possible values:
sdkad_hocapi

end_reasonenum<string>

Reason the room ended. Can be room_ended_via_api or timeout.

Possible values:
room_ended_via_apitimeout

max_participantsinteger

Max number of total participants allowed by the application settings.


unique_participantsinteger

Number of participants. May include duplicate identities for participants who left and rejoined.


unique_participant_identitiesinteger

Unique number of participant identities.


concurrent_participantsinteger

Actual number of concurrent participants.


max_concurrent_participantsinteger

Maximum number of participants allowed in the room at the same time allowed by the application settings.


codecsarray[enum<string>]

Codecs used by participants in the room. Can be VP8, H264, or VP9.

Possible values:
VP8H264VP9

media_regionenum<string>

Region of Twilio media servers for the room. See the list of possible media servers here.

Possible values:
us1us2au1br1ie1jp1sg1in1de1gll

duration_secinteger<int64>

Total room duration from create time to end time.


total_participant_duration_secinteger<int64>

Combined amount of participant time in the room.


total_recording_duration_secinteger<int64>

Combined amount of recorded seconds for participants in the room.


processing_stateenum<string>

Video Log Analyzer resource state. Will be either in-progress or complete. in-progress indicates that more details may be appended to the resource. complete indicates no further information will be added.

Possible values:
completein_progress

recording_enabledboolean

Boolean indicating if recording is enabled for the room.


edge_locationenum<string>

Edge location of Twilio media servers for the room. See the list of public edge locations for the possible values.

Possible values:
ashburndublinfrankfurtsingaporesydneysao_pauloroamingumatillatokyo

urlstring<uri>

URL for the room resource.


linksobject<uri-map>

Room subresources.


The Participants list returns the participant details for a provided room SID.


_10
GET https://insights.twilio.com/v1/Video/Rooms/{Room_SID}/Participants

Get List of Room Participants

get-list-of-room-participants page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function listVideoParticipantSummary() {
_18
const participants = await client.insights.v1
_18
.rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_18
.participants.list({ limit: 20 });
_18
_18
participants.forEach((p) => console.log(p.participantSid));
_18
}
_18
_18
listVideoParticipantSummary();

Output

_34
{
_34
"meta": {
_34
"url": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants?PageSize=50&Page=0",
_34
"key": "participants",
_34
"first_page_url": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants?PageSize=50&Page=0",
_34
"page_size": 50,
_34
"next_page_url": null,
_34
"page": 0,
_34
"previous_page_url": null
_34
},
_34
"participants": [
_34
{
_34
"publisher_info": {},
_34
"edge_location": "ashburn",
_34
"join_time": "2015-07-30T20:00:00Z",
_34
"leave_time": "2015-07-30T20:00:00Z",
_34
"end_reason": "disconnected_via_api",
_34
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_34
"error_code": 53205,
_34
"media_region": "us1",
_34
"properties": {},
_34
"room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_34
"error_code_url": "error_code_url",
_34
"participant_sid": "PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_34
"codecs": [
_34
"VP8"
_34
],
_34
"status": "in_progress",
_34
"duration_sec": 50000000,
_34
"participant_identity": "participant_identity",
_34
"url": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_34
}
_34
]
_34
}

Property nameTypeRequiredPIIDescription
RoomSidstringrequired

The SID of the Room resource.

Property nameTypeRequiredPIIDescription
PageSizeintegerOptional

How many resources to return in each list page. The default is 50, and the maximum is 1000.

Minimum: 1Maximum: 1000

PageintegerOptional

The page index. This value is simply for client state.

Minimum: 0

PageTokenstringOptional

The page token. This is provided by the API.


Get Video Log Analyzer data for a Room Participant

get-video-log-analyzer-data-for-a-room-participant page anchor

The Participant resource returns the Video Log Analyzer details for a provided room participant SID.


_10
GET https://insights.twilio.com/v1/Video/Rooms/{Room_SID}/Participants/{Partcipant_SID}

Get a Participant's Details

get-a-participants-details page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
async function fetchVideoParticipantSummary() {
_19
const participant = await client.insights.v1
_19
.rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_19
.participants("PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
_19
.fetch();
_19
_19
console.log(participant.participantSid);
_19
}
_19
_19
fetchVideoParticipantSummary();

Output

_21
{
_21
"publisher_info": {},
_21
"edge_location": "ashburn",
_21
"join_time": "2015-07-30T20:00:00Z",
_21
"leave_time": "2015-07-30T20:00:00Z",
_21
"end_reason": "disconnected_via_api",
_21
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_21
"error_code": 0,
_21
"media_region": "us1",
_21
"properties": {},
_21
"room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_21
"error_code_url": "error_code_url",
_21
"participant_sid": "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_21
"codecs": [
_21
"VP8"
_21
],
_21
"status": "in_progress",
_21
"duration_sec": 50000000,
_21
"participant_identity": "participant_identity",
_21
"url": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_21
}

Property nameTypeRequiredPIIDescription
RoomSidstringrequired

The SID of the Room resource.


ParticipantSidstringrequired

The SID of the Participant resource.

Participant Summary Resource Properties

participant-summary-resource-properties page anchor

A participant summary is represented by the following properties:

Property nameTypePIIDescription
participant_sidSID<PA>

Unique identifier for the participant.

Pattern: ^PA[0-9a-fA-F]{32}$Min length: 34Max length: 34

participant_identitystring

The application-defined string that uniquely identifies the participant within a Room.


join_timestring<date-time>

When the participant joined the room.


leave_timestring<date-time>

When the participant left the room.


duration_secinteger<int64>

Amount of time in seconds the participant was in the room.


account_sidSID<AC>

Account SID associated with the room.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

room_sidSID<RM>

Unique identifier for the room.

Pattern: ^RM[0-9a-fA-F]{32}$Min length: 34Max length: 34

statusenum<string>

Status of the room. Can be in_progress or completed.

Possible values:
in_progresscompleted

codecsarray[enum<string>]

Codecs detected from the participant. Can be VP8, H264, or VP9.

Possible values:
VP8H264VP9

end_reasonstring

Reason the participant left the room. See the list of possible values here.


error_codeinteger

Errors encountered by the participant.


error_code_urlstring

Twilio error code dictionary link.


media_regionenum<string>

Twilio media region the participant connected to. See the list of possible media servers here.

Possible values:
us1us2au1br1ie1jp1sg1in1de1gll

propertiesobject

Object containing information about the participant's data from the room. See below for more information.


edge_locationenum<string>

Name of the edge location the participant connected to. See the list of public edge locations for the possible values.

Possible values:
ashburndublinfrankfurtsingaporesydneysao_pauloroamingumatillatokyo

publisher_infoobject

Object containing information about the SDK name and version. See below for more information.


urlstring<uri>

URL of the participant resource.

The properties object contains the following keys:

NameDescription
recordOnConnectBoolean. Indicates if the participant was recorded as soon as they joined the room.
numAudioTracksNumber of audio tracks from the participant.
numVideoTracksNumber of video tracks from the participant.
numDataTracksNumber of data tracks from the participant.
isAdhocBoolean. Indicates if the participant joined the room ad-hoc.

The publisher_info object contains the following keys:

NameDescription
nameSDK type; e.g., twilio-video-js
sdk_versionSDK version

Below are the possible options for a participant end_reason:


_47
disconnected_via_api
_47
signaling_connection_error
_47
signaling_connection_disconnected
_47
signaling_connection_timed_out
_47
client_received_an_invalid_signaling_message
_47
client_sent_an_invalid_signaling_message
_47
room_name_is_invalid
_47
room_name_is_too_long
_47
room_name_contains_invalid_characters
_47
unable_to_create_room
_47
unable_to_connect_to_room
_47
room_contains_too_many_participants
_47
room_not_found
_47
max_participants_is_out_of_range
_47
room_type_is_not_valid
_47
timeout_is_out_of_range
_47
status_callback_method_is_invalid
_47
status_callback_is_invalid
_47
status_is_invalid
_47
room_creation_failed
_47
room_completed_error
_47
the_room_account_limit_was_exceeded
_47
invalid_recording_rule
_47
approaching_room_or_participant_concurrency_limits
_47
recording_operation_requested_is_not_supported_for_the_Room_type
_47
participant_identity_is_invalid
_47
participant_identity_is_too_long
_47
participant_identity_contains_invalid_characters
_47
participant_has_too_many_tracks
_47
participant_not_found
_47
participant_disconnected_because_of_duplicate_identity
_47
participant_account_limit_was_exceeded
_47
invalid_subscribe_rule
_47
track_is_invalid
_47
track_name_is_invalid
_47
track_name_is_too_long
_47
track_name_contains_invalid_characters
_47
track_name_is_duplicated
_47
client_is_unable_to_create_or_apply_a_local_media_description
_47
server_is_unable_to_create_or_apply_a_local_media_description
_47
client_is_unable_to_apply_a_remote_media_description
_47
server_is_unable_to_apply_a_remote_media_description
_47
no_supported_codec
_47
media_connection_failed_or_media_activity_ceased
_47
unable_to_acquire_configuration
_47
unable_to_acquire_TURN_credentials
_47
unknown


Rate this page: