Skip to content
Start here

Fetch details of a participant

client.RealtimeKit.Sessions.GetSessionParticipantDetails(ctx, appID, sessionID, participantID, params) (*SessionGetSessionParticipantDetailsResponse, error)
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
formatuuid
participantID string
formatuuid
params SessionGetSessionParticipantDetailsParams
AccountID param.Field[string]

Path param: The account identifier tag.

maxLength32

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

const SessionGetSessionParticipantDetailsParamsFiltersDeviceInfo SessionGetSessionParticipantDetailsParamsFilters = "device_info"
const SessionGetSessionParticipantDetailsParamsFiltersIPInformation SessionGetSessionParticipantDetailsParamsFilters = "ip_information"
const SessionGetSessionParticipantDetailsParamsFiltersPrecallNetworkInformation SessionGetSessionParticipantDetailsParamsFilters = "precall_network_information"
const SessionGetSessionParticipantDetailsParamsFiltersEvents SessionGetSessionParticipantDetailsParamsFilters = "events"
const SessionGetSessionParticipantDetailsParamsFiltersQualityStats SessionGetSessionParticipantDetailsParamsFilters = "quality_stats"
IncludePeerEvents param.Field[bool]Optional

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

ReturnsExpand Collapse
type SessionGetSessionParticipantDetailsResponse struct{…}
Data SessionGetSessionParticipantDetailsResponseDataOptional
Participant SessionGetSessionParticipantDetailsResponseDataParticipantOptional
ID stringOptional

Participant ID. This maps to the corresponding peerId.

CreatedAt stringOptional

timestamp when this participant was created.

CustomParticipantID stringOptional

ID passed by client to create this participant.

DisplayName stringOptional

Display name of participant when joining the session.

Duration float64Optional

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

JoinedAt stringOptional

timestamp at which participant joined the session.

LeftAt stringOptional

timestamp at which participant left the session.

PresetName stringOptional

Name of the preset associated with the participant.

UpdatedAt stringOptional

timestamp when this participant’s data was last updated.

UserID stringOptional

User id for this participant.

Success boolOptional

Fetch details of a participant

package main

import (
  "context"
  "fmt"

  "github.com/cloudflare/cloudflare-go"
  "github.com/cloudflare/cloudflare-go/option"
  "github.com/cloudflare/cloudflare-go/realtime_kit"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  response, err := client.RealtimeKit.Sessions.GetSessionParticipantDetails(
    context.TODO(),
    "app_id",
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    realtime_kit.SessionGetSessionParticipantDetailsParams{
      AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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",
      "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",
      "preset_name": "preset_name",
      "updated_at": "updated_at",
      "user_id": "user_id"
    }
  },
  "success": true
}