# telnyx-video-python > Create and manage video rooms for real-time video communication and conferencing. This skill provides Python SDK examples. - Author: aisling404 - Repository: team-telnyx/telnyx-ext-agent-skills - Version: 20260206155921 - Stars: 0 - Forks: 0 - Last Updated: 2026-02-06 - Source: https://github.com/team-telnyx/telnyx-ext-agent-skills - Web: https://mule.run/skillshub/@@team-telnyx/telnyx-ext-agent-skills~telnyx-video-python:20260206155921 --- --- name: telnyx-video-python description: >- Create and manage video rooms for real-time video communication and conferencing. This skill provides Python SDK examples. metadata: author: telnyx product: video language: python --- # Telnyx Video - Python ## Installation ```bash pip install telnyx ``` ## Setup ```python import os from telnyx import Telnyx client = Telnyx( api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted ) ``` All examples below assume `client` is already initialized as shown above. ## View a list of room compositions. `GET /room_compositions` ```python page = client.room_compositions.list() page = page.data[0] print(page.id) ``` ## Create a room composition. Asynchronously create a room composition. `POST /room_compositions` ```python room_composition = client.room_compositions.create() print(room_composition.data) ``` ## View a room composition. `GET /room_compositions/{room_composition_id}` ```python room_composition = client.room_compositions.retrieve( "5219b3af-87c6-4c08-9b58-5a533d893e21", ) print(room_composition.data) ``` ## Delete a room composition. Synchronously delete a room composition. `DELETE /room_compositions/{room_composition_id}` ```python client.room_compositions.delete( "5219b3af-87c6-4c08-9b58-5a533d893e21", ) ``` ## View a list of room participants. `GET /room_participants` ```python page = client.room_participants.list() page = page.data[0] print(page.id) ``` ## View a room participant. `GET /room_participants/{room_participant_id}` ```python room_participant = client.room_participants.retrieve( "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) print(room_participant.data) ``` ## View a list of room recordings. `GET /room_recordings` ```python page = client.room_recordings.list() page = page.data[0] print(page.id) ``` ## Delete several room recordings in a bulk. `DELETE /room_recordings` ```python response = client.room_recordings.delete_bulk() print(response.data) ``` ## View a room recording. `GET /room_recordings/{room_recording_id}` ```python room_recording = client.room_recordings.retrieve( "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) print(room_recording.data) ``` ## Delete a room recording. Synchronously delete a Room Recording. `DELETE /room_recordings/{room_recording_id}` ```python client.room_recordings.delete( "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) ``` ## View a list of room sessions. `GET /room_sessions` ```python page = client.rooms.sessions.list_0() page = page.data[0] print(page.id) ``` ## View a room session. `GET /room_sessions/{room_session_id}` ```python session = client.rooms.sessions.retrieve( room_session_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) print(session.data) ``` ## End a room session. Note: this will also kick all participants currently present in the room `POST /room_sessions/{room_session_id}/actions/end` ```python response = client.rooms.sessions.actions.end( "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) print(response.data) ``` ## Kick participants from a room session. `POST /room_sessions/{room_session_id}/actions/kick` ```python response = client.rooms.sessions.actions.kick( room_session_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) print(response.data) ``` ## Mute participants in room session. `POST /room_sessions/{room_session_id}/actions/mute` ```python response = client.rooms.sessions.actions.mute( room_session_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) print(response.data) ``` ## Unmute participants in room session. `POST /room_sessions/{room_session_id}/actions/unmute` ```python response = client.rooms.sessions.actions.unmute( room_session_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) print(response.data) ``` ## View a list of room participants. `GET /room_sessions/{room_session_id}/participants` ```python page = client.rooms.sessions.retrieve_participants( room_session_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) page = page.data[0] print(page.id) ``` ## View a list of rooms. `GET /rooms` ```python page = client.rooms.list() page = page.data[0] print(page.id) ``` ## Create a room. Synchronously create a Room. `POST /rooms` ```python room = client.rooms.create() print(room.data) ``` ## View a room. `GET /rooms/{room_id}` ```python room = client.rooms.retrieve( room_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) print(room.data) ``` ## Update a room. Synchronously update a Room. `PATCH /rooms/{room_id}` ```python room = client.rooms.update( room_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) print(room.data) ``` ## Delete a room. Synchronously delete a Room. `DELETE /rooms/{room_id}` ```python client.rooms.delete( "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) ``` ## Create Client Token to join a room. Synchronously create an Client Token to join a Room. `POST /rooms/{room_id}/actions/generate_join_client_token` ```python response = client.rooms.actions.generate_join_client_token( room_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) print(response.data) ``` ## Refresh Client Token to join a room. Synchronously refresh an Client Token to join a Room. `POST /rooms/{room_id}/actions/refresh_client_token` — Required: `refresh_token` ```python response = client.rooms.actions.refresh_client_token( room_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", refresh_token="eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ0ZWxueXhfdGVsZXBob255IiwiZXhwIjoxNTkwMDEwMTQzLCJpYXQiOjE1ODc1OTA5NDMsImlzcyI6InRlbG55eF90ZWxlcGhvbnkiLCJqdGkiOiJiOGM3NDgzNy1kODllLTRhNjUtOWNmMi0zNGM3YTZmYTYwYzgiLCJuYmYiOjE1ODc1OTA5NDIsInN1YiI6IjVjN2FjN2QwLWRiNjUtNGYxMS05OGUxLWVlYzBkMWQ1YzZhZSIsInRlbF90b2tlbiI6InJqX1pra1pVT1pNeFpPZk9tTHBFVUIzc2lVN3U2UmpaRmVNOXMtZ2JfeENSNTZXRktGQUppTXlGMlQ2Q0JSbWxoX1N5MGlfbGZ5VDlBSThzRWlmOE1USUlzenl6U2xfYURuRzQ4YU81MHlhSEd1UlNZYlViU1ltOVdJaVEwZz09IiwidHlwIjoiYWNjZXNzIn0.gNEwzTow5MLLPLQENytca7pUN79PmPj6FyqZWW06ZeEmesxYpwKh0xRtA0TzLh6CDYIRHrI8seofOO0YFGDhpQ", ) print(response.data) ``` ## View a list of room sessions. `GET /rooms/{room_id}/sessions` ```python page = client.rooms.sessions.list_1( room_id="0ccc7b54-4df3-4bca-a65a-3da1ecc777f0", ) page = page.data[0] print(page.id) ```