import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const room = await client.rooms.retrieve('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0');
console.log(room.data);{
"data": {
"id": "7b61621f-62e0-4aad-ab11-9fd19e272e73",
"max_participants": 50,
"unique_name": "My Room",
"created_at": "2021-04-16T09:46:20.954863Z",
"updated_at": "2021-04-16T10:24:55.962200Z",
"active_session_id": "7b61621f-62e0-4aad-ab11-9fd19e272e74",
"enable_recording": true,
"webhook_event_failover_url": "https://failover.example.com",
"webhook_timeout_secs": 25,
"webhook_event_url": "https://www.example.com",
"sessions": [
{
"id": "7b61621f-62e0-4aad-ab11-9fd19e272e74",
"room_id": "7b61621f-62e0-4aad-ab11-9fd19e272e73",
"active": true,
"created_at": "2021-04-16T09:46:20.954863Z",
"updated_at": "2021-04-16T10:24:55.962200Z",
"participants": [],
"record_type": "room_session"
}
],
"record_type": "room"
}
}import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const room = await client.rooms.retrieve('0ccc7b54-4df3-4bca-a65a-3da1ecc777f0');
console.log(room.data);{
"data": {
"id": "7b61621f-62e0-4aad-ab11-9fd19e272e73",
"max_participants": 50,
"unique_name": "My Room",
"created_at": "2021-04-16T09:46:20.954863Z",
"updated_at": "2021-04-16T10:24:55.962200Z",
"active_session_id": "7b61621f-62e0-4aad-ab11-9fd19e272e74",
"enable_recording": true,
"webhook_event_failover_url": "https://failover.example.com",
"webhook_timeout_secs": 25,
"webhook_event_url": "https://www.example.com",
"sessions": [
{
"id": "7b61621f-62e0-4aad-ab11-9fd19e272e74",
"room_id": "7b61621f-62e0-4aad-ab11-9fd19e272e73",
"active": true,
"created_at": "2021-04-16T09:46:20.954863Z",
"updated_at": "2021-04-16T10:24:55.962200Z",
"participants": [],
"record_type": "room_session"
}
],
"record_type": "room"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The unique identifier of a room.
"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
To decide if room sessions should be included in the response.
true
Get room response.
Show child attributes
A unique identifier for the room.
"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
Maximum participants allowed in the room.
50
The unique (within the Telnyx account scope) name of the room.
"My room"
ISO 8601 timestamp when the room was created.
"2021-03-26T17:51:59.588408Z"
ISO 8601 timestamp when the room was updated.
"2021-03-26T17:51:59.588408Z"
The identifier of the active room session if any.
"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
Show child attributes
A unique identifier for the room session.
"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
Identify the room hosting that room session.
"0ccc7b54-4df3-4bca-a65a-3da1ecc777b0"
Shows if the room session is active or not.
false
ISO 8601 timestamp when the room session was created.
"2021-03-26T17:51:59.588408Z"
ISO 8601 timestamp when the room session was updated.
"2021-03-26T17:51:59.588408Z"
ISO 8601 timestamp when the room session has ended.
"2021-03-26T17:51:59.588408Z"
Show child attributes
A unique identifier for the room participant.
"0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
Identify the room session that participant is part of.
"0ccc7b54-4df3-4bca-a65a-3da1ecc777b0"
Context provided to the given participant through the client SDK
"Alice"
ISO 8601 timestamp when the participant joined the session.
"2021-03-26T17:51:59.588408Z"
ISO 8601 timestamp when the participant was updated.
"2021-03-26T17:51:59.588408Z"
ISO 8601 timestamp when the participant left the session.
"2021-03-26T17:51:59.588408Z"
"room_participant"
"room_session"
Enable or disable recording for that room.
true
The URL where webhooks related to this room will be sent. Must include a scheme, such as 'https'.
"https://example.com"
The failover URL where webhooks related to this room will be sent if sending to the primary URL fails. Must include a scheme, such as 'https'.
"https://failover.example.com"
Specifies how many seconds to wait before timing out a webhook.
0 <= x <= 3025
"room"
{
"id": "7b61621f-62e0-4aad-ab11-9fd19e272e73",
"max_participants": 50,
"unique_name": "My Room",
"created_at": "2021-04-16T09:46:20.954863Z",
"updated_at": "2021-04-16T10:24:55.962200Z",
"active_session_id": "7b61621f-62e0-4aad-ab11-9fd19e272e74",
"enable_recording": true,
"webhook_event_failover_url": "https://failover.example.com",
"webhook_timeout_secs": 25,
"webhook_event_url": "https://www.example.com",
"sessions": [
{
"id": "7b61621f-62e0-4aad-ab11-9fd19e272e74",
"room_id": "7b61621f-62e0-4aad-ab11-9fd19e272e73",
"active": true,
"created_at": "2021-04-16T09:46:20.954863Z",
"updated_at": "2021-04-16T10:24:55.962200Z",
"participants": [],
"record_type": "room_session"
}
],
"record_type": "room"
}Was this page helpful?