Skip to content
Start here

Fetch participants list of a session

GET/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants

Returns a list of participants 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
Path ParametersExpand Collapse
account_id: string

The account identifier tag.

maxLength32
app_id: string

The app identifier tag.

maxLength32
session_id: string
Query ParametersExpand Collapse
include_peer_events: optional boolean

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

page_no: optional number

The page number from which you want your page search results to be displayed.

minimum0
per_page: optional number

Number of results per page

minimum0
sort_by: optional "joinedAt" or "duration"
One of the following:
"joinedAt"
"duration"
sort_order: optional "ASC" or "DESC"
One of the following:
"ASC"
"DESC"
view: optional "raw" or "consolidated"

In breakout room sessions, the view parameter can be set to raw for session specific duration for participants or consolidated to accumulate breakout room durations.

One of the following:
"raw"
"consolidated"
ReturnsExpand Collapse
data: optional object { participants }
participants: optional array of object { id, created_at, custom_participant_id, 7 more }
id: optional string

Participant ID. This maps to the corresponding peerId.

created_at: optional string

timestamp when this participant was created.

custom_participant_id: optional string

ID passed by client to create this participant.

display_name: optional string

Display name of participant when joining the session.

duration: optional number

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

joined_at: optional string

timestamp at which participant joined the session.

left_at: optional string

timestamp at which participant left the session.

preset_name: optional string

Name of the preset associated with the participant.

updated_at: optional string

timestamp when this participant's data was last updated.

user_id: optional string

User id for this participant.

success: optional boolean

