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.
Video Log Analyzer data is available under the following base URL. The REST API is served over HTTPS; unencrypted HTTP is not supported.
https://insights.twilio.com/v1/Video/Rooms
HTTP requests to the REST API are protected with HTTP Basic authentication. 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.
GET https://insights.twilio.com/v1/Video/Rooms
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listVideoRoomSummary() {11const rooms = await client.insights.v1.rooms.list({ limit: 20 });1213rooms.forEach((r) => console.log(r.accountSid));14}1516listVideoRoomSummary();
1{2"meta": {3"first_page_url": "https://insights.twilio.com/v1/Video/Rooms?PageSize=50&Page=0",4"url": "https://insights.twilio.com/v1/Video/Rooms?PageSize=50&Page=0",5"page_size": 50,6"next_page_url": null,7"key": "rooms",8"page": 0,9"previous_page_url": null10},11"rooms": [12{13"room_type": "go",14"unique_participant_identities": 0,15"codecs": [16"VP8"17],18"max_participants": 0,19"room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",20"create_time": "2015-07-30T20:00:00Z",21"end_reason": "room_ended_via_api",22"duration_sec": 50000000,23"room_status": "in_progress",24"media_region": "us1",25"recording_enabled": false,26"edge_location": "ashburn",27"max_concurrent_participants": 0,28"unique_participants": 0,29"room_name": "room_name",30"created_method": "sdk",31"total_participant_duration_sec": 50000000,32"status_callback_method": "GET",33"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",34"end_time": "2015-07-30T20:00:00Z",35"total_recording_duration_sec": 50000000,36"processing_state": "complete",37"concurrent_participants": 0,38"status_callback": "http://www.example.com",39"url": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",40"links": {41"participants": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants"42}43}44]45}
Type of room. Can be go
, peer_to_peer
, group
, or group_small
.
go
peer_to_peer
group
group_small
Codecs used by participants in the room. Can be VP8
, H264
, or VP9
.
VP8
H264
VP9
Only read rooms that started on or after this ISO 8601 timestamp.
Only read rooms that started before this ISO 8601 timestamp.
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
The Room resource returns the Video Log Analyzer data for the provided room SID.
GET https://insights.twilio.com/v1/Video/Rooms/{Room_SID}
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchVideoRoomSummary() {11const room = await client.insights.v112.rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.fetch();1415console.log(room.accountSid);16}1718fetchVideoRoomSummary();
1{2"room_type": "go",3"unique_participant_identities": 0,4"codecs": [5"VP8"6],7"max_participants": 0,8"room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",9"create_time": "2015-07-30T20:00:00Z",10"end_reason": "room_ended_via_api",11"duration_sec": 50000000,12"room_status": "in_progress",13"media_region": "us1",14"recording_enabled": false,15"edge_location": "ashburn",16"max_concurrent_participants": 0,17"unique_participants": 0,18"room_name": "room_name",19"created_method": "sdk",20"total_participant_duration_sec": 50000000,21"status_callback_method": "GET",22"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",23"end_time": "2015-07-30T20:00:00Z",24"total_recording_duration_sec": 50000000,25"processing_state": "complete",26"concurrent_participants": 0,27"status_callback": "http://www.example.com",28"url": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",29"links": {30"participants": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants"31}32}
The SID of the Room resource.
A Room Summary log is represented by the following properties:
Account SID associated with this room.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Unique identifier for the room.
^RM[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Type of room. Can be go
, peer_to_peer
, group
, or group_small
.
go
peer_to_peer
group
group_small
Status of the room. Can be in_progress
or completed
.
in_progress
completed
HTTP method provided for status callback URL.
GET
POST
How the room was created. Can be sdk
, ad_hoc
, or api
.
sdk
ad_hoc
api
Reason the room ended. Can be room_ended_via_api
or timeout
.
room_ended_via_api
timeout
Max number of total participants allowed by the application settings.
Number of participants. May include duplicate identities for participants who left and rejoined.
Maximum number of participants allowed in the room at the same time allowed by the application settings.
Codecs used by participants in the room. Can be VP8
, H264
, or VP9
.
VP8
H264
VP9
Region of Twilio media servers for the room. See the list of possible media servers here.
us1
us2
au1
br1
ie1
jp1
sg1
in1
de1
gll
Combined amount of participant time in the room.
Combined amount of recorded seconds for participants in the room.
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.
complete
in_progress
Edge location of Twilio media servers for the room. See the list of public edge locations for the possible values.
ashburn
dublin
frankfurt
singapore
sydney
sao_paulo
roaming
umatilla
tokyo
Room subresources.
The Participants list returns the participant details for a provided room SID.
GET https://insights.twilio.com/v1/Video/Rooms/{Room_SID}/Participants
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listVideoParticipantSummary() {11const participants = await client.insights.v112.rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.participants.list({ limit: 20 });1415participants.forEach((p) => console.log(p.participantSid));16}1718listVideoParticipantSummary();
1{2"meta": {3"url": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants?PageSize=50&Page=0",4"key": "participants",5"first_page_url": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants?PageSize=50&Page=0",6"page_size": 50,7"next_page_url": null,8"page": 0,9"previous_page_url": null10},11"participants": [12{13"publisher_info": {},14"edge_location": "ashburn",15"join_time": "2015-07-30T20:00:00Z",16"leave_time": "2015-07-30T20:00:00Z",17"end_reason": "disconnected_via_api",18"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",19"error_code": 53205,20"media_region": "us1",21"properties": {},22"room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",23"error_code_url": "error_code_url",24"participant_sid": "PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",25"codecs": [26"VP8"27],28"status": "in_progress",29"duration_sec": 50000000,30"participant_identity": "participant_identity",31"url": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"32}33]34}
The SID of the Room resource.
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
The Participant resource returns the Video Log Analyzer details for a provided room participant SID.
GET https://insights.twilio.com/v1/Video/Rooms/{Room_SID}/Participants/{Partcipant_SID}
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchVideoParticipantSummary() {11const participant = await client.insights.v112.rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.participants("PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")14.fetch();1516console.log(participant.participantSid);17}1819fetchVideoParticipantSummary();
1{2"publisher_info": {},3"edge_location": "ashburn",4"join_time": "2015-07-30T20:00:00Z",5"leave_time": "2015-07-30T20:00:00Z",6"end_reason": "disconnected_via_api",7"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"error_code": 0,9"media_region": "us1",10"properties": {},11"room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",12"error_code_url": "error_code_url",13"participant_sid": "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",14"codecs": [15"VP8"16],17"status": "in_progress",18"duration_sec": 50000000,19"participant_identity": "participant_identity",20"url": "https://insights.twilio.com/v1/Video/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"21}
A participant summary is represented by the following properties:
Unique identifier for the participant.
^PA[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The application-defined string that uniquely identifies the participant within a Room.
Account SID associated with the room.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Unique identifier for the room.
^RM[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
Status of the room. Can be in_progress
or completed
.
in_progress
completed
Codecs detected from the participant. Can be VP8
, H264
, or VP9
.
VP8
H264
VP9
Reason the participant left the room. See the list of possible values here.
Twilio media region the participant connected to. See the list of possible media servers here.
us1
us2
au1
br1
ie1
jp1
sg1
in1
de1
gll
Object containing information about the participant's data from the room. See below for more information.
Name of the edge location the participant connected to. See the list of public edge locations for the possible values.
ashburn
dublin
frankfurt
singapore
sydney
sao_paulo
roaming
umatilla
tokyo
Object containing information about the SDK name and version. See below for more information.
URL of the participant resource.
The properties
object contains the following keys:
Name | Description |
---|---|
recordOnConnect | Boolean. Indicates if the participant was recorded as soon as they joined the room. |
numAudioTracks | Number of audio tracks from the participant. |
numVideoTracks | Number of video tracks from the participant. |
numDataTracks | Number of data tracks from the participant. |
isAdhoc | Boolean. Indicates if the participant joined the room ad-hoc. |
The publisher_info
object contains the following keys:
Name | Description |
---|---|
name | SDK type; e.g., twilio-video-js |
sdk_version | SDK version |
Below are the possible options for a participant end_reason
:
1disconnected_via_api2signaling_connection_error3signaling_connection_disconnected4signaling_connection_timed_out5client_received_an_invalid_signaling_message6client_sent_an_invalid_signaling_message7room_name_is_invalid8room_name_is_too_long9room_name_contains_invalid_characters10unable_to_create_room11unable_to_connect_to_room12room_contains_too_many_participants13room_not_found14max_participants_is_out_of_range15room_type_is_not_valid16timeout_is_out_of_range17status_callback_method_is_invalid18status_callback_is_invalid19status_is_invalid20room_creation_failed21room_completed_error22the_room_account_limit_was_exceeded23invalid_recording_rule24approaching_room_or_participant_concurrency_limits25recording_operation_requested_is_not_supported_for_the_Room_type26participant_identity_is_invalid27participant_identity_is_too_long28participant_identity_contains_invalid_characters29participant_has_too_many_tracks30participant_not_found31participant_disconnected_because_of_duplicate_identity32participant_account_limit_was_exceeded33invalid_subscribe_rule34track_is_invalid35track_name_is_invalid36track_name_is_too_long37track_name_contains_invalid_characters38track_name_is_duplicated39client_is_unable_to_create_or_apply_a_local_media_description40server_is_unable_to_create_or_apply_a_local_media_description41client_is_unable_to_apply_a_remote_media_description42server_is_unable_to_apply_a_remote_media_description43no_supported_codec44media_connection_failed_or_media_activity_ceased45unable_to_acquire_configuration46unable_to_acquire_TURN_credentials47unknown