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 for the given session ID. Use the peer report endpoint to retrieve call statistics.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
Accepted Permissions (at least one required)
Parameters
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(),
"14a396e7-ca44-4937-bf1f-050a69118543",
"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",
"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
}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_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
}