Fetch participants list of a session

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/realtime/kit/$APP_ID/sessions/$SESSION_ID/participants \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "data": {
    "paging": {
      "end_offset": 2,
      "start_offset": 1,
      "total_count": 123
    },
    "participants": [
      {
        "created_at": "2023-02-01T10:51:08.039Z",
        "custom_participant_id": "83qi0i",
        "display_name": "Mark",
        "duration": 5.8097,
        "id": "005f4e0c-4d08-4d4e-a391-a76be75cd296",
        "joined_at": "2023-02-01T10:51:08.030Z",
        "left_at": "2023-02-01T10:56:56.612Z",
        "preset_name": "webinar_participant",
        "updated_at": "2023-02-01T10:56:56.618Z",
        "user_id": "0a08343d-a9dc-45f0-9feb-6a64afcc4f81"
      },
      {
        "created_at": "2023-02-01T10:50:36.853Z",
        "custom_participant_id": "3uggr",
        "display_name": "Henry",
        "duration": 6.9263,
        "id": "51fdf95f-d893-471a-922b-7db7adb14453",
        "joined_at": "2023-02-01T10:50:36.846Z\"",
        "left_at": "2023-02-01T10:57:32.424Z",
        "preset_name": "webinar_participant",
        "updated_at": "2023-02-01T10:57:32.431Z",
        "user_id": "85e7f0fd-7c16-45e9-9d68-f17ef007c4eb"
      }
    ]
  },
  "success": true
}
{
  "data": {
    "paging": {
      "end_offset": 2,
      "start_offset": 1,
      "total_count": 123
    },
    "participants": [
      {
        "created_at": "2023-02-01T10:51:08.039Z",
        "custom_participant_id": "83qi0i",
        "display_name": "Mark",
        "duration": 5.8097,
        "id": "005f4e0c-4d08-4d4e-a391-a76be75cd296",
        "joined_at": "2023-02-01T10:51:08.030Z",
        "left_at": "2023-02-01T10:56:56.612Z",
        "peer_events": [
          {
            "created_at": "2023-02-01T10:51:50.786Z",
            "event_name": "PEER_JOINING",
            "id": "94af3bac-f30b-40b9-ab45-4b9e6eff191a",
            "peer_id": "79d87ca5-7e47-452a-b3c1-b6842ad84bf5",
            "updated_at": "2023-02-01T10:51:50.792Z"
          },
          {
            "created_at": "2023-02-01T10:56:50.786Z",
            "event_name": "PEER_LEAVING",
            "id": "94af3bac-f30b-40b9-ab45-4b9e6eff191b",
            "peer_id": "79d87ca5-7e47-452a-b3c1-b6842ad84bf5",
            "updated_at": "2023-02-01T10:56:50.792Z"
          }
        ],
        "preset_name": "webinar_participant",
        "updated_at": "2023-02-01T10:56:56.618Z",
        "user_id": "0a08343d-a9dc-45f0-9feb-6a64afcc4f81"
      },
      {
        "created_at": "2023-02-01T10:50:36.853Z",
        "custom_participant_id": "3uggr",
        "display_name": "Henry",
        "duration": 6.9263,
        "id": "51fdf95f-d893-471a-922b-7db7adb14453",
        "joined_at": "2023-02-01T10:50:36.846Z\"",
        "left_at": "2023-02-01T10:57:32.424Z",
        "peer_events": [
          {
            "created_at": "2023-02-01T10:51:50.786Z",
            "event_name": "PEER_JOINING",
            "id": "94af3bac-f30b-40b9-ab45-4b9e6eff191a",
            "peer_id": "51fdf95f-d893-471a-922b-7db7adb14453",
            "updated_at": "2023-02-01T10:51:50.792Z"
          },
          {
            "created_at": "2023-02-01T10:56:50.786Z",
            "event_name": "PEER_LEAVING",
            "id": "94af3bac-f30b-40b9-ab45-4b9e6eff191b",
            "peer_id": "51fdf95f-d893-471a-922b-7db7adb14453",
            "updated_at": "2023-02-01T10:56:50.792Z"
          }
        ],
        "preset_name": "webinar_participant",
        "updated_at": "2023-02-01T10:57:32.431Z",
        "user_id": "85e7f0fd-7c16-45e9-9d68-f17ef007c4eb"
      }
    ]
  },
  "success": true
}
Returns Examples
{
  "data": {
    "paging": {
      "end_offset": 2,
      "start_offset": 1,
      "total_count": 123
    },
    "participants": [
      {
        "created_at": "2023-02-01T10:51:08.039Z",
        "custom_participant_id": "83qi0i",
        "display_name": "Mark",
        "duration": 5.8097,
        "id": "005f4e0c-4d08-4d4e-a391-a76be75cd296",
        "joined_at": "2023-02-01T10:51:08.030Z",
        "left_at": "2023-02-01T10:56:56.612Z",
        "preset_name": "webinar_participant",
        "updated_at": "2023-02-01T10:56:56.618Z",
        "user_id": "0a08343d-a9dc-45f0-9feb-6a64afcc4f81"
      },
      {
        "created_at": "2023-02-01T10:50:36.853Z",
        "custom_participant_id": "3uggr",
        "display_name": "Henry",
        "duration": 6.9263,
        "id": "51fdf95f-d893-471a-922b-7db7adb14453",
        "joined_at": "2023-02-01T10:50:36.846Z\"",
        "left_at": "2023-02-01T10:57:32.424Z",
        "preset_name": "webinar_participant",
        "updated_at": "2023-02-01T10:57:32.431Z",
        "user_id": "85e7f0fd-7c16-45e9-9d68-f17ef007c4eb"
      }
    ]
  },
  "success": true
}
{
  "data": {
    "paging": {
      "end_offset": 2,
      "start_offset": 1,
      "total_count": 123
    },
    "participants": [
      {
        "created_at": "2023-02-01T10:51:08.039Z",
        "custom_participant_id": "83qi0i",
        "display_name": "Mark",
        "duration": 5.8097,
        "id": "005f4e0c-4d08-4d4e-a391-a76be75cd296",
        "joined_at": "2023-02-01T10:51:08.030Z",
        "left_at": "2023-02-01T10:56:56.612Z",
        "peer_events": [
          {
            "created_at": "2023-02-01T10:51:50.786Z",
            "event_name": "PEER_JOINING",
            "id": "94af3bac-f30b-40b9-ab45-4b9e6eff191a",
            "peer_id": "79d87ca5-7e47-452a-b3c1-b6842ad84bf5",
            "updated_at": "2023-02-01T10:51:50.792Z"
          },
          {
            "created_at": "2023-02-01T10:56:50.786Z",
            "event_name": "PEER_LEAVING",
            "id": "94af3bac-f30b-40b9-ab45-4b9e6eff191b",
            "peer_id": "79d87ca5-7e47-452a-b3c1-b6842ad84bf5",
            "updated_at": "2023-02-01T10:56:50.792Z"
          }
        ],
        "preset_name": "webinar_participant",
        "updated_at": "2023-02-01T10:56:56.618Z",
        "user_id": "0a08343d-a9dc-45f0-9feb-6a64afcc4f81"
      },
      {
        "created_at": "2023-02-01T10:50:36.853Z",
        "custom_participant_id": "3uggr",
        "display_name": "Henry",
        "duration": 6.9263,
        "id": "51fdf95f-d893-471a-922b-7db7adb14453",
        "joined_at": "2023-02-01T10:50:36.846Z\"",
        "left_at": "2023-02-01T10:57:32.424Z",
        "peer_events": [
          {
            "created_at": "2023-02-01T10:51:50.786Z",
            "event_name": "PEER_JOINING",
            "id": "94af3bac-f30b-40b9-ab45-4b9e6eff191a",
            "peer_id": "51fdf95f-d893-471a-922b-7db7adb14453",
            "updated_at": "2023-02-01T10:51:50.792Z"
          },
          {
            "created_at": "2023-02-01T10:56:50.786Z",
            "event_name": "PEER_LEAVING",
            "id": "94af3bac-f30b-40b9-ab45-4b9e6eff191b",
            "peer_id": "51fdf95f-d893-471a-922b-7db7adb14453",
            "updated_at": "2023-02-01T10:56:50.792Z"
          }
        ],
        "preset_name": "webinar_participant",
        "updated_at": "2023-02-01T10:57:32.431Z",
        "user_id": "85e7f0fd-7c16-45e9-9d68-f17ef007c4eb"
      }
    ]
  },
  "success": true
}