View a list of room participants.
GET
/
room_participants
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const roomParticipant of client.roomParticipants.list()) {
console.log(roomParticipant.id);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.room_participants.list()
page = page.data[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.RoomParticipants.List(context.TODO(), telnyx.RoomParticipantListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.roomparticipants.RoomParticipantListPage;
import com.telnyx.sdk.models.roomparticipants.RoomParticipantListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
RoomParticipantListPage page = client.roomParticipants().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.room_participants.list
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$page = $client->roomParticipants->list(
filter: [
'context' => 'Alice',
'dateJoinedAt' => [
'eq' => '2021-04-25', 'gte' => '2021-04-25', 'lte' => '2021-04-25'
],
'dateLeftAt' => [
'eq' => '2021-04-25', 'gte' => '2021-04-25', 'lte' => '2021-04-25'
],
'dateUpdatedAt' => [
'eq' => '2021-04-25', 'gte' => '2021-04-25', 'lte' => '2021-04-25'
],
'sessionID' => '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0',
],
pageNumber: 0,
pageSize: 0,
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx room-participants list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/room_participants \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "7b61621f-62e0-4aad-ab11-9fd19e272e73",
"session_id": "7b61621f-5fe4-4aad-ab11-9fd19e272e73",
"context": "Alice",
"joined_at": "2021-04-16T09:46:20.954863Z",
"updated_at": "2021-04-16T10:24:55.962200Z",
"left_at": "2021-04-16T10:24:55.962200Z",
"record_type": "room_participant"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}{
"success": false,
"message": "Error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Consolidated filter parameter (deepObject style). Originally: filter[date_joined_at][eq], filter[date_joined_at][gte], filter[date_joined_at][lte], filter[date_updated_at][eq], filter[date_updated_at][gte], filter[date_updated_at][lte], filter[date_left_at][eq], filter[date_left_at][gte], filter[date_left_at][lte], filter[context], filter[session_id]
Show child attributes
Show child attributes
Consolidated page parameter (deepObject style). Originally: page[size], page[number]
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const roomParticipant of client.roomParticipants.list()) {
console.log(roomParticipant.id);
}import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.room_participants.list()
page = page.data[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.RoomParticipants.List(context.TODO(), telnyx.RoomParticipantListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.roomparticipants.RoomParticipantListPage;
import com.telnyx.sdk.models.roomparticipants.RoomParticipantListParams;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
RoomParticipantListPage page = client.roomParticipants().list();
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
page = telnyx.room_participants.list
puts(page)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$page = $client->roomParticipants->list(
filter: [
'context' => 'Alice',
'dateJoinedAt' => [
'eq' => '2021-04-25', 'gte' => '2021-04-25', 'lte' => '2021-04-25'
],
'dateLeftAt' => [
'eq' => '2021-04-25', 'gte' => '2021-04-25', 'lte' => '2021-04-25'
],
'dateUpdatedAt' => [
'eq' => '2021-04-25', 'gte' => '2021-04-25', 'lte' => '2021-04-25'
],
'sessionID' => '0ccc7b54-4df3-4bca-a65a-3da1ecc777f0',
],
pageNumber: 0,
pageSize: 0,
);
var_dump($page);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx room-participants list \
--api-key 'My API Key'curl --request GET \
--url https://api.telnyx.com/v2/room_participants \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "7b61621f-62e0-4aad-ab11-9fd19e272e73",
"session_id": "7b61621f-5fe4-4aad-ab11-9fd19e272e73",
"context": "Alice",
"joined_at": "2021-04-16T09:46:20.954863Z",
"updated_at": "2021-04-16T10:24:55.962200Z",
"left_at": "2021-04-16T10:24:55.962200Z",
"record_type": "room_participant"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}{
"success": false,
"message": "Error"
}