Skip to content
Start here

Fetch details of a participant

realtime_kit.sessions.get_session_participant_details(strparticipant_id, SessionGetSessionParticipantDetailsParams**kwargs) -> SessionGetSessionParticipantDetailsResponse
GET/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants/{participant_id}

Returns details of the given participant ID for the given session ID. Use the peer report endpoint to retrieve call statistics.

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.

session_id: str
formatuuid
participant_id: str
formatuuid
include_peer_events: Optional[bool]

if true, response includes all the peer events of participant.

ReturnsExpand Collapse
class SessionGetSessionParticipantDetailsResponse: …
data: Optional[Data]
participant: Optional[DataParticipant]
id: Optional[str]

Participant ID. This maps to the corresponding peerId.

created_at: Optional[str]

timestamp when this participant was created.

custom_participant_id: Optional[str]

ID passed by client to create this participant.

display_name: Optional[str]

Display name of participant when joining the session.

duration: Optional[float]

number of minutes for which the participant was in the session.

joined_at: Optional[str]

timestamp at which participant joined the session.

left_at: Optional[str]

timestamp at which participant left the session.

peer_events: Optional[List[DataParticipantPeerEvent]]

Connection lifecycle events for the participant’s peer. Only included when include_peer_events is true.

id: Optional[str]

ID of the peer event.

created_at: Optional[str]

Timestamp when this peer event was created.

event_name: Optional[Literal["PEER_CREATED", "PEER_JOINING", "PEER_LEAVING"]]

Name of the peer event.

One of the following:
"PEER_CREATED"
"PEER_JOINING"
"PEER_LEAVING"
minutes_consumed: Optional[float]

Minutes consumed attributed to this event.

participant_id: Optional[str]

ID of the participant this event belongs to.

peer_id: Optional[str]

Peer ID this event belongs to.

preset_view_type: Optional[Literal["GROUP_CALL", "WEBINAR", "AUDIO_ROOM", 2 more]]

View type of the preset associated with the peer.

One of the following:
"GROUP_CALL"
"WEBINAR"
"AUDIO_ROOM"
"LIVESTREAM"
"CHAT"
session_id: Optional[str]

ID of the session this event belongs to.

socket_session_id: Optional[str]

ID of the socket session associated with this event.

updated_at: Optional[str]

Timestamp when this peer event was last updated.

preset_name: Optional[str]

Name of the preset associated with the participant.

updated_at: Optional[str]

timestamp when this participant’s data was last updated.

user_id: Optional[str]

User id for this participant.

success: Optional[bool]

Fetch details of a participant

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.sessions.get_session_participant_details(
    participant_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
    app_id="14a396e7-ca44-4937-bf1f-050a69118543",
    session_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
)
print(response.data)
{
  "data": {
    "participant": {
      "id": "id",
      "created_at": "created_at",
      "custom_participant_id": "custom_participant_id",
      "display_name": "display_name",
      "duration": 0,
      "joined_at": "joined_at",
      "left_at": "left_at",
      "peer_events": [
        {
          "id": "id",
          "created_at": "created_at",
          "event_name": "PEER_CREATED",
          "minutes_consumed": 0,
          "participant_id": "participant_id",
          "peer_id": "peer_id",
          "preset_view_type": "GROUP_CALL",
          "session_id": "session_id",
          "socket_session_id": "socket_session_id",
          "updated_at": "updated_at"
        }
      ],
      "preset_name": "preset_name",
      "updated_at": "updated_at",
      "user_id": "user_id"
    }
  },
  "success": true
}
Returns Examples
{
  "data": {
    "participant": {
      "id": "id",
      "created_at": "created_at",
      "custom_participant_id": "custom_participant_id",
      "display_name": "display_name",
      "duration": 0,
      "joined_at": "joined_at",
      "left_at": "left_at",
      "peer_events": [
        {
          "id": "id",
          "created_at": "created_at",
          "event_name": "PEER_CREATED",
          "minutes_consumed": 0,
          "participant_id": "participant_id",
          "peer_id": "peer_id",
          "preset_view_type": "GROUP_CALL",
          "session_id": "session_id",
          "socket_session_id": "socket_session_id",
          "updated_at": "updated_at"
        }
      ],
      "preset_name": "preset_name",
      "updated_at": "updated_at",
      "user_id": "user_id"
    }
  },
  "success": true
}