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 along with call statistics for the given session 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
session_id: str
participant_id: str
filters: Optional[Literal["device_info", "ip_information", "precall_network_information", 2 more]]

Comma separated list of filters to apply. Note that there must be no spaces between the filters.

One of the following:
"device_info"
"ip_information"
"precall_network_information"
"events"
"quality_stats"
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_stats: Optional[DataParticipantPeerStats]
config: Optional[str]
device_info: Optional[DataParticipantPeerStatsDeviceInfo]
browser: Optional[str]
browser_version: Optional[str]
cpus: Optional[float]
engine: Optional[str]
is_mobile: Optional[bool]
memory: Optional[float]
os: Optional[str]
os_version: Optional[str]
sdk_name: Optional[str]
sdk_version: Optional[str]
user_agent: Optional[str]
webgl_support: Optional[str]
events: Optional[List[DataParticipantPeerStatsEvent]]
timestamp: Optional[str]
type: Optional[str]
ip_information: Optional[DataParticipantPeerStatsIPInformation]
city: Optional[str]
country: Optional[str]
ip_location: Optional[str]
ipv4: Optional[str]
org: Optional[str]
portal: Optional[str]
region: Optional[str]
timezone: Optional[str]
precall_network_information: Optional[DataParticipantPeerStatsPrecallNetworkInformation]
backend_rtt: Optional[float]
effective_networktype: Optional[str]
fractional_loss: Optional[float]
jitter: Optional[float]
reflexive_connectivity: Optional[bool]
relay_connectivity: Optional[bool]
rtt: Optional[float]
throughtput: Optional[float]
turn_connectivity: Optional[bool]
status: Optional[str]
preset_name: Optional[str]

Name of the preset associated with the participant.

quality_stats: Optional[List[DataParticipantQualityStat]]
audio_bandwidth: Optional[float]
audio_packet_loss: Optional[float]
audio_stats: Optional[List[DataParticipantQualityStatAudioStat]]
concealment_events: Optional[float]
jitter: Optional[float]
packets_lost: Optional[float]
quality: Optional[float]
timestamp: Optional[str]
average_quality: Optional[float]
end: Optional[str]
peer_id: Optional[str]
start: Optional[str]
video_bandwidth: Optional[float]
video_packet_loss: Optional[float]
video_stats: Optional[List[DataParticipantQualityStatVideoStat]]
frame_height: Optional[float]
frame_width: Optional[float]
frames_dropped: Optional[float]
frames_per_second: Optional[float]
jitter: Optional[float]
packets_lost: Optional[float]
quality: Optional[float]
timestamp: Optional[str]
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="participant_id",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
    app_id="app_id",
    session_id="session_id",
)
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_stats": {
        "config": "config",
        "device_info": {
          "browser": "browser",
          "browser_version": "browser_version",
          "cpus": 0,
          "engine": "engine",
          "is_mobile": true,
          "memory": 0,
          "os": "os",
          "os_version": "os_version",
          "sdk_name": "sdk_name",
          "sdk_version": "sdk_version",
          "user_agent": "user_agent",
          "webgl_support": "webgl_support"
        },
        "events": [
          {
            "timestamp": "timestamp",
            "type": "type"
          }
        ],
        "ip_information": {
          "city": "city",
          "country": "country",
          "ip_location": "ip_location",
          "ipv4": "ipv4",
          "org": "org",
          "portal": "portal",
          "region": "region",
          "timezone": "timezone"
        },
        "precall_network_information": {
          "backend_rtt": 0,
          "effective_networktype": "effective_networktype",
          "fractional_loss": 0,
          "jitter": 0,
          "reflexive_connectivity": true,
          "relay_connectivity": true,
          "rtt": 0,
          "throughtput": 0,
          "turn_connectivity": true
        },
        "status": "status"
      },
      "preset_name": "preset_name",
      "quality_stats": [
        {
          "audio_bandwidth": 0,
          "audio_packet_loss": 0,
          "audio_stats": [
            {
              "concealment_events": 0,
              "jitter": 0,
              "packets_lost": 0,
              "quality": 0,
              "timestamp": "timestamp"
            }
          ],
          "average_quality": 0,
          "end": "end",
          "peer_id": "peer_id",
          "start": "start",
          "video_bandwidth": 0,
          "video_packet_loss": 0,
          "video_stats": [
            {
              "frame_height": 0,
              "frame_width": 0,
              "frames_dropped": 0,
              "frames_per_second": 0,
              "jitter": 0,
              "packets_lost": 0,
              "quality": 0,
              "timestamp": "timestamp"
            }
          ]
        }
      ],
      "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_stats": {
        "config": "config",
        "device_info": {
          "browser": "browser",
          "browser_version": "browser_version",
          "cpus": 0,
          "engine": "engine",
          "is_mobile": true,
          "memory": 0,
          "os": "os",
          "os_version": "os_version",
          "sdk_name": "sdk_name",
          "sdk_version": "sdk_version",
          "user_agent": "user_agent",
          "webgl_support": "webgl_support"
        },
        "events": [
          {
            "timestamp": "timestamp",
            "type": "type"
          }
        ],
        "ip_information": {
          "city": "city",
          "country": "country",
          "ip_location": "ip_location",
          "ipv4": "ipv4",
          "org": "org",
          "portal": "portal",
          "region": "region",
          "timezone": "timezone"
        },
        "precall_network_information": {
          "backend_rtt": 0,
          "effective_networktype": "effective_networktype",
          "fractional_loss": 0,
          "jitter": 0,
          "reflexive_connectivity": true,
          "relay_connectivity": true,
          "rtt": 0,
          "throughtput": 0,
          "turn_connectivity": true
        },
        "status": "status"
      },
      "preset_name": "preset_name",
      "quality_stats": [
        {
          "audio_bandwidth": 0,
          "audio_packet_loss": 0,
          "audio_stats": [
            {
              "concealment_events": 0,
              "jitter": 0,
              "packets_lost": 0,
              "quality": 0,
              "timestamp": "timestamp"
            }
          ],
          "average_quality": 0,
          "end": "end",
          "peer_id": "peer_id",
          "start": "start",
          "video_bandwidth": 0,
          "video_packet_loss": 0,
          "video_stats": [
            {
              "frame_height": 0,
              "frame_width": 0,
              "frames_dropped": 0,
              "frames_per_second": 0,
              "jitter": 0,
              "packets_lost": 0,
              "quality": 0,
              "timestamp": "timestamp"
            }
          ]
        }
      ],
      "updated_at": "updated_at",
      "user_id": "user_id"
    }
  },
  "success": true
}