Skip to content
Start here

Fetch details of a participant

client.realtimeKit.sessions.getSessionParticipantDetails(stringappId, stringsessionId, stringparticipantId, SessionGetSessionParticipantDetailsParams { account_id, filters, include_peer_events } params, RequestOptionsoptions?): SessionGetSessionParticipantDetailsResponse { data, success }
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
appId: string

The app identifier tag.

maxLength32
sessionId: string
participantId: string
params: SessionGetSessionParticipantDetailsParams { account_id, filters, include_peer_events }
account_id: string

Path param: The account identifier tag.

maxLength32
filters?: "device_info" | "ip_information" | "precall_network_information" | 2 more

Query param: 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?: boolean

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

ReturnsExpand Collapse
SessionGetSessionParticipantDetailsResponse { data, success }
data?: Data { participant }
participant?: Participant { id, created_at, custom_participant_id, 9 more }
id?: string

Participant ID. This maps to the corresponding peerId.

created_at?: string

timestamp when this participant was created.

custom_participant_id?: string

ID passed by client to create this participant.

display_name?: string

Display name of participant when joining the session.

duration?: number

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

joined_at?: string

timestamp at which participant joined the session.

left_at?: string

timestamp at which participant left the session.

peer_stats?: PeerStats { config, device_info, events, 3 more }
config?: string
device_info?: DeviceInfo { browser, browser_version, cpus, 9 more }
browser?: string
browser_version?: string
cpus?: number
engine?: string
is_mobile?: boolean
memory?: number
os?: string
os_version?: string
sdk_name?: string
sdk_version?: string
user_agent?: string
webgl_support?: string
events?: Array<Event>
timestamp?: string
type?: string
ip_information?: IPInformation { city, country, ip_location, 5 more }
city?: string
country?: string
ip_location?: string
ipv4?: string
org?: string
portal?: string
region?: string
timezone?: string
precall_network_information?: PrecallNetworkInformation { backend_rtt, effective_networktype, fractional_loss, 6 more }
backend_rtt?: number
effective_networktype?: string
fractional_loss?: number
jitter?: number
reflexive_connectivity?: boolean
relay_connectivity?: boolean
rtt?: number
throughtput?: number
turn_connectivity?: boolean
status?: string
preset_name?: string

Name of the preset associated with the participant.

quality_stats?: Array<QualityStat>
audio_bandwidth?: number
audio_packet_loss?: number
audio_stats?: Array<AudioStat>
concealment_events?: number
jitter?: number
packets_lost?: number
quality?: number
timestamp?: string
average_quality?: number
end?: string
peer_id?: string
start?: string
video_bandwidth?: number
video_packet_loss?: number
video_stats?: Array<VideoStat>
frame_height?: number
frame_width?: number
frames_dropped?: number
frames_per_second?: number
jitter?: number
packets_lost?: number
quality?: number
timestamp?: string
updated_at?: string

timestamp when this participant’s data was last updated.

user_id?: string

User id for this participant.

success?: boolean

Fetch details of a participant

import Cloudflare from 'cloudflare';

const client = new Cloudflare({
  apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});

const response = await client.realtimeKit.sessions.getSessionParticipantDetails(
  'app_id',
  'session_id',
  'participant_id',
  { account_id: '023e105f4ecef8ad9ca31a8372d0c353' },
);

console.log(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
}