## 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. ### Parameters - `appID string` The app identifier tag. - `sessionID string` - `participantID string` - `params SessionGetSessionParticipantDetailsParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `IncludePeerEvents param.Field[bool]` Query param: if true, response includes all the peer events of participant. ### Returns - `type SessionGetSessionParticipantDetailsResponse struct{…}` - `Data SessionGetSessionParticipantDetailsResponseData` - `Participant SessionGetSessionParticipantDetailsResponseDataParticipant` - `ID string` Participant ID. This maps to the corresponding peerId. - `CreatedAt string` timestamp when this participant was created. - `CustomParticipantID string` ID passed by client to create this participant. - `DisplayName string` Display name of participant when joining the session. - `Duration float64` number of minutes for which the participant was in the session. - `JoinedAt string` timestamp at which participant joined the session. - `LeftAt string` timestamp at which participant left the session. - `PeerEvents []SessionGetSessionParticipantDetailsResponseDataParticipantPeerEvent` Connection lifecycle events for the participant's peer. Only included when `include_peer_events` is true. - `ID string` ID of the peer event. - `CreatedAt string` Timestamp when this peer event was created. - `EventName SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsEventName` Name of the peer event. - `const SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsEventNamePeerCreated SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsEventName = "PEER_CREATED"` - `const SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsEventNamePeerJoining SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsEventName = "PEER_JOINING"` - `const SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsEventNamePeerLeaving SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsEventName = "PEER_LEAVING"` - `MinutesConsumed float64` Minutes consumed attributed to this event. - `ParticipantID string` ID of the participant this event belongs to. - `PeerID string` Peer ID this event belongs to. - `PresetViewType SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsPresetViewType` View type of the preset associated with the peer. - `const SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsPresetViewTypeGroupCall SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsPresetViewType = "GROUP_CALL"` - `const SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsPresetViewTypeWebinar SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsPresetViewType = "WEBINAR"` - `const SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsPresetViewTypeAudioRoom SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsPresetViewType = "AUDIO_ROOM"` - `const SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsPresetViewTypeLivestream SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsPresetViewType = "LIVESTREAM"` - `const SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsPresetViewTypeChat SessionGetSessionParticipantDetailsResponseDataParticipantPeerEventsPresetViewType = "CHAT"` - `SessionID string` ID of the session this event belongs to. - `SocketSessionID string` ID of the socket session associated with this event. - `UpdatedAt string` Timestamp when this peer event was last updated. - `PresetName string` Name of the preset associated with the participant. - `UpdatedAt string` timestamp when this participant's data was last updated. - `UserID string` User id for this participant. - `Success bool` ### Example ```go 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) } ``` #### Response ```json { "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 } ```