# Video Log Analyzer API

The Video Log Analyzer REST API provides access to data generated by Programmable Video rooms and participants. Video Logs are available for seven days. 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

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

```bash
https://insights.twilio.com/v1/Video/Rooms
```

## Authentication

To authenticate requests to the Twilio APIs, Twilio supports [HTTP Basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication). Use your *API key* as the username and your *API key secret* as the password. You can create an API key either [in the Twilio Console](/docs/iam/api-keys/keys-in-console) or [using the API](/docs/iam/api-keys/key-resource-v1).

**Note**: Twilio recommends using API keys for authentication in production apps. For local testing, you can use your Account SID as the username and your Auth token as the password. You can find your Account SID and Auth Token in the [Twilio Console](https://www.twilio.com/console).

Learn more about [Twilio API authentication](/docs/usage/requests-to-twilio).

## Get Rooms List

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.

```bash
GET https://insights.twilio.com/v1/Video/Rooms
```

Get Rooms List

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function listVideoRoomSummary() {
  const rooms = await client.insights.v1.rooms.list({ limit: 20 });

  rooms.forEach((r) => console.log(r.accountSid));
}

listVideoRoomSummary();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

rooms = client.insights.v1.rooms.list(limit=20)

for record in rooms:
    print(record.account_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Insights.V1;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var rooms = await RoomResource.ReadAsync(limit: 20);

        foreach (var record in rooms) {
            Console.WriteLine(record.AccountSid);
        }
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.insights.v1.Room;
import com.twilio.base.ResourceSet;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<Room> rooms = Room.reader().limit(20).read();

        for (Room record : rooms) {
            System.out.println(record.getAccountSid());
        }
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	insights "github.com/twilio/twilio-go/rest/insights/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &insights.ListVideoRoomSummaryParams{}
	params.SetLimit(20)

	resp, err := client.InsightsV1.ListVideoRoomSummary(params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].AccountSid != nil {
				fmt.Println(*resp[record].AccountSid)
			} else {
				fmt.Println(resp[record].AccountSid)
			}
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$rooms = $twilio->insights->v1->rooms->read([], 20);

foreach ($rooms as $record) {
    print $record->accountSid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

rooms = @client
        .insights
        .v1
        .rooms
        .list(limit: 20)

rooms.each do |record|
   puts record.account_sid
end
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:insights:v1:video:rooms:list
```

```bash
curl -X GET "https://insights.twilio.com/v1/Video/Rooms?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

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

### Query parameters

```json
[{"name":"RoomType","in":"query","description":"Type of room. Can be `go`, `peer_to_peer`, `group`, or `group_small`.","schema":{"type":"array","items":{"type":"string","enum":["go","peer_to_peer","group","group_small"],"refName":"video_room_summary_enum_room_type","modelName":"video_room_summary_enum_room_type"}}},{"name":"Codec","in":"query","description":"Codecs used by participants in the room. Can be `VP8`, `H264`, or `VP9`.","schema":{"type":"array","items":{"type":"string","enum":["VP8","H264","VP9","opus"],"refName":"video_room_summary_enum_codec","modelName":"video_room_summary_enum_codec"}}},{"name":"RoomName","in":"query","description":"Room friendly name.","schema":{"type":"string"}},{"name":"CreatedAfter","in":"query","description":"Only read rooms that started on or after this ISO 8601 timestamp.","schema":{"type":"string","format":"date-time"}},{"name":"CreatedBefore","in":"query","description":"Only read rooms that started before this ISO 8601 timestamp.","schema":{"type":"string","format":"date-time"}},{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","format":"int64","minimum":1,"maximum":1000}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}}]
```

## Get Video Log Analyzer Data for a Room

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

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

Get Video Log Analyzer Data for a Room

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchVideoRoomSummary() {
  const room = await client.insights.v1
    .rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .fetch();

  console.log(room.accountSid);
}

fetchVideoRoomSummary();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

room = client.insights.v1.rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()

print(room.account_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Insights.V1;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var room = await RoomResource.FetchAsync(pathRoomSid: "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

        Console.WriteLine(room.AccountSid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.insights.v1.Room;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Room room = Room.fetcher("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch();

        System.out.println(room.getAccountSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	resp, err := client.InsightsV1.FetchVideoRoomSummary("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.AccountSid != nil {
			fmt.Println(*resp.AccountSid)
		} else {
			fmt.Println(resp.AccountSid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$room = $twilio->insights->v1
    ->rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->fetch();

print $room->accountSid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

room = @client
       .insights
       .v1
       .rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
       .fetch

puts room.account_sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:insights:v1:video:rooms:fetch \
   --room-sid RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

```bash
curl -X GET "https://insights.twilio.com/v1/Video/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

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

### Path parameters

```json
[{"name":"RoomSid","in":"path","description":"The SID of the Room resource.","schema":{"type":"string"},"required":true}]
```

### Room Summary Resource Properties

A Room Summary log is represented by the following properties:

```json
{"type":"object","refName":"insights.v1.video_room_summary","modelName":"insights_v1_video_room_summary","properties":{"account_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$","nullable":true,"description":"Account SID associated with this room."},"room_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^RM[0-9a-fA-F]{32}$","nullable":true,"description":"Unique identifier for the room."},"room_name":{"type":"string","nullable":true,"description":"Room friendly name."},"create_time":{"type":"string","format":"date-time","nullable":true,"description":"Creation time of the room."},"end_time":{"type":"string","format":"date-time","nullable":true,"description":"End time for the room."},"room_type":{"type":"string","nullable":true,"description":"Type of room. Can be `go`, `peer_to_peer`, `group`, or `group_small`.","enum":["go","peer_to_peer","group","group_small"],"refName":"video_room_summary_enum_room_type","modelName":"video_room_summary_enum_room_type"},"room_status":{"type":"string","nullable":true,"description":"Status of the room. Can be `in_progress` or `completed`.","enum":["in_progress","completed"],"refName":"video_room_summary_enum_room_status","modelName":"video_room_summary_enum_room_status"},"status_callback":{"type":"string","format":"uri","nullable":true,"description":"Webhook provided for status callbacks."},"status_callback_method":{"type":"string","format":"http-method","enum":["GET","POST"],"nullable":true,"description":"HTTP method provided for status callback URL."},"created_method":{"type":"string","nullable":true,"description":"How the room was created. Can be `sdk`, `ad_hoc`, or `api`.","enum":["sdk","ad_hoc","api"],"refName":"video_room_summary_enum_created_method","modelName":"video_room_summary_enum_created_method"},"end_reason":{"type":"string","nullable":true,"description":"Reason the room ended. Can be `room_ended_via_api` or `timeout`.","enum":["room_ended_via_api","timeout"],"refName":"video_room_summary_enum_end_reason","modelName":"video_room_summary_enum_end_reason"},"max_participants":{"type":"integer","nullable":true,"description":"Max number of total participants allowed by the application settings."},"unique_participants":{"type":"integer","nullable":true,"description":"Number of participants. May include duplicate identities for participants who left and rejoined."},"unique_participant_identities":{"type":"integer","nullable":true,"description":"Unique number of participant identities."},"concurrent_participants":{"type":"integer","nullable":true,"description":"Actual number of concurrent participants."},"max_concurrent_participants":{"type":"integer","nullable":true,"description":"Maximum number of participants allowed in the room at the same time allowed by the application settings."},"codecs":{"type":"array","nullable":true,"description":"Codecs used by participants in the room. Can be `VP8`, `H264`, or `VP9`.","items":{"type":"string","enum":["VP8","H264","VP9","opus"],"refName":"video_room_summary_enum_codec","modelName":"video_room_summary_enum_codec"}},"media_region":{"type":"string","nullable":true,"description":"Region of Twilio media servers for the room. See [the list of possible media servers here](/docs/video/ip-addresses).","enum":["us1","us2","au1","br1","ie1","jp1","sg1","in1","de1","gll"],"refName":"video_room_summary_enum_twilio_realm","modelName":"video_room_summary_enum_twilio_realm"},"duration_sec":{"type":"integer","format":"int64","nullable":true,"description":"Total room duration from create time to end time."},"total_participant_duration_sec":{"type":"integer","format":"int64","nullable":true,"description":"Combined amount of participant time in the room."},"total_recording_duration_sec":{"type":"integer","format":"int64","nullable":true,"description":"Combined amount of recorded seconds for participants in the room."},"processing_state":{"type":"string","nullable":true,"description":"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.","enum":["complete","in_progress","timeout","not_started"],"refName":"video_room_summary_enum_processing_state","modelName":"video_room_summary_enum_processing_state"},"recording_enabled":{"type":"boolean","nullable":true,"description":"Boolean indicating if recording is enabled for the room."},"edge_location":{"type":"string","nullable":true,"description":"Edge location of Twilio media servers for the room. See [the list of public edge locations](/docs/global-infrastructure/edge-locations#public-edge-locations) for the possible values.","enum":["ashburn","dublin","frankfurt","singapore","sydney","sao_paulo","roaming","umatilla","tokyo"],"refName":"video_room_summary_enum_edge_location","modelName":"video_room_summary_enum_edge_location"},"url":{"type":"string","format":"uri","nullable":true,"description":"URL for the room resource."},"links":{"type":"object","format":"uri-map","nullable":true,"description":"Room subresources."}}}
```

## Get Participants List

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

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

Get List of Room Participants

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function listVideoParticipantSummary() {
  const participants = await client.insights.v1
    .rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .participants.list({ limit: 20 });

  participants.forEach((p) => console.log(p.participantSid));
}

listVideoParticipantSummary();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

participants = client.insights.v1.rooms(
    "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
).participants.list(limit=20)

for record in participants:
    print(record.participant_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Insights.V1.Room;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var participants = await ParticipantResource.ReadAsync(
            pathRoomSid: "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", limit: 20);

        foreach (var record in participants) {
            Console.WriteLine(record.ParticipantSid);
        }
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.insights.v1.room.Participant;
import com.twilio.base.ResourceSet;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<Participant> participants =
            Participant.reader("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").limit(20).read();

        for (Participant record : participants) {
            System.out.println(record.getParticipantSid());
        }
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	insights "github.com/twilio/twilio-go/rest/insights/v1"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	params := &insights.ListVideoParticipantSummaryParams{}
	params.SetLimit(20)

	resp, err := client.InsightsV1.ListVideoParticipantSummary("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		params)
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		for record := range resp {
			if resp[record].ParticipantSid != nil {
				fmt.Println(*resp[record].ParticipantSid)
			} else {
				fmt.Println(resp[record].ParticipantSid)
			}
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$participants = $twilio->insights->v1
    ->rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->participants->read(20);

foreach ($participants as $record) {
    print $record->participantSid;
}
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

participants = @client
               .insights
               .v1
               .rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
               .participants
               .list(limit: 20)

participants.each do |record|
   puts record.participant_sid
end
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:insights:v1:video:rooms:participants:list \
   --room-sid RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

```bash
curl -X GET "https://insights.twilio.com/v1/Video/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants?PageSize=20" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

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

### Path parameters

```json
[{"name":"RoomSid","in":"path","description":"The SID of the Room resource.","schema":{"type":"string"},"required":true}]
```

### Query parameters

```json
[{"name":"PageSize","in":"query","description":"How many resources to return in each list page. The default is 50, and the maximum is 1000.","schema":{"type":"integer","format":"int64","minimum":1,"maximum":1000}},{"name":"Page","in":"query","description":"The page index. This value is simply for client state.","schema":{"type":"integer","minimum":0}},{"name":"PageToken","in":"query","description":"The page token. This is provided by the API.","schema":{"type":"string"}}]
```

## Get Video Log Analyzer data for a Room Participant

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

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

Get a Participant's Details

```js
// Download the helper library from https://www.twilio.com/docs/node/install
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
const accountSid = process.env.TWILIO_ACCOUNT_SID;
const authToken = process.env.TWILIO_AUTH_TOKEN;
const client = twilio(accountSid, authToken);

async function fetchVideoParticipantSummary() {
  const participant = await client.insights.v1
    .rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .participants("PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .fetch();

  console.log(participant.participantSid);
}

fetchVideoParticipantSummary();
```

```python
# Download the helper library from https://www.twilio.com/docs/python/install
import os
from twilio.rest import Client

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = os.environ["TWILIO_ACCOUNT_SID"]
auth_token = os.environ["TWILIO_AUTH_TOKEN"]
client = Client(account_sid, auth_token)

participant = (
    client.insights.v1.rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .participants("PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    .fetch()
)

print(participant.participant_sid)
```

```csharp
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Insights.V1.Room;
using System.Threading.Tasks;

class Program {
    public static async Task Main(string[] args) {
        // Find your Account SID and Auth Token at twilio.com/console
        // and set the environment variables. See http://twil.io/secure
        string accountSid = Environment.GetEnvironmentVariable("TWILIO_ACCOUNT_SID");
        string authToken = Environment.GetEnvironmentVariable("TWILIO_AUTH_TOKEN");

        TwilioClient.Init(accountSid, authToken);

        var participant = await ParticipantResource.FetchAsync(
            pathRoomSid: "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            pathParticipantSid: "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");

        Console.WriteLine(participant.ParticipantSid);
    }
}
```

```java
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.rest.insights.v1.room.Participant;

public class Example {
    // Find your Account SID and Auth Token at twilio.com/console
    // and set the environment variables. See http://twil.io/secure
    public static final String ACCOUNT_SID = System.getenv("TWILIO_ACCOUNT_SID");
    public static final String AUTH_TOKEN = System.getenv("TWILIO_AUTH_TOKEN");

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Participant participant =
            Participant.fetcher("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch();

        System.out.println(participant.getParticipantSid());
    }
}
```

```go
// Download the helper library from https://www.twilio.com/docs/go/install
package main

import (
	"fmt"
	"github.com/twilio/twilio-go"
	"os"
)

func main() {
	// Find your Account SID and Auth Token at twilio.com/console
	// and set the environment variables. See http://twil.io/secure
	// Make sure TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN exists in your environment
	client := twilio.NewRestClient()

	resp, err := client.InsightsV1.FetchVideoParticipantSummary("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
		"PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
	if err != nil {
		fmt.Println(err.Error())
		os.Exit(1)
	} else {
		if resp.ParticipantSid != nil {
			fmt.Println(*resp.ParticipantSid)
		} else {
			fmt.Println(resp.ParticipantSid)
		}
	}
}
```

```php
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once "/path/to/vendor/autoload.php";

use Twilio\Rest\Client;

// Find your Account SID and Auth Token at twilio.com/console
// and set the environment variables. See http://twil.io/secure
$sid = getenv("TWILIO_ACCOUNT_SID");
$token = getenv("TWILIO_AUTH_TOKEN");
$twilio = new Client($sid, $token);

$participant = $twilio->insights->v1
    ->rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->participants("PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->fetch();

print $participant->participantSid;
```

```ruby
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Find your Account SID and Auth Token at twilio.com/console
# and set the environment variables. See http://twil.io/secure
account_sid = ENV['TWILIO_ACCOUNT_SID']
auth_token = ENV['TWILIO_AUTH_TOKEN']
@client = Twilio::REST::Client.new(account_sid, auth_token)

participant = @client
              .insights
              .v1
              .rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
              .participants('PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
              .fetch

puts participant.participant_sid
```

```bash
# Install the twilio-cli from https://twil.io/cli

twilio api:insights:v1:video:rooms:participants:fetch \
   --room-sid RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
   --participant-sid PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

```bash
curl -X GET "https://insights.twilio.com/v1/Video/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
```

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

### Path parameters

```json
[{"name":"RoomSid","in":"path","description":"The SID of the Room resource.","schema":{"type":"string"},"required":true},{"name":"ParticipantSid","in":"path","description":"The SID of the Participant resource.","schema":{"type":"string"},"required":true}]
```

### Participant Summary Resource Properties

A participant summary is represented by the following properties:

```json
{"type":"object","refName":"insights.v1.video_room_summary.video_participant_summary","modelName":"insights_v1_video_room_summary_video_participant_summary","properties":{"participant_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^PA[0-9a-fA-F]{32}$","nullable":true,"description":"Unique identifier for the participant."},"participant_identity":{"type":"string","nullable":true,"description":"The application-defined string that uniquely identifies the participant within a Room."},"join_time":{"type":"string","format":"date-time","nullable":true,"description":"When the participant joined the room."},"leave_time":{"type":"string","format":"date-time","nullable":true,"description":"When the participant left the room."},"duration_sec":{"type":"integer","format":"int64","nullable":true,"description":"Amount of time in seconds the participant was in the room."},"account_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^AC[0-9a-fA-F]{32}$","nullable":true,"description":"Account SID associated with the room."},"room_sid":{"type":"string","minLength":34,"maxLength":34,"pattern":"^RM[0-9a-fA-F]{32}$","nullable":true,"description":"Unique identifier for the room."},"status":{"type":"string","nullable":true,"description":"Status of the room. Can be `in_progress` or `completed`.","enum":["in_progress","connected","completed","disconnected"],"refName":"video_participant_summary_enum_room_status","modelName":"video_participant_summary_enum_room_status"},"codecs":{"type":"array","nullable":true,"description":"Codecs detected from the participant. Can be `VP8`, `H264`, or `VP9`.","items":{"type":"string","enum":["VP8","H264","VP9","opus"],"refName":"video_participant_summary_enum_codec","modelName":"video_participant_summary_enum_codec"}},"end_reason":{"type":"string","nullable":true,"description":"Reason the participant left the room. See [the list of possible values here](/docs/video/troubleshooting/video-log-analyzer-api#end_reason)."},"error_code":{"type":"integer","nullable":true,"description":"Errors encountered by the participant."},"error_code_url":{"type":"string","nullable":true,"description":"Twilio error code dictionary link."},"media_region":{"type":"string","nullable":true,"description":"Twilio media region the participant connected to. See [the list of possible media servers here](/docs/video/ip-addresses).","enum":["us1","us2","au1","br1","ie1","jp1","sg1","in1","de1","gll"],"refName":"video_participant_summary_enum_twilio_realm","modelName":"video_participant_summary_enum_twilio_realm"},"properties":{"nullable":true,"description":"Object containing information about the participant's data from the room. See [below](/docs/video/troubleshooting/video-log-analyzer-api#properties) for more information."},"edge_location":{"type":"string","nullable":true,"description":"Name of the edge location the participant connected to. See [the list of public edge locations](/docs/global-infrastructure/edge-locations#public-edge-locations) for the possible values.","enum":["ashburn","dublin","frankfurt","singapore","sydney","sao_paulo","roaming","umatilla","tokyo"],"refName":"video_participant_summary_enum_edge_location","modelName":"video_participant_summary_enum_edge_location"},"publisher_info":{"nullable":true,"description":"Object containing information about the SDK name and version. See [below](/docs/video/troubleshooting/video-log-analyzer-api#publisher_info) for more information."},"url":{"type":"string","format":"uri","nullable":true,"description":"URL of the participant resource."}}}
```

#### properties

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.                       |

#### publisher\_info

The `publisher_info` object contains the following keys:

| **Name**     | **Description**                 |
| ------------ | ------------------------------- |
| name         | SDK type; e.g., twilio-video-js |
| sdk\_version | SDK version                     |

#### end\_reason

Below are the possible options for a participant `end_reason`:

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