Skip to content
Start here

Fetch details of an active session

realtime_kit.active_session.get_active_session(strmeeting_id, ActiveSessionGetActiveSessionParams**kwargs) -> ActiveSessionGetActiveSessionResponse
GET/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session

Returns details of an ongoing active session for the given meeting ID.

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Realtime AdminRealtime
ParametersExpand Collapse
account_id: str

The account identifier tag.

maxLength32
app_id: str

The app identifier tag.

maxLength32
meeting_id: str
ReturnsExpand Collapse
class ActiveSessionGetActiveSessionResponse:
data: Optional[Data]
id: str

ID of the session

associated_id: str

ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form abcdef-ghijkl

created_at: str

timestamp when session created

live_participants: float

number of participants currently in the session

max_concurrent_participants: float

number of maximum participants that were in the session

meeting_display_name: str

Title of the meeting this session belongs to

minutes_consumed: float

number of minutes consumed since the session started

organization_id: str

App id that hosted this session

started_at: str

timestamp when session started

status: Literal["LIVE", "ENDED"]

current status of session

One of the following:
"LIVE"
"ENDED"
type: Literal["meeting", "livestream", "participant"]

type of session

One of the following:
"meeting"
"livestream"
"participant"
updated_at: str

timestamp when session was last updated

breakout_rooms: Optional[List[object]]
ended_at: Optional[str]

timestamp when session ended

meta: Optional[object]

Any meta data about session.

success: Optional[bool]

Fetch details of an active session

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
response = client.realtime_kit.active_session.get_active_session(
    meeting_id="meeting_id",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
    app_id="app_id",
)
print(response.data)
{
  "data": {
    "id": "id",
    "associated_id": "associated_id",
    "created_at": "created_at",
    "live_participants": 0,
    "max_concurrent_participants": 0,
    "meeting_display_name": "meeting_display_name",
    "minutes_consumed": 0,
    "organization_id": "organization_id",
    "started_at": "started_at",
    "status": "LIVE",
    "type": "meeting",
    "updated_at": "updated_at",
    "breakout_rooms": [
      {}
    ],
    "ended_at": "ended_at",
    "meta": {}
  },
  "success": true
}
{
  "error": {
    "code": 404,
    "message": "No active session found for meeting_id 6bf2b8be-04dd-4191-b602-1128921a306b"
  },
  "success": false
}
Returns Examples
{
  "data": {
    "id": "id",
    "associated_id": "associated_id",
    "created_at": "created_at",
    "live_participants": 0,
    "max_concurrent_participants": 0,
    "meeting_display_name": "meeting_display_name",
    "minutes_consumed": 0,
    "organization_id": "organization_id",
    "started_at": "started_at",
    "status": "LIVE",
    "type": "meeting",
    "updated_at": "updated_at",
    "breakout_rooms": [
      {}
    ],
    "ended_at": "ended_at",
    "meta": {}
  },
  "success": true
}
{
  "error": {
    "code": 404,
    "message": "No active session found for meeting_id 6bf2b8be-04dd-4191-b602-1128921a306b"
  },
  "success": false
}