# Realtime Kit # Apps ## Fetch all apps `client.RealtimeKit.Apps.Get(ctx, query) (*AppGetResponse, error)` **get** `/accounts/{account_id}/realtime/kit/apps` Fetch all apps for your account ### Parameters - `query AppGetParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type AppGetResponse struct{…}` - `Data []AppGetResponseData` - `ID string` - `CreatedAt string` - `Name string` - `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"), ) app, err := client.RealtimeKit.Apps.Get(context.TODO(), realtime_kit.AppGetParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", app.Data) } ``` #### Response ```json { "data": [ { "created_at": "2025-01-01T08:16:40.644Z", "id": "my-app-id", "name": "my-first-app" } ], "success": true } ``` ## Create App `client.RealtimeKit.Apps.Post(ctx, params) (*AppPostResponse, error)` **post** `/accounts/{account_id}/realtime/kit/apps` Create new app for your account ### Parameters - `params AppPostParams` - `AccountID param.Field[string]` Path param - `Name param.Field[string]` Body param ### Returns - `type AppPostResponse struct{…}` - `Data AppPostResponseData` - `App AppPostResponseDataApp` - `ID string` - `CreatedAt string` - `Name string` - `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.Apps.Post(context.TODO(), realtime_kit.AppPostParams{ AccountID: cloudflare.F("account_id"), Name: cloudflare.F("name"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "app": { "created_at": "2025-01-01T08:16:40.644Z", "id": "my-app-id", "name": "my-new-app" } }, "success": true } ``` # Meetings ## Fetch all meetings for an App `client.RealtimeKit.Meetings.Get(ctx, appID, params) (*MeetingGetResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings` Returns all meetings for the given App ID. ### Parameters - `appID string` The app identifier tag. - `params MeetingGetParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `EndTime param.Field[Time]` Query param: The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `PageNo param.Field[float64]` Query param: The page number from which you want your page search results to be displayed. - `PerPage param.Field[float64]` Query param: Number of results per page - `Search param.Field[string]` Query param: The search query string. You can search using the meeting ID or title. - `StartTime param.Field[Time]` Query param: The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. ### Returns - `type MeetingGetResponse struct{…}` - `Data []MeetingGetResponseData` - `ID string` ID of the meeting. - `CreatedAt Time` Timestamp the object was created at. The time is returned in ISO format. - `UpdatedAt Time` Timestamp the object was updated at. The time is returned in ISO format. - `LiveStreamOnStart bool` Specifies if the meeting should start getting livestreamed on start. - `PersistChat bool` Specifies if Chat within a meeting should persist for a week. - `RecordOnStart bool` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `SessionKeepAliveTimeInSecs float64` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `Status MeetingGetResponseDataStatus` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `const MeetingGetResponseDataStatusActive MeetingGetResponseDataStatus = "ACTIVE"` - `const MeetingGetResponseDataStatusInactive MeetingGetResponseDataStatus = "INACTIVE"` - `SummarizeOnEnd bool` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `Title string` Title of the meeting. - `Paging MeetingGetResponsePaging` - `EndOffset float64` - `StartOffset float64` - `TotalCount float64` - `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"), ) meeting, err := client.RealtimeKit.Meetings.Get( context.TODO(), "app_id", realtime_kit.MeetingGetParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", meeting.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } ], "paging": { "end_offset": 30, "start_offset": 1, "total_count": 30 }, "success": true } ``` ## Create a meeting `client.RealtimeKit.Meetings.New(ctx, appID, params) (*MeetingNewResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings` Create a meeting for the given App ID. ### Parameters - `appID string` The app identifier tag. - `params MeetingNewParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `AIConfig param.Field[MeetingNewParamsAIConfig]` Body param: The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `Summarization MeetingNewParamsAIConfigSummarization` Summary Config - `SummaryType MeetingNewParamsAIConfigSummarizationSummaryType` Defines the style of the summary, such as general, team meeting, or sales call. - `const MeetingNewParamsAIConfigSummarizationSummaryTypeGeneral MeetingNewParamsAIConfigSummarizationSummaryType = "general"` - `const MeetingNewParamsAIConfigSummarizationSummaryTypeTeamMeeting MeetingNewParamsAIConfigSummarizationSummaryType = "team_meeting"` - `const MeetingNewParamsAIConfigSummarizationSummaryTypeSalesCall MeetingNewParamsAIConfigSummarizationSummaryType = "sales_call"` - `const MeetingNewParamsAIConfigSummarizationSummaryTypeClientCheckIn MeetingNewParamsAIConfigSummarizationSummaryType = "client_check_in"` - `const MeetingNewParamsAIConfigSummarizationSummaryTypeInterview MeetingNewParamsAIConfigSummarizationSummaryType = "interview"` - `const MeetingNewParamsAIConfigSummarizationSummaryTypeDailyStandup MeetingNewParamsAIConfigSummarizationSummaryType = "daily_standup"` - `const MeetingNewParamsAIConfigSummarizationSummaryTypeOneOnOneMeeting MeetingNewParamsAIConfigSummarizationSummaryType = "one_on_one_meeting"` - `const MeetingNewParamsAIConfigSummarizationSummaryTypeLecture MeetingNewParamsAIConfigSummarizationSummaryType = "lecture"` - `const MeetingNewParamsAIConfigSummarizationSummaryTypeCodeReview MeetingNewParamsAIConfigSummarizationSummaryType = "code_review"` - `TextFormat MeetingNewParamsAIConfigSummarizationTextFormat` Determines the text format of the summary, such as plain text or markdown. - `const MeetingNewParamsAIConfigSummarizationTextFormatPlainText MeetingNewParamsAIConfigSummarizationTextFormat = "plain_text"` - `const MeetingNewParamsAIConfigSummarizationTextFormatMarkdown MeetingNewParamsAIConfigSummarizationTextFormat = "markdown"` - `WordLimit int64` Sets the maximum number of words in the meeting summary. - `Transcription MeetingNewParamsAIConfigTranscription` Transcription Configurations - `Keywords []string` Adds specific terms to improve accurate detection during transcription. - `Language MeetingNewParamsAIConfigTranscriptionLanguage` Specifies the language code for transcription to ensure accurate results. - `const MeetingNewParamsAIConfigTranscriptionLanguageEnUs MeetingNewParamsAIConfigTranscriptionLanguage = "en-US"` - `const MeetingNewParamsAIConfigTranscriptionLanguageEnIn MeetingNewParamsAIConfigTranscriptionLanguage = "en-IN"` - `const MeetingNewParamsAIConfigTranscriptionLanguageDe MeetingNewParamsAIConfigTranscriptionLanguage = "de"` - `const MeetingNewParamsAIConfigTranscriptionLanguageHi MeetingNewParamsAIConfigTranscriptionLanguage = "hi"` - `const MeetingNewParamsAIConfigTranscriptionLanguageSv MeetingNewParamsAIConfigTranscriptionLanguage = "sv"` - `const MeetingNewParamsAIConfigTranscriptionLanguageRu MeetingNewParamsAIConfigTranscriptionLanguage = "ru"` - `const MeetingNewParamsAIConfigTranscriptionLanguagePl MeetingNewParamsAIConfigTranscriptionLanguage = "pl"` - `const MeetingNewParamsAIConfigTranscriptionLanguageEl MeetingNewParamsAIConfigTranscriptionLanguage = "el"` - `const MeetingNewParamsAIConfigTranscriptionLanguageFr MeetingNewParamsAIConfigTranscriptionLanguage = "fr"` - `const MeetingNewParamsAIConfigTranscriptionLanguageNl MeetingNewParamsAIConfigTranscriptionLanguage = "nl"` - `ProfanityFilter bool` Control the inclusion of offensive language in transcriptions. - `LiveStreamOnStart param.Field[bool]` Body param: Specifies if the meeting should start getting livestreamed on start. - `PersistChat param.Field[bool]` Body param: If a meeting is set to persist_chat, meeting chat would remain for a week within the meeting space. - `RecordOnStart param.Field[bool]` Body param: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `RecordingConfig param.Field[MeetingNewParamsRecordingConfig]` Body param: Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `AudioConfig MeetingNewParamsRecordingConfigAudioConfig` Object containing configuration regarding the audio that is being recorded. - `Channel MeetingNewParamsRecordingConfigAudioConfigChannel` Audio signal pathway within an audio file that carries a specific sound source. - `const MeetingNewParamsRecordingConfigAudioConfigChannelMono MeetingNewParamsRecordingConfigAudioConfigChannel = "mono"` - `const MeetingNewParamsRecordingConfigAudioConfigChannelStereo MeetingNewParamsRecordingConfigAudioConfigChannel = "stereo"` - `Codec MeetingNewParamsRecordingConfigAudioConfigCodec` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `const MeetingNewParamsRecordingConfigAudioConfigCodecMP3 MeetingNewParamsRecordingConfigAudioConfigCodec = "MP3"` - `const MeetingNewParamsRecordingConfigAudioConfigCodecAac MeetingNewParamsRecordingConfigAudioConfigCodec = "AAC"` - `ExportFile bool` Controls whether to export audio file seperately - `FileNamePrefix string` Adds a prefix to the beginning of the file name of the recording. - `LiveStreamingConfig MeetingNewParamsRecordingConfigLiveStreamingConfig` - `RtmpURL string` RTMP URL to stream to - `MaxSeconds float64` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `RealtimekitBucketConfig MeetingNewParamsRecordingConfigRealtimekitBucketConfig` - `Enabled bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `StorageConfig MeetingNewParamsRecordingConfigStorageConfig` - `Type MeetingNewParamsRecordingConfigStorageConfigType` Type of storage media. - `const MeetingNewParamsRecordingConfigStorageConfigTypeAws MeetingNewParamsRecordingConfigStorageConfigType = "aws"` - `const MeetingNewParamsRecordingConfigStorageConfigTypeAzure MeetingNewParamsRecordingConfigStorageConfigType = "azure"` - `const MeetingNewParamsRecordingConfigStorageConfigTypeDigitalocean MeetingNewParamsRecordingConfigStorageConfigType = "digitalocean"` - `const MeetingNewParamsRecordingConfigStorageConfigTypeGcs MeetingNewParamsRecordingConfigStorageConfigType = "gcs"` - `const MeetingNewParamsRecordingConfigStorageConfigTypeSftp MeetingNewParamsRecordingConfigStorageConfigType = "sftp"` - `AccessKey string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `AuthMethod MeetingNewParamsRecordingConfigStorageConfigAuthMethod` Authentication method used for "sftp" type storage medium - `const MeetingNewParamsRecordingConfigStorageConfigAuthMethodKey MeetingNewParamsRecordingConfigStorageConfigAuthMethod = "KEY"` - `const MeetingNewParamsRecordingConfigStorageConfigAuthMethodPassword MeetingNewParamsRecordingConfigStorageConfigAuthMethod = "PASSWORD"` - `Bucket string` Name of the storage medium's bucket. - `Host string` SSH destination server host for SFTP type storage medium - `Password string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `Path string` Path relative to the bucket root at which the recording will be placed. - `Port float64` SSH destination server port for SFTP type storage medium - `PrivateKey string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `Region string` Region of the storage medium. - `Secret string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `Username string` SSH destination server username for SFTP type storage medium - `VideoConfig MeetingNewParamsRecordingConfigVideoConfig` - `Codec MeetingNewParamsRecordingConfigVideoConfigCodec` Codec using which the recording will be encoded. - `const MeetingNewParamsRecordingConfigVideoConfigCodecH264 MeetingNewParamsRecordingConfigVideoConfigCodec = "H264"` - `const MeetingNewParamsRecordingConfigVideoConfigCodecVp8 MeetingNewParamsRecordingConfigVideoConfigCodec = "VP8"` - `ExportFile bool` Controls whether to export video file seperately - `Height int64` Height of the recording video in pixels - `Watermark MeetingNewParamsRecordingConfigVideoConfigWatermark` Watermark to be added to the recording - `Position MeetingNewParamsRecordingConfigVideoConfigWatermarkPosition` Position of the watermark - `const MeetingNewParamsRecordingConfigVideoConfigWatermarkPositionLeftTop MeetingNewParamsRecordingConfigVideoConfigWatermarkPosition = "left top"` - `const MeetingNewParamsRecordingConfigVideoConfigWatermarkPositionRightTop MeetingNewParamsRecordingConfigVideoConfigWatermarkPosition = "right top"` - `const MeetingNewParamsRecordingConfigVideoConfigWatermarkPositionLeftBottom MeetingNewParamsRecordingConfigVideoConfigWatermarkPosition = "left bottom"` - `const MeetingNewParamsRecordingConfigVideoConfigWatermarkPositionRightBottom MeetingNewParamsRecordingConfigVideoConfigWatermarkPosition = "right bottom"` - `Size MeetingNewParamsRecordingConfigVideoConfigWatermarkSize` Size of the watermark - `Height int64` Height of the watermark in px - `Width int64` Width of the watermark in px - `URL string` URL of the watermark image - `Width int64` Width of the recording video in pixels - `SessionKeepAliveTimeInSecs param.Field[float64]` Body param: Time in seconds, for which a session remains active, after the last participant has left the meeting. - `SummarizeOnEnd param.Field[bool]` Body param: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `Title param.Field[string]` Body param: Title of the meeting ### Returns - `type MeetingNewResponse struct{…}` - `Success bool` Success status of the operation - `Data MeetingNewResponseData` Data returned by the operation - `ID string` ID of the meeting. - `CreatedAt Time` Timestamp the object was created at. The time is returned in ISO format. - `UpdatedAt Time` Timestamp the object was updated at. The time is returned in ISO format. - `AIConfig MeetingNewResponseDataAIConfig` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `Summarization MeetingNewResponseDataAIConfigSummarization` Summary Config - `SummaryType MeetingNewResponseDataAIConfigSummarizationSummaryType` Defines the style of the summary, such as general, team meeting, or sales call. - `const MeetingNewResponseDataAIConfigSummarizationSummaryTypeGeneral MeetingNewResponseDataAIConfigSummarizationSummaryType = "general"` - `const MeetingNewResponseDataAIConfigSummarizationSummaryTypeTeamMeeting MeetingNewResponseDataAIConfigSummarizationSummaryType = "team_meeting"` - `const MeetingNewResponseDataAIConfigSummarizationSummaryTypeSalesCall MeetingNewResponseDataAIConfigSummarizationSummaryType = "sales_call"` - `const MeetingNewResponseDataAIConfigSummarizationSummaryTypeClientCheckIn MeetingNewResponseDataAIConfigSummarizationSummaryType = "client_check_in"` - `const MeetingNewResponseDataAIConfigSummarizationSummaryTypeInterview MeetingNewResponseDataAIConfigSummarizationSummaryType = "interview"` - `const MeetingNewResponseDataAIConfigSummarizationSummaryTypeDailyStandup MeetingNewResponseDataAIConfigSummarizationSummaryType = "daily_standup"` - `const MeetingNewResponseDataAIConfigSummarizationSummaryTypeOneOnOneMeeting MeetingNewResponseDataAIConfigSummarizationSummaryType = "one_on_one_meeting"` - `const MeetingNewResponseDataAIConfigSummarizationSummaryTypeLecture MeetingNewResponseDataAIConfigSummarizationSummaryType = "lecture"` - `const MeetingNewResponseDataAIConfigSummarizationSummaryTypeCodeReview MeetingNewResponseDataAIConfigSummarizationSummaryType = "code_review"` - `TextFormat MeetingNewResponseDataAIConfigSummarizationTextFormat` Determines the text format of the summary, such as plain text or markdown. - `const MeetingNewResponseDataAIConfigSummarizationTextFormatPlainText MeetingNewResponseDataAIConfigSummarizationTextFormat = "plain_text"` - `const MeetingNewResponseDataAIConfigSummarizationTextFormatMarkdown MeetingNewResponseDataAIConfigSummarizationTextFormat = "markdown"` - `WordLimit int64` Sets the maximum number of words in the meeting summary. - `Transcription MeetingNewResponseDataAIConfigTranscription` Transcription Configurations - `Keywords []string` Adds specific terms to improve accurate detection during transcription. - `Language MeetingNewResponseDataAIConfigTranscriptionLanguage` Specifies the language code for transcription to ensure accurate results. - `const MeetingNewResponseDataAIConfigTranscriptionLanguageEnUs MeetingNewResponseDataAIConfigTranscriptionLanguage = "en-US"` - `const MeetingNewResponseDataAIConfigTranscriptionLanguageEnIn MeetingNewResponseDataAIConfigTranscriptionLanguage = "en-IN"` - `const MeetingNewResponseDataAIConfigTranscriptionLanguageDe MeetingNewResponseDataAIConfigTranscriptionLanguage = "de"` - `const MeetingNewResponseDataAIConfigTranscriptionLanguageHi MeetingNewResponseDataAIConfigTranscriptionLanguage = "hi"` - `const MeetingNewResponseDataAIConfigTranscriptionLanguageSv MeetingNewResponseDataAIConfigTranscriptionLanguage = "sv"` - `const MeetingNewResponseDataAIConfigTranscriptionLanguageRu MeetingNewResponseDataAIConfigTranscriptionLanguage = "ru"` - `const MeetingNewResponseDataAIConfigTranscriptionLanguagePl MeetingNewResponseDataAIConfigTranscriptionLanguage = "pl"` - `const MeetingNewResponseDataAIConfigTranscriptionLanguageEl MeetingNewResponseDataAIConfigTranscriptionLanguage = "el"` - `const MeetingNewResponseDataAIConfigTranscriptionLanguageFr MeetingNewResponseDataAIConfigTranscriptionLanguage = "fr"` - `const MeetingNewResponseDataAIConfigTranscriptionLanguageNl MeetingNewResponseDataAIConfigTranscriptionLanguage = "nl"` - `ProfanityFilter bool` Control the inclusion of offensive language in transcriptions. - `LiveStreamOnStart bool` Specifies if the meeting should start getting livestreamed on start. - `PersistChat bool` Specifies if Chat within a meeting should persist for a week. - `RecordOnStart bool` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `RecordingConfig MeetingNewResponseDataRecordingConfig` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `AudioConfig MeetingNewResponseDataRecordingConfigAudioConfig` Object containing configuration regarding the audio that is being recorded. - `Channel MeetingNewResponseDataRecordingConfigAudioConfigChannel` Audio signal pathway within an audio file that carries a specific sound source. - `const MeetingNewResponseDataRecordingConfigAudioConfigChannelMono MeetingNewResponseDataRecordingConfigAudioConfigChannel = "mono"` - `const MeetingNewResponseDataRecordingConfigAudioConfigChannelStereo MeetingNewResponseDataRecordingConfigAudioConfigChannel = "stereo"` - `Codec MeetingNewResponseDataRecordingConfigAudioConfigCodec` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `const MeetingNewResponseDataRecordingConfigAudioConfigCodecMP3 MeetingNewResponseDataRecordingConfigAudioConfigCodec = "MP3"` - `const MeetingNewResponseDataRecordingConfigAudioConfigCodecAac MeetingNewResponseDataRecordingConfigAudioConfigCodec = "AAC"` - `ExportFile bool` Controls whether to export audio file seperately - `FileNamePrefix string` Adds a prefix to the beginning of the file name of the recording. - `LiveStreamingConfig MeetingNewResponseDataRecordingConfigLiveStreamingConfig` - `RtmpURL string` RTMP URL to stream to - `MaxSeconds float64` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `RealtimekitBucketConfig MeetingNewResponseDataRecordingConfigRealtimekitBucketConfig` - `Enabled bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `StorageConfig MeetingNewResponseDataRecordingConfigStorageConfig` - `Type MeetingNewResponseDataRecordingConfigStorageConfigType` Type of storage media. - `const MeetingNewResponseDataRecordingConfigStorageConfigTypeAws MeetingNewResponseDataRecordingConfigStorageConfigType = "aws"` - `const MeetingNewResponseDataRecordingConfigStorageConfigTypeAzure MeetingNewResponseDataRecordingConfigStorageConfigType = "azure"` - `const MeetingNewResponseDataRecordingConfigStorageConfigTypeDigitalocean MeetingNewResponseDataRecordingConfigStorageConfigType = "digitalocean"` - `const MeetingNewResponseDataRecordingConfigStorageConfigTypeGcs MeetingNewResponseDataRecordingConfigStorageConfigType = "gcs"` - `const MeetingNewResponseDataRecordingConfigStorageConfigTypeSftp MeetingNewResponseDataRecordingConfigStorageConfigType = "sftp"` - `AccessKey string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `AuthMethod MeetingNewResponseDataRecordingConfigStorageConfigAuthMethod` Authentication method used for "sftp" type storage medium - `const MeetingNewResponseDataRecordingConfigStorageConfigAuthMethodKey MeetingNewResponseDataRecordingConfigStorageConfigAuthMethod = "KEY"` - `const MeetingNewResponseDataRecordingConfigStorageConfigAuthMethodPassword MeetingNewResponseDataRecordingConfigStorageConfigAuthMethod = "PASSWORD"` - `Bucket string` Name of the storage medium's bucket. - `Host string` SSH destination server host for SFTP type storage medium - `Password string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `Path string` Path relative to the bucket root at which the recording will be placed. - `Port float64` SSH destination server port for SFTP type storage medium - `PrivateKey string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `Region string` Region of the storage medium. - `Secret string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `Username string` SSH destination server username for SFTP type storage medium - `VideoConfig MeetingNewResponseDataRecordingConfigVideoConfig` - `Codec MeetingNewResponseDataRecordingConfigVideoConfigCodec` Codec using which the recording will be encoded. - `const MeetingNewResponseDataRecordingConfigVideoConfigCodecH264 MeetingNewResponseDataRecordingConfigVideoConfigCodec = "H264"` - `const MeetingNewResponseDataRecordingConfigVideoConfigCodecVp8 MeetingNewResponseDataRecordingConfigVideoConfigCodec = "VP8"` - `ExportFile bool` Controls whether to export video file seperately - `Height int64` Height of the recording video in pixels - `Watermark MeetingNewResponseDataRecordingConfigVideoConfigWatermark` Watermark to be added to the recording - `Position MeetingNewResponseDataRecordingConfigVideoConfigWatermarkPosition` Position of the watermark - `const MeetingNewResponseDataRecordingConfigVideoConfigWatermarkPositionLeftTop MeetingNewResponseDataRecordingConfigVideoConfigWatermarkPosition = "left top"` - `const MeetingNewResponseDataRecordingConfigVideoConfigWatermarkPositionRightTop MeetingNewResponseDataRecordingConfigVideoConfigWatermarkPosition = "right top"` - `const MeetingNewResponseDataRecordingConfigVideoConfigWatermarkPositionLeftBottom MeetingNewResponseDataRecordingConfigVideoConfigWatermarkPosition = "left bottom"` - `const MeetingNewResponseDataRecordingConfigVideoConfigWatermarkPositionRightBottom MeetingNewResponseDataRecordingConfigVideoConfigWatermarkPosition = "right bottom"` - `Size MeetingNewResponseDataRecordingConfigVideoConfigWatermarkSize` Size of the watermark - `Height int64` Height of the watermark in px - `Width int64` Width of the watermark in px - `URL string` URL of the watermark image - `Width int64` Width of the recording video in pixels - `SessionKeepAliveTimeInSecs float64` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `Status MeetingNewResponseDataStatus` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `const MeetingNewResponseDataStatusActive MeetingNewResponseDataStatus = "ACTIVE"` - `const MeetingNewResponseDataStatusInactive MeetingNewResponseDataStatus = "INACTIVE"` - `SummarizeOnEnd bool` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `Title string` Title of the meeting. ### 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"), ) meeting, err := client.RealtimeKit.Meetings.New( context.TODO(), "app_id", realtime_kit.MeetingNewParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", meeting.Success) } ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "ai_config": { "summarization": { "summary_type": "general", "text_format": "plain_text", "word_limit": 150 }, "transcription": { "keywords": [ "string" ], "language": "en-US", "profanity_filter": true } }, "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "recording_config": { "audio_config": { "channel": "mono", "codec": "MP3", "export_file": true }, "file_name_prefix": "file_name_prefix", "live_streaming_config": { "rtmp_url": "rtmp://a.rtmp.youtube.com/live2" }, "max_seconds": 60, "realtimekit_bucket_config": { "enabled": true }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" }, "video_config": { "codec": "H264", "export_file": true, "height": 720, "watermark": { "position": "left top", "size": { "height": 1, "width": 1 }, "url": "https://example.com" }, "width": 1280 } }, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } } ``` ## Fetch a meeting for an App `client.RealtimeKit.Meetings.GetMeetingByID(ctx, appID, meetingID, params) (*MeetingGetMeetingByIDResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}` Returns a meeting details in an App for the given meeting ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `params MeetingGetMeetingByIDParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Name param.Field[string]` Query param ### Returns - `type MeetingGetMeetingByIDResponse struct{…}` - `Success bool` Success status of the operation - `Data MeetingGetMeetingByIDResponseData` Data returned by the operation - `ID string` ID of the meeting. - `CreatedAt Time` Timestamp the object was created at. The time is returned in ISO format. - `UpdatedAt Time` Timestamp the object was updated at. The time is returned in ISO format. - `AIConfig MeetingGetMeetingByIDResponseDataAIConfig` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `Summarization MeetingGetMeetingByIDResponseDataAIConfigSummarization` Summary Config - `SummaryType MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryType` Defines the style of the summary, such as general, team meeting, or sales call. - `const MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryTypeGeneral MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryType = "general"` - `const MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryTypeTeamMeeting MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryType = "team_meeting"` - `const MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryTypeSalesCall MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryType = "sales_call"` - `const MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryTypeClientCheckIn MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryType = "client_check_in"` - `const MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryTypeInterview MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryType = "interview"` - `const MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryTypeDailyStandup MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryType = "daily_standup"` - `const MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryTypeOneOnOneMeeting MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryType = "one_on_one_meeting"` - `const MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryTypeLecture MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryType = "lecture"` - `const MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryTypeCodeReview MeetingGetMeetingByIDResponseDataAIConfigSummarizationSummaryType = "code_review"` - `TextFormat MeetingGetMeetingByIDResponseDataAIConfigSummarizationTextFormat` Determines the text format of the summary, such as plain text or markdown. - `const MeetingGetMeetingByIDResponseDataAIConfigSummarizationTextFormatPlainText MeetingGetMeetingByIDResponseDataAIConfigSummarizationTextFormat = "plain_text"` - `const MeetingGetMeetingByIDResponseDataAIConfigSummarizationTextFormatMarkdown MeetingGetMeetingByIDResponseDataAIConfigSummarizationTextFormat = "markdown"` - `WordLimit int64` Sets the maximum number of words in the meeting summary. - `Transcription MeetingGetMeetingByIDResponseDataAIConfigTranscription` Transcription Configurations - `Keywords []string` Adds specific terms to improve accurate detection during transcription. - `Language MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguage` Specifies the language code for transcription to ensure accurate results. - `const MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguageEnUs MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguage = "en-US"` - `const MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguageEnIn MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguage = "en-IN"` - `const MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguageDe MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguage = "de"` - `const MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguageHi MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguage = "hi"` - `const MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguageSv MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguage = "sv"` - `const MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguageRu MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguage = "ru"` - `const MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguagePl MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguage = "pl"` - `const MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguageEl MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguage = "el"` - `const MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguageFr MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguage = "fr"` - `const MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguageNl MeetingGetMeetingByIDResponseDataAIConfigTranscriptionLanguage = "nl"` - `ProfanityFilter bool` Control the inclusion of offensive language in transcriptions. - `LiveStreamOnStart bool` Specifies if the meeting should start getting livestreamed on start. - `PersistChat bool` Specifies if Chat within a meeting should persist for a week. - `RecordOnStart bool` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `RecordingConfig MeetingGetMeetingByIDResponseDataRecordingConfig` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `AudioConfig MeetingGetMeetingByIDResponseDataRecordingConfigAudioConfig` Object containing configuration regarding the audio that is being recorded. - `Channel MeetingGetMeetingByIDResponseDataRecordingConfigAudioConfigChannel` Audio signal pathway within an audio file that carries a specific sound source. - `const MeetingGetMeetingByIDResponseDataRecordingConfigAudioConfigChannelMono MeetingGetMeetingByIDResponseDataRecordingConfigAudioConfigChannel = "mono"` - `const MeetingGetMeetingByIDResponseDataRecordingConfigAudioConfigChannelStereo MeetingGetMeetingByIDResponseDataRecordingConfigAudioConfigChannel = "stereo"` - `Codec MeetingGetMeetingByIDResponseDataRecordingConfigAudioConfigCodec` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `const MeetingGetMeetingByIDResponseDataRecordingConfigAudioConfigCodecMP3 MeetingGetMeetingByIDResponseDataRecordingConfigAudioConfigCodec = "MP3"` - `const MeetingGetMeetingByIDResponseDataRecordingConfigAudioConfigCodecAac MeetingGetMeetingByIDResponseDataRecordingConfigAudioConfigCodec = "AAC"` - `ExportFile bool` Controls whether to export audio file seperately - `FileNamePrefix string` Adds a prefix to the beginning of the file name of the recording. - `LiveStreamingConfig MeetingGetMeetingByIDResponseDataRecordingConfigLiveStreamingConfig` - `RtmpURL string` RTMP URL to stream to - `MaxSeconds float64` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `RealtimekitBucketConfig MeetingGetMeetingByIDResponseDataRecordingConfigRealtimekitBucketConfig` - `Enabled bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `StorageConfig MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfig` - `Type MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigType` Type of storage media. - `const MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigTypeAws MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigType = "aws"` - `const MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigTypeAzure MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigType = "azure"` - `const MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigTypeDigitalocean MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigType = "digitalocean"` - `const MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigTypeGcs MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigType = "gcs"` - `const MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigTypeSftp MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigType = "sftp"` - `AccessKey string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `AuthMethod MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethod` Authentication method used for "sftp" type storage medium - `const MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethodKey MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethod = "KEY"` - `const MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethodPassword MeetingGetMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethod = "PASSWORD"` - `Bucket string` Name of the storage medium's bucket. - `Host string` SSH destination server host for SFTP type storage medium - `Password string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `Path string` Path relative to the bucket root at which the recording will be placed. - `Port float64` SSH destination server port for SFTP type storage medium - `PrivateKey string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `Region string` Region of the storage medium. - `Secret string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `Username string` SSH destination server username for SFTP type storage medium - `VideoConfig MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfig` - `Codec MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigCodec` Codec using which the recording will be encoded. - `const MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigCodecH264 MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigCodec = "H264"` - `const MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigCodecVp8 MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigCodec = "VP8"` - `ExportFile bool` Controls whether to export video file seperately - `Height int64` Height of the recording video in pixels - `Watermark MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigWatermark` Watermark to be added to the recording - `Position MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition` Position of the watermark - `const MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPositionLeftTop MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition = "left top"` - `const MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPositionRightTop MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition = "right top"` - `const MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPositionLeftBottom MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition = "left bottom"` - `const MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPositionRightBottom MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition = "right bottom"` - `Size MeetingGetMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkSize` Size of the watermark - `Height int64` Height of the watermark in px - `Width int64` Width of the watermark in px - `URL string` URL of the watermark image - `Width int64` Width of the recording video in pixels - `SessionKeepAliveTimeInSecs float64` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `Status MeetingGetMeetingByIDResponseDataStatus` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `const MeetingGetMeetingByIDResponseDataStatusActive MeetingGetMeetingByIDResponseDataStatus = "ACTIVE"` - `const MeetingGetMeetingByIDResponseDataStatusInactive MeetingGetMeetingByIDResponseDataStatus = "INACTIVE"` - `SummarizeOnEnd bool` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `Title string` Title of the meeting. ### 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.Meetings.GetMeetingByID( context.TODO(), "app_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", realtime_kit.MeetingGetMeetingByIDParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Success) } ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "ai_config": { "summarization": { "summary_type": "general", "text_format": "plain_text", "word_limit": 150 }, "transcription": { "keywords": [ "string" ], "language": "en-US", "profanity_filter": true } }, "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "recording_config": { "audio_config": { "channel": "mono", "codec": "MP3", "export_file": true }, "file_name_prefix": "file_name_prefix", "live_streaming_config": { "rtmp_url": "rtmp://a.rtmp.youtube.com/live2" }, "max_seconds": 60, "realtimekit_bucket_config": { "enabled": true }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" }, "video_config": { "codec": "H264", "export_file": true, "height": 720, "watermark": { "position": "left top", "size": { "height": 1, "width": 1 }, "url": "https://example.com" }, "width": 1280 } }, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } } ``` ## Update a meeting `client.RealtimeKit.Meetings.UpdateMeetingByID(ctx, appID, meetingID, params) (*MeetingUpdateMeetingByIDResponse, error)` **patch** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}` Updates a meeting in an App for the given meeting ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `params MeetingUpdateMeetingByIDParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `AIConfig param.Field[MeetingUpdateMeetingByIDParamsAIConfig]` Body param: The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `Summarization MeetingUpdateMeetingByIDParamsAIConfigSummarization` Summary Config - `SummaryType MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryType` Defines the style of the summary, such as general, team meeting, or sales call. - `const MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryTypeGeneral MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryType = "general"` - `const MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryTypeTeamMeeting MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryType = "team_meeting"` - `const MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryTypeSalesCall MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryType = "sales_call"` - `const MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryTypeClientCheckIn MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryType = "client_check_in"` - `const MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryTypeInterview MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryType = "interview"` - `const MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryTypeDailyStandup MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryType = "daily_standup"` - `const MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryTypeOneOnOneMeeting MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryType = "one_on_one_meeting"` - `const MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryTypeLecture MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryType = "lecture"` - `const MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryTypeCodeReview MeetingUpdateMeetingByIDParamsAIConfigSummarizationSummaryType = "code_review"` - `TextFormat MeetingUpdateMeetingByIDParamsAIConfigSummarizationTextFormat` Determines the text format of the summary, such as plain text or markdown. - `const MeetingUpdateMeetingByIDParamsAIConfigSummarizationTextFormatPlainText MeetingUpdateMeetingByIDParamsAIConfigSummarizationTextFormat = "plain_text"` - `const MeetingUpdateMeetingByIDParamsAIConfigSummarizationTextFormatMarkdown MeetingUpdateMeetingByIDParamsAIConfigSummarizationTextFormat = "markdown"` - `WordLimit int64` Sets the maximum number of words in the meeting summary. - `Transcription MeetingUpdateMeetingByIDParamsAIConfigTranscription` Transcription Configurations - `Keywords []string` Adds specific terms to improve accurate detection during transcription. - `Language MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguage` Specifies the language code for transcription to ensure accurate results. - `const MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguageEnUs MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguage = "en-US"` - `const MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguageEnIn MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguage = "en-IN"` - `const MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguageDe MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguage = "de"` - `const MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguageHi MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguage = "hi"` - `const MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguageSv MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguage = "sv"` - `const MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguageRu MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguage = "ru"` - `const MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguagePl MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguage = "pl"` - `const MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguageEl MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguage = "el"` - `const MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguageFr MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguage = "fr"` - `const MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguageNl MeetingUpdateMeetingByIDParamsAIConfigTranscriptionLanguage = "nl"` - `ProfanityFilter bool` Control the inclusion of offensive language in transcriptions. - `LiveStreamOnStart param.Field[bool]` Body param: Specifies if the meeting should start getting livestreamed on start. - `PersistChat param.Field[bool]` Body param: If a meeting is updated to persist_chat, meeting chat would remain for a week within the meeting space. - `RecordOnStart param.Field[bool]` Body param: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `SessionKeepAliveTimeInSecs param.Field[float64]` Body param: Time in seconds, for which a session remains active, after the last participant has left the meeting. - `Status param.Field[MeetingUpdateMeetingByIDParamsStatus]` Body param: Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `const MeetingUpdateMeetingByIDParamsStatusActive MeetingUpdateMeetingByIDParamsStatus = "ACTIVE"` - `const MeetingUpdateMeetingByIDParamsStatusInactive MeetingUpdateMeetingByIDParamsStatus = "INACTIVE"` - `SummarizeOnEnd param.Field[bool]` Body param: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `Title param.Field[string]` Body param: Title of the meeting ### Returns - `type MeetingUpdateMeetingByIDResponse struct{…}` - `Success bool` Success status of the operation - `Data MeetingUpdateMeetingByIDResponseData` Data returned by the operation - `ID string` ID of the meeting. - `CreatedAt Time` Timestamp the object was created at. The time is returned in ISO format. - `UpdatedAt Time` Timestamp the object was updated at. The time is returned in ISO format. - `AIConfig MeetingUpdateMeetingByIDResponseDataAIConfig` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `Summarization MeetingUpdateMeetingByIDResponseDataAIConfigSummarization` Summary Config - `SummaryType MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryType` Defines the style of the summary, such as general, team meeting, or sales call. - `const MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryTypeGeneral MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryType = "general"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryTypeTeamMeeting MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryType = "team_meeting"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryTypeSalesCall MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryType = "sales_call"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryTypeClientCheckIn MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryType = "client_check_in"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryTypeInterview MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryType = "interview"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryTypeDailyStandup MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryType = "daily_standup"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryTypeOneOnOneMeeting MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryType = "one_on_one_meeting"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryTypeLecture MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryType = "lecture"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryTypeCodeReview MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationSummaryType = "code_review"` - `TextFormat MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationTextFormat` Determines the text format of the summary, such as plain text or markdown. - `const MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationTextFormatPlainText MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationTextFormat = "plain_text"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationTextFormatMarkdown MeetingUpdateMeetingByIDResponseDataAIConfigSummarizationTextFormat = "markdown"` - `WordLimit int64` Sets the maximum number of words in the meeting summary. - `Transcription MeetingUpdateMeetingByIDResponseDataAIConfigTranscription` Transcription Configurations - `Keywords []string` Adds specific terms to improve accurate detection during transcription. - `Language MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguage` Specifies the language code for transcription to ensure accurate results. - `const MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguageEnUs MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguage = "en-US"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguageEnIn MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguage = "en-IN"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguageDe MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguage = "de"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguageHi MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguage = "hi"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguageSv MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguage = "sv"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguageRu MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguage = "ru"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguagePl MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguage = "pl"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguageEl MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguage = "el"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguageFr MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguage = "fr"` - `const MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguageNl MeetingUpdateMeetingByIDResponseDataAIConfigTranscriptionLanguage = "nl"` - `ProfanityFilter bool` Control the inclusion of offensive language in transcriptions. - `LiveStreamOnStart bool` Specifies if the meeting should start getting livestreamed on start. - `PersistChat bool` Specifies if Chat within a meeting should persist for a week. - `RecordOnStart bool` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `RecordingConfig MeetingUpdateMeetingByIDResponseDataRecordingConfig` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `AudioConfig MeetingUpdateMeetingByIDResponseDataRecordingConfigAudioConfig` Object containing configuration regarding the audio that is being recorded. - `Channel MeetingUpdateMeetingByIDResponseDataRecordingConfigAudioConfigChannel` Audio signal pathway within an audio file that carries a specific sound source. - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigAudioConfigChannelMono MeetingUpdateMeetingByIDResponseDataRecordingConfigAudioConfigChannel = "mono"` - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigAudioConfigChannelStereo MeetingUpdateMeetingByIDResponseDataRecordingConfigAudioConfigChannel = "stereo"` - `Codec MeetingUpdateMeetingByIDResponseDataRecordingConfigAudioConfigCodec` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigAudioConfigCodecMP3 MeetingUpdateMeetingByIDResponseDataRecordingConfigAudioConfigCodec = "MP3"` - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigAudioConfigCodecAac MeetingUpdateMeetingByIDResponseDataRecordingConfigAudioConfigCodec = "AAC"` - `ExportFile bool` Controls whether to export audio file seperately - `FileNamePrefix string` Adds a prefix to the beginning of the file name of the recording. - `LiveStreamingConfig MeetingUpdateMeetingByIDResponseDataRecordingConfigLiveStreamingConfig` - `RtmpURL string` RTMP URL to stream to - `MaxSeconds float64` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `RealtimekitBucketConfig MeetingUpdateMeetingByIDResponseDataRecordingConfigRealtimekitBucketConfig` - `Enabled bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `StorageConfig MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfig` - `Type MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigType` Type of storage media. - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigTypeAws MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigType = "aws"` - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigTypeAzure MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigType = "azure"` - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigTypeDigitalocean MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigType = "digitalocean"` - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigTypeGcs MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigType = "gcs"` - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigTypeSftp MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigType = "sftp"` - `AccessKey string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `AuthMethod MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethod` Authentication method used for "sftp" type storage medium - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethodKey MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethod = "KEY"` - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethodPassword MeetingUpdateMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethod = "PASSWORD"` - `Bucket string` Name of the storage medium's bucket. - `Host string` SSH destination server host for SFTP type storage medium - `Password string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `Path string` Path relative to the bucket root at which the recording will be placed. - `Port float64` SSH destination server port for SFTP type storage medium - `PrivateKey string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `Region string` Region of the storage medium. - `Secret string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `Username string` SSH destination server username for SFTP type storage medium - `VideoConfig MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfig` - `Codec MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigCodec` Codec using which the recording will be encoded. - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigCodecH264 MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigCodec = "H264"` - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigCodecVp8 MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigCodec = "VP8"` - `ExportFile bool` Controls whether to export video file seperately - `Height int64` Height of the recording video in pixels - `Watermark MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigWatermark` Watermark to be added to the recording - `Position MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition` Position of the watermark - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPositionLeftTop MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition = "left top"` - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPositionRightTop MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition = "right top"` - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPositionLeftBottom MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition = "left bottom"` - `const MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPositionRightBottom MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition = "right bottom"` - `Size MeetingUpdateMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkSize` Size of the watermark - `Height int64` Height of the watermark in px - `Width int64` Width of the watermark in px - `URL string` URL of the watermark image - `Width int64` Width of the recording video in pixels - `SessionKeepAliveTimeInSecs float64` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `Status MeetingUpdateMeetingByIDResponseDataStatus` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `const MeetingUpdateMeetingByIDResponseDataStatusActive MeetingUpdateMeetingByIDResponseDataStatus = "ACTIVE"` - `const MeetingUpdateMeetingByIDResponseDataStatusInactive MeetingUpdateMeetingByIDResponseDataStatus = "INACTIVE"` - `SummarizeOnEnd bool` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `Title string` Title of the meeting. ### 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.Meetings.UpdateMeetingByID( context.TODO(), "app_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", realtime_kit.MeetingUpdateMeetingByIDParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Success) } ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "ai_config": { "summarization": { "summary_type": "general", "text_format": "plain_text", "word_limit": 150 }, "transcription": { "keywords": [ "string" ], "language": "en-US", "profanity_filter": true } }, "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "recording_config": { "audio_config": { "channel": "mono", "codec": "MP3", "export_file": true }, "file_name_prefix": "file_name_prefix", "live_streaming_config": { "rtmp_url": "rtmp://a.rtmp.youtube.com/live2" }, "max_seconds": 60, "realtimekit_bucket_config": { "enabled": true }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" }, "video_config": { "codec": "H264", "export_file": true, "height": 720, "watermark": { "position": "left top", "size": { "height": 1, "width": 1 }, "url": "https://example.com" }, "width": 1280 } }, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } } ``` ## Replace a meeting `client.RealtimeKit.Meetings.ReplaceMeetingByID(ctx, appID, meetingID, params) (*MeetingReplaceMeetingByIDResponse, error)` **put** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}` Replaces all the details for the given meeting ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `params MeetingReplaceMeetingByIDParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `AIConfig param.Field[MeetingReplaceMeetingByIDParamsAIConfig]` Body param: The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `Summarization MeetingReplaceMeetingByIDParamsAIConfigSummarization` Summary Config - `SummaryType MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryType` Defines the style of the summary, such as general, team meeting, or sales call. - `const MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryTypeGeneral MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryType = "general"` - `const MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryTypeTeamMeeting MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryType = "team_meeting"` - `const MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryTypeSalesCall MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryType = "sales_call"` - `const MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryTypeClientCheckIn MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryType = "client_check_in"` - `const MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryTypeInterview MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryType = "interview"` - `const MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryTypeDailyStandup MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryType = "daily_standup"` - `const MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryTypeOneOnOneMeeting MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryType = "one_on_one_meeting"` - `const MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryTypeLecture MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryType = "lecture"` - `const MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryTypeCodeReview MeetingReplaceMeetingByIDParamsAIConfigSummarizationSummaryType = "code_review"` - `TextFormat MeetingReplaceMeetingByIDParamsAIConfigSummarizationTextFormat` Determines the text format of the summary, such as plain text or markdown. - `const MeetingReplaceMeetingByIDParamsAIConfigSummarizationTextFormatPlainText MeetingReplaceMeetingByIDParamsAIConfigSummarizationTextFormat = "plain_text"` - `const MeetingReplaceMeetingByIDParamsAIConfigSummarizationTextFormatMarkdown MeetingReplaceMeetingByIDParamsAIConfigSummarizationTextFormat = "markdown"` - `WordLimit int64` Sets the maximum number of words in the meeting summary. - `Transcription MeetingReplaceMeetingByIDParamsAIConfigTranscription` Transcription Configurations - `Keywords []string` Adds specific terms to improve accurate detection during transcription. - `Language MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguage` Specifies the language code for transcription to ensure accurate results. - `const MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguageEnUs MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguage = "en-US"` - `const MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguageEnIn MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguage = "en-IN"` - `const MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguageDe MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguage = "de"` - `const MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguageHi MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguage = "hi"` - `const MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguageSv MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguage = "sv"` - `const MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguageRu MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguage = "ru"` - `const MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguagePl MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguage = "pl"` - `const MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguageEl MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguage = "el"` - `const MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguageFr MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguage = "fr"` - `const MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguageNl MeetingReplaceMeetingByIDParamsAIConfigTranscriptionLanguage = "nl"` - `ProfanityFilter bool` Control the inclusion of offensive language in transcriptions. - `LiveStreamOnStart param.Field[bool]` Body param: Specifies if the meeting should start getting livestreamed on start. - `PersistChat param.Field[bool]` Body param: If a meeting is set to persist_chat, meeting chat would remain for a week within the meeting space. - `RecordOnStart param.Field[bool]` Body param: Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `RecordingConfig param.Field[MeetingReplaceMeetingByIDParamsRecordingConfig]` Body param: Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `AudioConfig MeetingReplaceMeetingByIDParamsRecordingConfigAudioConfig` Object containing configuration regarding the audio that is being recorded. - `Channel MeetingReplaceMeetingByIDParamsRecordingConfigAudioConfigChannel` Audio signal pathway within an audio file that carries a specific sound source. - `const MeetingReplaceMeetingByIDParamsRecordingConfigAudioConfigChannelMono MeetingReplaceMeetingByIDParamsRecordingConfigAudioConfigChannel = "mono"` - `const MeetingReplaceMeetingByIDParamsRecordingConfigAudioConfigChannelStereo MeetingReplaceMeetingByIDParamsRecordingConfigAudioConfigChannel = "stereo"` - `Codec MeetingReplaceMeetingByIDParamsRecordingConfigAudioConfigCodec` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `const MeetingReplaceMeetingByIDParamsRecordingConfigAudioConfigCodecMP3 MeetingReplaceMeetingByIDParamsRecordingConfigAudioConfigCodec = "MP3"` - `const MeetingReplaceMeetingByIDParamsRecordingConfigAudioConfigCodecAac MeetingReplaceMeetingByIDParamsRecordingConfigAudioConfigCodec = "AAC"` - `ExportFile bool` Controls whether to export audio file seperately - `FileNamePrefix string` Adds a prefix to the beginning of the file name of the recording. - `LiveStreamingConfig MeetingReplaceMeetingByIDParamsRecordingConfigLiveStreamingConfig` - `RtmpURL string` RTMP URL to stream to - `MaxSeconds float64` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `RealtimekitBucketConfig MeetingReplaceMeetingByIDParamsRecordingConfigRealtimekitBucketConfig` - `Enabled bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `StorageConfig MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfig` - `Type MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigType` Type of storage media. - `const MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigTypeAws MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigType = "aws"` - `const MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigTypeAzure MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigType = "azure"` - `const MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigTypeDigitalocean MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigType = "digitalocean"` - `const MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigTypeGcs MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigType = "gcs"` - `const MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigTypeSftp MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigType = "sftp"` - `AccessKey string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `AuthMethod MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigAuthMethod` Authentication method used for "sftp" type storage medium - `const MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigAuthMethodKey MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigAuthMethod = "KEY"` - `const MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigAuthMethodPassword MeetingReplaceMeetingByIDParamsRecordingConfigStorageConfigAuthMethod = "PASSWORD"` - `Bucket string` Name of the storage medium's bucket. - `Host string` SSH destination server host for SFTP type storage medium - `Password string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `Path string` Path relative to the bucket root at which the recording will be placed. - `Port float64` SSH destination server port for SFTP type storage medium - `PrivateKey string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `Region string` Region of the storage medium. - `Secret string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `Username string` SSH destination server username for SFTP type storage medium - `VideoConfig MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfig` - `Codec MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigCodec` Codec using which the recording will be encoded. - `const MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigCodecH264 MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigCodec = "H264"` - `const MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigCodecVp8 MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigCodec = "VP8"` - `ExportFile bool` Controls whether to export video file seperately - `Height int64` Height of the recording video in pixels - `Watermark MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigWatermark` Watermark to be added to the recording - `Position MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigWatermarkPosition` Position of the watermark - `const MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigWatermarkPositionLeftTop MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigWatermarkPosition = "left top"` - `const MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigWatermarkPositionRightTop MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigWatermarkPosition = "right top"` - `const MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigWatermarkPositionLeftBottom MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigWatermarkPosition = "left bottom"` - `const MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigWatermarkPositionRightBottom MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigWatermarkPosition = "right bottom"` - `Size MeetingReplaceMeetingByIDParamsRecordingConfigVideoConfigWatermarkSize` Size of the watermark - `Height int64` Height of the watermark in px - `Width int64` Width of the watermark in px - `URL string` URL of the watermark image - `Width int64` Width of the recording video in pixels - `SessionKeepAliveTimeInSecs param.Field[float64]` Body param: Time in seconds, for which a session remains active, after the last participant has left the meeting. - `SummarizeOnEnd param.Field[bool]` Body param: Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `Title param.Field[string]` Body param: Title of the meeting ### Returns - `type MeetingReplaceMeetingByIDResponse struct{…}` - `Success bool` Success status of the operation - `Data MeetingReplaceMeetingByIDResponseData` Data returned by the operation - `ID string` ID of the meeting. - `CreatedAt Time` Timestamp the object was created at. The time is returned in ISO format. - `UpdatedAt Time` Timestamp the object was updated at. The time is returned in ISO format. - `AIConfig MeetingReplaceMeetingByIDResponseDataAIConfig` The AI Config allows you to customize the behavior of meeting transcriptions and summaries - `Summarization MeetingReplaceMeetingByIDResponseDataAIConfigSummarization` Summary Config - `SummaryType MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryType` Defines the style of the summary, such as general, team meeting, or sales call. - `const MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryTypeGeneral MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryType = "general"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryTypeTeamMeeting MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryType = "team_meeting"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryTypeSalesCall MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryType = "sales_call"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryTypeClientCheckIn MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryType = "client_check_in"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryTypeInterview MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryType = "interview"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryTypeDailyStandup MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryType = "daily_standup"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryTypeOneOnOneMeeting MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryType = "one_on_one_meeting"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryTypeLecture MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryType = "lecture"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryTypeCodeReview MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationSummaryType = "code_review"` - `TextFormat MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationTextFormat` Determines the text format of the summary, such as plain text or markdown. - `const MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationTextFormatPlainText MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationTextFormat = "plain_text"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationTextFormatMarkdown MeetingReplaceMeetingByIDResponseDataAIConfigSummarizationTextFormat = "markdown"` - `WordLimit int64` Sets the maximum number of words in the meeting summary. - `Transcription MeetingReplaceMeetingByIDResponseDataAIConfigTranscription` Transcription Configurations - `Keywords []string` Adds specific terms to improve accurate detection during transcription. - `Language MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguage` Specifies the language code for transcription to ensure accurate results. - `const MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguageEnUs MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguage = "en-US"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguageEnIn MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguage = "en-IN"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguageDe MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguage = "de"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguageHi MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguage = "hi"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguageSv MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguage = "sv"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguageRu MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguage = "ru"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguagePl MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguage = "pl"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguageEl MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguage = "el"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguageFr MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguage = "fr"` - `const MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguageNl MeetingReplaceMeetingByIDResponseDataAIConfigTranscriptionLanguage = "nl"` - `ProfanityFilter bool` Control the inclusion of offensive language in transcriptions. - `LiveStreamOnStart bool` Specifies if the meeting should start getting livestreamed on start. - `PersistChat bool` Specifies if Chat within a meeting should persist for a week. - `RecordOnStart bool` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `RecordingConfig MeetingReplaceMeetingByIDResponseDataRecordingConfig` Recording Configurations to be used for this meeting. This level of configs takes higher preference over App level configs on the RealtimeKit developer portal. - `AudioConfig MeetingReplaceMeetingByIDResponseDataRecordingConfigAudioConfig` Object containing configuration regarding the audio that is being recorded. - `Channel MeetingReplaceMeetingByIDResponseDataRecordingConfigAudioConfigChannel` Audio signal pathway within an audio file that carries a specific sound source. - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigAudioConfigChannelMono MeetingReplaceMeetingByIDResponseDataRecordingConfigAudioConfigChannel = "mono"` - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigAudioConfigChannelStereo MeetingReplaceMeetingByIDResponseDataRecordingConfigAudioConfigChannel = "stereo"` - `Codec MeetingReplaceMeetingByIDResponseDataRecordingConfigAudioConfigCodec` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigAudioConfigCodecMP3 MeetingReplaceMeetingByIDResponseDataRecordingConfigAudioConfigCodec = "MP3"` - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigAudioConfigCodecAac MeetingReplaceMeetingByIDResponseDataRecordingConfigAudioConfigCodec = "AAC"` - `ExportFile bool` Controls whether to export audio file seperately - `FileNamePrefix string` Adds a prefix to the beginning of the file name of the recording. - `LiveStreamingConfig MeetingReplaceMeetingByIDResponseDataRecordingConfigLiveStreamingConfig` - `RtmpURL string` RTMP URL to stream to - `MaxSeconds float64` Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `RealtimekitBucketConfig MeetingReplaceMeetingByIDResponseDataRecordingConfigRealtimekitBucketConfig` - `Enabled bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `StorageConfig MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfig` - `Type MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigType` Type of storage media. - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigTypeAws MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigType = "aws"` - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigTypeAzure MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigType = "azure"` - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigTypeDigitalocean MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigType = "digitalocean"` - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigTypeGcs MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigType = "gcs"` - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigTypeSftp MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigType = "sftp"` - `AccessKey string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `AuthMethod MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethod` Authentication method used for "sftp" type storage medium - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethodKey MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethod = "KEY"` - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethodPassword MeetingReplaceMeetingByIDResponseDataRecordingConfigStorageConfigAuthMethod = "PASSWORD"` - `Bucket string` Name of the storage medium's bucket. - `Host string` SSH destination server host for SFTP type storage medium - `Password string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `Path string` Path relative to the bucket root at which the recording will be placed. - `Port float64` SSH destination server port for SFTP type storage medium - `PrivateKey string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `Region string` Region of the storage medium. - `Secret string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `Username string` SSH destination server username for SFTP type storage medium - `VideoConfig MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfig` - `Codec MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigCodec` Codec using which the recording will be encoded. - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigCodecH264 MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigCodec = "H264"` - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigCodecVp8 MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigCodec = "VP8"` - `ExportFile bool` Controls whether to export video file seperately - `Height int64` Height of the recording video in pixels - `Watermark MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigWatermark` Watermark to be added to the recording - `Position MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition` Position of the watermark - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPositionLeftTop MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition = "left top"` - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPositionRightTop MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition = "right top"` - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPositionLeftBottom MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition = "left bottom"` - `const MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPositionRightBottom MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkPosition = "right bottom"` - `Size MeetingReplaceMeetingByIDResponseDataRecordingConfigVideoConfigWatermarkSize` Size of the watermark - `Height int64` Height of the watermark in px - `Width int64` Width of the watermark in px - `URL string` URL of the watermark image - `Width int64` Width of the recording video in pixels - `SessionKeepAliveTimeInSecs float64` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `Status MeetingReplaceMeetingByIDResponseDataStatus` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `const MeetingReplaceMeetingByIDResponseDataStatusActive MeetingReplaceMeetingByIDResponseDataStatus = "ACTIVE"` - `const MeetingReplaceMeetingByIDResponseDataStatusInactive MeetingReplaceMeetingByIDResponseDataStatus = "INACTIVE"` - `SummarizeOnEnd bool` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `Title string` Title of the meeting. ### 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.Meetings.ReplaceMeetingByID( context.TODO(), "app_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", realtime_kit.MeetingReplaceMeetingByIDParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Success) } ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "ai_config": { "summarization": { "summary_type": "general", "text_format": "plain_text", "word_limit": 150 }, "transcription": { "keywords": [ "string" ], "language": "en-US", "profanity_filter": true } }, "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "recording_config": { "audio_config": { "channel": "mono", "codec": "MP3", "export_file": true }, "file_name_prefix": "file_name_prefix", "live_streaming_config": { "rtmp_url": "rtmp://a.rtmp.youtube.com/live2" }, "max_seconds": 60, "realtimekit_bucket_config": { "enabled": true }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" }, "video_config": { "codec": "H264", "export_file": true, "height": 720, "watermark": { "position": "left top", "size": { "height": 1, "width": 1 }, "url": "https://example.com" }, "width": 1280 } }, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" } } ``` ## Fetch all participants of a meeting `client.RealtimeKit.Meetings.GetMeetingParticipants(ctx, appID, meetingID, params) (*MeetingGetMeetingParticipantsResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants` Returns all participants detail for the given meeting ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `params MeetingGetMeetingParticipantsParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `PageNo param.Field[float64]` Query param: The page number from which you want your page search results to be displayed. - `PerPage param.Field[float64]` Query param: Number of results per page ### Returns - `type MeetingGetMeetingParticipantsResponse struct{…}` - `Data []MeetingGetMeetingParticipantsResponseData` - `ID string` ID of the participant. - `CreatedAt Time` When this object was created. The time is returned in ISO format. - `CustomParticipantID string` A unique participant ID generated by the client. - `PresetName string` Preset applied to the participant. - `UpdatedAt Time` When this object was updated. The time is returned in ISO format. - `Name string` Name of the participant. - `Picture string` URL to a picture of the participant. - `Paging MeetingGetMeetingParticipantsResponsePaging` - `EndOffset float64` - `StartOffset float64` - `TotalCount float64` - `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.Meetings.GetMeetingParticipants( context.TODO(), "app_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", realtime_kit.MeetingGetMeetingParticipantsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_name": "preset_name", "updated_at": "2019-12-27T18:11:19.117Z", "name": "name", "picture": "https://example.com" } ], "paging": { "end_offset": 30, "start_offset": 1, "total_count": 30 }, "success": true } ``` ## Add a participant `client.RealtimeKit.Meetings.AddParticipant(ctx, appID, meetingID, params) (*MeetingAddParticipantResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants` Adds a participant to the given meeting ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `params MeetingAddParticipantParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `CustomParticipantID param.Field[string]` Body param: A unique participant ID. You must specify a unique ID for the participant, for example, UUID, email address, and so on. - `PresetName param.Field[string]` Body param: Name of the preset to apply to this participant. - `Name param.Field[string]` Body param: (Optional) Name of the participant. - `Picture param.Field[string]` Body param: (Optional) A URL to a picture to be used for the participant. ### Returns - `type MeetingAddParticipantResponse struct{…}` - `Success bool` Success status of the operation - `Data MeetingAddParticipantResponseData` Represents a participant. - `ID string` ID of the participant. - `Token string` The participant's auth token that can be used for joining a meeting from the client side. - `CreatedAt Time` When this object was created. The time is returned in ISO format. - `CustomParticipantID string` A unique participant ID generated by the client. - `PresetName string` Preset applied to the participant. - `UpdatedAt Time` When this object was updated. The time is returned in ISO format. - `Name string` Name of the participant. - `Picture string` URL to a picture of the participant. ### 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.Meetings.AddParticipant( context.TODO(), "app_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", realtime_kit.MeetingAddParticipantParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), CustomParticipantID: cloudflare.F("custom_participant_id"), PresetName: cloudflare.F("preset_name"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Success) } ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "token": "token", "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_name": "preset_name", "updated_at": "2019-12-27T18:11:19.117Z", "name": "name", "picture": "https://example.com" } } ``` ## Fetch a participant's detail `client.RealtimeKit.Meetings.GetMeetingParticipant(ctx, appID, meetingID, participantID, query) (*MeetingGetMeetingParticipantResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}` Returns a participant details for the given meeting and participant ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `participantID string` - `query MeetingGetMeetingParticipantParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type MeetingGetMeetingParticipantResponse struct{…}` - `Data MeetingGetMeetingParticipantResponseData` Data returned by the operation - `ID string` ID of the participant. - `CreatedAt Time` When this object was created. The time is returned in ISO format. - `CustomParticipantID string` A unique participant ID generated by the client. - `PresetName string` Preset applied to the participant. - `UpdatedAt Time` When this object was updated. The time is returned in ISO format. - `Name string` Name of the participant. - `Picture string` URL to a picture of the participant. - `Success bool` Success status of the operation ### 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.Meetings.GetMeetingParticipant( context.TODO(), "app_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "participant_id", realtime_kit.MeetingGetMeetingParticipantParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_name": "preset_name", "updated_at": "2019-12-27T18:11:19.117Z", "name": "name", "picture": "https://example.com" }, "success": true } ``` ## Edit a participant's detail `client.RealtimeKit.Meetings.EditParticipant(ctx, appID, meetingID, participantID, params) (*MeetingEditParticipantResponse, error)` **patch** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}` Updates a participant's details for the given meeting and participant ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `participantID string` - `params MeetingEditParticipantParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Name param.Field[string]` Body param: (Optional) Name of the participant. - `Picture param.Field[string]` Body param: (Optional) A URL to a picture to be used for the participant. - `PresetName param.Field[string]` Body param: (Optional) Name of the preset to apply to this participant. ### Returns - `type MeetingEditParticipantResponse struct{…}` - `Success bool` Success status of the operation - `Data MeetingEditParticipantResponseData` Represents a participant. - `ID string` ID of the participant. - `Token string` The participant's auth token that can be used for joining a meeting from the client side. - `CreatedAt Time` When this object was created. The time is returned in ISO format. - `CustomParticipantID string` A unique participant ID generated by the client. - `PresetName string` Preset applied to the participant. - `UpdatedAt Time` When this object was updated. The time is returned in ISO format. - `Name string` Name of the participant. - `Picture string` URL to a picture of the participant. ### 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.Meetings.EditParticipant( context.TODO(), "app_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "participant_id", realtime_kit.MeetingEditParticipantParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Success) } ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "token": "token", "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_name": "preset_name", "updated_at": "2019-12-27T18:11:19.117Z", "name": "name", "picture": "https://example.com" } } ``` ## Delete a participant `client.RealtimeKit.Meetings.DeleteMeetingParticipant(ctx, appID, meetingID, participantID, body) (*MeetingDeleteMeetingParticipantResponse, error)` **delete** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}` Deletes a participant for the given meeting and participant ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `participantID string` - `body MeetingDeleteMeetingParticipantParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type MeetingDeleteMeetingParticipantResponse struct{…}` - `Success bool` Success status of the operation - `Data MeetingDeleteMeetingParticipantResponseData` Data returned by the operation - `CreatedAt Time` Timestamp this object was created at. The time is returned in ISO format. - `CustomParticipantID string` A unique participant ID generated by the client. - `PresetID string` ID of the preset applied to this participant. - `UpdatedAt Time` Timestamp this object was updated at. The time is returned in ISO format. ### 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.Meetings.DeleteMeetingParticipant( context.TODO(), "app_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "participant_id", realtime_kit.MeetingDeleteMeetingParticipantParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Success) } ``` #### Response ```json { "success": true, "data": { "created_at": "2019-12-27T18:11:19.117Z", "custom_participant_id": "custom_participant_id", "preset_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updated_at": "2019-12-27T18:11:19.117Z" } } ``` ## Refresh participant's authentication token `client.RealtimeKit.Meetings.RefreshParticipantToken(ctx, appID, meetingID, participantID, body) (*MeetingRefreshParticipantTokenResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/participants/{participant_id}/token` Regenerates participant's authentication token for the given meeting and participant ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `participantID string` - `body MeetingRefreshParticipantTokenParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type MeetingRefreshParticipantTokenResponse struct{…}` - `Data MeetingRefreshParticipantTokenResponseData` Data returned by the operation - `Token string` Regenerated participant's authentication token. - `Success bool` Success status of the operation ### 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.Meetings.RefreshParticipantToken( context.TODO(), "app_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "participant_id", realtime_kit.MeetingRefreshParticipantTokenParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "token": "token" }, "success": true } ``` # Presets ## Fetch all presets `client.RealtimeKit.Presets.Get(ctx, appID, params) (*PresetGetResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/presets` Fetches all the presets belonging to an App. ### Parameters - `appID string` The app identifier tag. - `params PresetGetParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `PageNo param.Field[float64]` Query param: The page number from which you want your page search results to be displayed. - `PerPage param.Field[float64]` Query param: Number of results per page ### Returns - `type PresetGetResponse struct{…}` - `Data []PresetGetResponseData` - `ID string` ID of the preset - `CreatedAt Time` Timestamp this preset was created at - `Name string` Name of the preset - `UpdatedAt Time` Timestamp this preset was last updated - `Paging PresetGetResponsePaging` - `EndOffset float64` - `StartOffset float64` - `TotalCount float64` - `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"), ) preset, err := client.RealtimeKit.Presets.Get( context.TODO(), "app_id", realtime_kit.PresetGetParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", preset.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "name": "name", "updated_at": "2019-12-27T18:11:19.117Z" } ], "paging": { "end_offset": 30, "start_offset": 1, "total_count": 30 }, "success": true } ``` ## Create a preset `client.RealtimeKit.Presets.New(ctx, appID, params) (*PresetNewResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/presets` Creates a preset belonging to the current App ### Parameters - `appID string` The app identifier tag. - `params PresetNewParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Config param.Field[PresetNewParamsConfig]` Body param - `MaxScreenshareCount int64` Maximum number of screen shares that can be active at a given time - `MaxVideoStreams PresetNewParamsConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `Desktop int64` Maximum number of video streams visible on desktop devices - `Mobile int64` Maximum number of streams visible on mobile devices - `Media PresetNewParamsConfigMedia` Media configuration options. eg: Video quality - `Screenshare PresetNewParamsConfigMediaScreenshare` Configuration options for participant screen shares - `FrameRate int64` Frame rate of screen share - `Quality PresetNewParamsConfigMediaScreenshareQuality` Quality of screen share - `const PresetNewParamsConfigMediaScreenshareQualityHD PresetNewParamsConfigMediaScreenshareQuality = "hd"` - `const PresetNewParamsConfigMediaScreenshareQualityVga PresetNewParamsConfigMediaScreenshareQuality = "vga"` - `const PresetNewParamsConfigMediaScreenshareQualityQvga PresetNewParamsConfigMediaScreenshareQuality = "qvga"` - `Video PresetNewParamsConfigMediaVideo` Configuration options for participant videos - `FrameRate int64` Frame rate of participants' video - `Quality PresetNewParamsConfigMediaVideoQuality` Video quality of participants - `const PresetNewParamsConfigMediaVideoQualityHD PresetNewParamsConfigMediaVideoQuality = "hd"` - `const PresetNewParamsConfigMediaVideoQualityVga PresetNewParamsConfigMediaVideoQuality = "vga"` - `const PresetNewParamsConfigMediaVideoQualityQvga PresetNewParamsConfigMediaVideoQuality = "qvga"` - `Audio PresetNewParamsConfigMediaAudio` Control options for Audio quality. - `EnableHighBitrate bool` Enable High Quality Audio for your meetings - `EnableStereo bool` Enable Stereo for your meetings - `ViewType PresetNewParamsConfigViewType` Type of the meeting - `const PresetNewParamsConfigViewTypeGroupCall PresetNewParamsConfigViewType = "GROUP_CALL"` - `const PresetNewParamsConfigViewTypeWebinar PresetNewParamsConfigViewType = "WEBINAR"` - `const PresetNewParamsConfigViewTypeAudioRoom PresetNewParamsConfigViewType = "AUDIO_ROOM"` - `Name param.Field[string]` Body param: Name of the preset - `UI param.Field[PresetNewParamsUI]` Body param - `DesignTokens PresetNewParamsUIDesignTokens` - `BorderRadius PresetNewParamsUIDesignTokensBorderRadius` - `const PresetNewParamsUIDesignTokensBorderRadiusRounded PresetNewParamsUIDesignTokensBorderRadius = "rounded"` - `BorderWidth PresetNewParamsUIDesignTokensBorderWidth` - `const PresetNewParamsUIDesignTokensBorderWidthThin PresetNewParamsUIDesignTokensBorderWidth = "thin"` - `Colors PresetNewParamsUIDesignTokensColors` - `Background PresetNewParamsUIDesignTokensColorsBackground` - `Number1000 string` - `Number600 string` - `Number700 string` - `Number800 string` - `Number900 string` - `Brand PresetNewParamsUIDesignTokensColorsBrand` - `Number300 string` - `Number400 string` - `Number500 string` - `Number600 string` - `Number700 string` - `Danger string` - `Success string` - `Text string` - `TextOnBrand string` - `VideoBg string` - `Warning string` - `Logo string` - `SpacingBase float64` - `Theme PresetNewParamsUIDesignTokensTheme` - `const PresetNewParamsUIDesignTokensThemeDark PresetNewParamsUIDesignTokensTheme = "dark"` - `ConfigDiff unknown` - `Permissions param.Field[PresetNewParamsPermissions]` Body param - `AcceptWaitingRequests bool` Whether this participant can accept waiting requests - `CanAcceptProductionRequests bool` - `CanChangeParticipantPermissions bool` - `CanEditDisplayName bool` - `CanLivestream bool` - `CanRecord bool` - `CanSpotlight bool` - `Chat PresetNewParamsPermissionsChat` Chat permissions - `Private PresetNewParamsPermissionsChatPrivate` - `CanReceive bool` - `CanSend bool` - `Files bool` - `Text bool` - `Public PresetNewParamsPermissionsChatPublic` - `CanSend bool` Can send messages in general - `Files bool` Can send file messages - `Text bool` Can send text messages - `ConnectedMeetings PresetNewParamsPermissionsConnectedMeetings` - `CanAlterConnectedMeetings bool` - `CanSwitchConnectedMeetings bool` - `CanSwitchToParentMeeting bool` - `DisableParticipantAudio bool` - `DisableParticipantScreensharing bool` - `DisableParticipantVideo bool` - `HiddenParticipant bool` Whether this participant is visible to others or not - `KickParticipant bool` - `Media PresetNewParamsPermissionsMedia` Media permissions - `Audio PresetNewParamsPermissionsMediaAudio` Audio permissions - `CanProduce PresetNewParamsPermissionsMediaAudioCanProduce` Can produce audio - `const PresetNewParamsPermissionsMediaAudioCanProduceAllowed PresetNewParamsPermissionsMediaAudioCanProduce = "ALLOWED"` - `const PresetNewParamsPermissionsMediaAudioCanProduceNotAllowed PresetNewParamsPermissionsMediaAudioCanProduce = "NOT_ALLOWED"` - `const PresetNewParamsPermissionsMediaAudioCanProduceCanRequest PresetNewParamsPermissionsMediaAudioCanProduce = "CAN_REQUEST"` - `Screenshare PresetNewParamsPermissionsMediaScreenshare` Screenshare permissions - `CanProduce PresetNewParamsPermissionsMediaScreenshareCanProduce` Can produce screen share video - `const PresetNewParamsPermissionsMediaScreenshareCanProduceAllowed PresetNewParamsPermissionsMediaScreenshareCanProduce = "ALLOWED"` - `const PresetNewParamsPermissionsMediaScreenshareCanProduceNotAllowed PresetNewParamsPermissionsMediaScreenshareCanProduce = "NOT_ALLOWED"` - `const PresetNewParamsPermissionsMediaScreenshareCanProduceCanRequest PresetNewParamsPermissionsMediaScreenshareCanProduce = "CAN_REQUEST"` - `Video PresetNewParamsPermissionsMediaVideo` Video permissions - `CanProduce PresetNewParamsPermissionsMediaVideoCanProduce` Can produce video - `const PresetNewParamsPermissionsMediaVideoCanProduceAllowed PresetNewParamsPermissionsMediaVideoCanProduce = "ALLOWED"` - `const PresetNewParamsPermissionsMediaVideoCanProduceNotAllowed PresetNewParamsPermissionsMediaVideoCanProduce = "NOT_ALLOWED"` - `const PresetNewParamsPermissionsMediaVideoCanProduceCanRequest PresetNewParamsPermissionsMediaVideoCanProduce = "CAN_REQUEST"` - `PinParticipant bool` - `Plugins PresetNewParamsPermissionsPlugins` Plugin permissions - `CanClose bool` Can close plugins that are already open - `CanEditConfig bool` Can edit plugin config - `CanStart bool` Can start plugins - `Config PresetNewParamsPermissionsPluginsConfigUnion` - `UnionString` - `type PresetNewParamsPermissionsPluginsConfigObject struct{…}` - `AccessControl PresetNewParamsPermissionsPluginsConfigObjectAccessControl` - `const PresetNewParamsPermissionsPluginsConfigObjectAccessControlFullAccess PresetNewParamsPermissionsPluginsConfigObjectAccessControl = "FULL_ACCESS"` - `const PresetNewParamsPermissionsPluginsConfigObjectAccessControlViewOnly PresetNewParamsPermissionsPluginsConfigObjectAccessControl = "VIEW_ONLY"` - `HandlesViewOnly bool` - `Polls PresetNewParamsPermissionsPolls` Poll permissions - `CanCreate bool` Can create polls - `CanView bool` Can view polls - `CanVote bool` Can vote on polls - `RecorderType PresetNewParamsPermissionsRecorderType` Type of the recording peer - `const PresetNewParamsPermissionsRecorderTypeRecorder PresetNewParamsPermissionsRecorderType = "RECORDER"` - `const PresetNewParamsPermissionsRecorderTypeLivestreamer PresetNewParamsPermissionsRecorderType = "LIVESTREAMER"` - `const PresetNewParamsPermissionsRecorderTypeNone PresetNewParamsPermissionsRecorderType = "NONE"` - `ShowParticipantList bool` - `WaitingRoomType PresetNewParamsPermissionsWaitingRoomType` Waiting room type - `const PresetNewParamsPermissionsWaitingRoomTypeSkip PresetNewParamsPermissionsWaitingRoomType = "SKIP"` - `const PresetNewParamsPermissionsWaitingRoomTypeOnPrivilegedUserEntry PresetNewParamsPermissionsWaitingRoomType = "ON_PRIVILEGED_USER_ENTRY"` - `const PresetNewParamsPermissionsWaitingRoomTypeSkipOnAccept PresetNewParamsPermissionsWaitingRoomType = "SKIP_ON_ACCEPT"` - `IsRecorder bool` ### Returns - `type PresetNewResponse struct{…}` - `Data PresetNewResponseData` Data returned by the operation - `ID string` ID of the preset - `Config PresetNewResponseDataConfig` - `MaxScreenshareCount int64` Maximum number of screen shares that can be active at a given time - `MaxVideoStreams PresetNewResponseDataConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `Desktop int64` Maximum number of video streams visible on desktop devices - `Mobile int64` Maximum number of streams visible on mobile devices - `Media PresetNewResponseDataConfigMedia` Media configuration options. eg: Video quality - `Screenshare PresetNewResponseDataConfigMediaScreenshare` Configuration options for participant screen shares - `FrameRate int64` Frame rate of screen share - `Quality PresetNewResponseDataConfigMediaScreenshareQuality` Quality of screen share - `const PresetNewResponseDataConfigMediaScreenshareQualityHD PresetNewResponseDataConfigMediaScreenshareQuality = "hd"` - `const PresetNewResponseDataConfigMediaScreenshareQualityVga PresetNewResponseDataConfigMediaScreenshareQuality = "vga"` - `const PresetNewResponseDataConfigMediaScreenshareQualityQvga PresetNewResponseDataConfigMediaScreenshareQuality = "qvga"` - `Video PresetNewResponseDataConfigMediaVideo` Configuration options for participant videos - `FrameRate int64` Frame rate of participants' video - `Quality PresetNewResponseDataConfigMediaVideoQuality` Video quality of participants - `const PresetNewResponseDataConfigMediaVideoQualityHD PresetNewResponseDataConfigMediaVideoQuality = "hd"` - `const PresetNewResponseDataConfigMediaVideoQualityVga PresetNewResponseDataConfigMediaVideoQuality = "vga"` - `const PresetNewResponseDataConfigMediaVideoQualityQvga PresetNewResponseDataConfigMediaVideoQuality = "qvga"` - `Audio PresetNewResponseDataConfigMediaAudio` Control options for Audio quality. - `EnableHighBitrate bool` Enable High Quality Audio for your meetings - `EnableStereo bool` Enable Stereo for your meetings - `ViewType PresetNewResponseDataConfigViewType` Type of the meeting - `const PresetNewResponseDataConfigViewTypeGroupCall PresetNewResponseDataConfigViewType = "GROUP_CALL"` - `const PresetNewResponseDataConfigViewTypeWebinar PresetNewResponseDataConfigViewType = "WEBINAR"` - `const PresetNewResponseDataConfigViewTypeAudioRoom PresetNewResponseDataConfigViewType = "AUDIO_ROOM"` - `Name string` Name of the preset - `UI PresetNewResponseDataUI` - `DesignTokens PresetNewResponseDataUIDesignTokens` - `BorderRadius PresetNewResponseDataUIDesignTokensBorderRadius` - `const PresetNewResponseDataUIDesignTokensBorderRadiusRounded PresetNewResponseDataUIDesignTokensBorderRadius = "rounded"` - `BorderWidth PresetNewResponseDataUIDesignTokensBorderWidth` - `const PresetNewResponseDataUIDesignTokensBorderWidthThin PresetNewResponseDataUIDesignTokensBorderWidth = "thin"` - `Colors PresetNewResponseDataUIDesignTokensColors` - `Background PresetNewResponseDataUIDesignTokensColorsBackground` - `Number1000 string` - `Number600 string` - `Number700 string` - `Number800 string` - `Number900 string` - `Brand PresetNewResponseDataUIDesignTokensColorsBrand` - `Number300 string` - `Number400 string` - `Number500 string` - `Number600 string` - `Number700 string` - `Danger string` - `Success string` - `Text string` - `TextOnBrand string` - `VideoBg string` - `Warning string` - `Logo string` - `SpacingBase float64` - `Theme PresetNewResponseDataUIDesignTokensTheme` - `const PresetNewResponseDataUIDesignTokensThemeDark PresetNewResponseDataUIDesignTokensTheme = "dark"` - `ConfigDiff unknown` - `Permissions PresetNewResponseDataPermissions` - `AcceptWaitingRequests bool` Whether this participant can accept waiting requests - `CanAcceptProductionRequests bool` - `CanChangeParticipantPermissions bool` - `CanEditDisplayName bool` - `CanLivestream bool` - `CanRecord bool` - `CanSpotlight bool` - `Chat PresetNewResponseDataPermissionsChat` Chat permissions - `Private PresetNewResponseDataPermissionsChatPrivate` - `CanReceive bool` - `CanSend bool` - `Files bool` - `Text bool` - `Public PresetNewResponseDataPermissionsChatPublic` - `CanSend bool` Can send messages in general - `Files bool` Can send file messages - `Text bool` Can send text messages - `ConnectedMeetings PresetNewResponseDataPermissionsConnectedMeetings` - `CanAlterConnectedMeetings bool` - `CanSwitchConnectedMeetings bool` - `CanSwitchToParentMeeting bool` - `DisableParticipantAudio bool` - `DisableParticipantScreensharing bool` - `DisableParticipantVideo bool` - `HiddenParticipant bool` Whether this participant is visible to others or not - `KickParticipant bool` - `Media PresetNewResponseDataPermissionsMedia` Media permissions - `Audio PresetNewResponseDataPermissionsMediaAudio` Audio permissions - `CanProduce PresetNewResponseDataPermissionsMediaAudioCanProduce` Can produce audio - `const PresetNewResponseDataPermissionsMediaAudioCanProduceAllowed PresetNewResponseDataPermissionsMediaAudioCanProduce = "ALLOWED"` - `const PresetNewResponseDataPermissionsMediaAudioCanProduceNotAllowed PresetNewResponseDataPermissionsMediaAudioCanProduce = "NOT_ALLOWED"` - `const PresetNewResponseDataPermissionsMediaAudioCanProduceCanRequest PresetNewResponseDataPermissionsMediaAudioCanProduce = "CAN_REQUEST"` - `Screenshare PresetNewResponseDataPermissionsMediaScreenshare` Screenshare permissions - `CanProduce PresetNewResponseDataPermissionsMediaScreenshareCanProduce` Can produce screen share video - `const PresetNewResponseDataPermissionsMediaScreenshareCanProduceAllowed PresetNewResponseDataPermissionsMediaScreenshareCanProduce = "ALLOWED"` - `const PresetNewResponseDataPermissionsMediaScreenshareCanProduceNotAllowed PresetNewResponseDataPermissionsMediaScreenshareCanProduce = "NOT_ALLOWED"` - `const PresetNewResponseDataPermissionsMediaScreenshareCanProduceCanRequest PresetNewResponseDataPermissionsMediaScreenshareCanProduce = "CAN_REQUEST"` - `Video PresetNewResponseDataPermissionsMediaVideo` Video permissions - `CanProduce PresetNewResponseDataPermissionsMediaVideoCanProduce` Can produce video - `const PresetNewResponseDataPermissionsMediaVideoCanProduceAllowed PresetNewResponseDataPermissionsMediaVideoCanProduce = "ALLOWED"` - `const PresetNewResponseDataPermissionsMediaVideoCanProduceNotAllowed PresetNewResponseDataPermissionsMediaVideoCanProduce = "NOT_ALLOWED"` - `const PresetNewResponseDataPermissionsMediaVideoCanProduceCanRequest PresetNewResponseDataPermissionsMediaVideoCanProduce = "CAN_REQUEST"` - `PinParticipant bool` - `Plugins PresetNewResponseDataPermissionsPlugins` Plugin permissions - `CanClose bool` Can close plugins that are already open - `CanEditConfig bool` Can edit plugin config - `CanStart bool` Can start plugins - `Config PresetNewResponseDataPermissionsPluginsConfigUnion` - `UnionString` - `type PresetNewResponseDataPermissionsPluginsConfigObject struct{…}` - `AccessControl PresetNewResponseDataPermissionsPluginsConfigObjectAccessControl` - `const PresetNewResponseDataPermissionsPluginsConfigObjectAccessControlFullAccess PresetNewResponseDataPermissionsPluginsConfigObjectAccessControl = "FULL_ACCESS"` - `const PresetNewResponseDataPermissionsPluginsConfigObjectAccessControlViewOnly PresetNewResponseDataPermissionsPluginsConfigObjectAccessControl = "VIEW_ONLY"` - `HandlesViewOnly bool` - `Polls PresetNewResponseDataPermissionsPolls` Poll permissions - `CanCreate bool` Can create polls - `CanView bool` Can view polls - `CanVote bool` Can vote on polls - `RecorderType PresetNewResponseDataPermissionsRecorderType` Type of the recording peer - `const PresetNewResponseDataPermissionsRecorderTypeRecorder PresetNewResponseDataPermissionsRecorderType = "RECORDER"` - `const PresetNewResponseDataPermissionsRecorderTypeLivestreamer PresetNewResponseDataPermissionsRecorderType = "LIVESTREAMER"` - `const PresetNewResponseDataPermissionsRecorderTypeNone PresetNewResponseDataPermissionsRecorderType = "NONE"` - `ShowParticipantList bool` - `WaitingRoomType PresetNewResponseDataPermissionsWaitingRoomType` Waiting room type - `const PresetNewResponseDataPermissionsWaitingRoomTypeSkip PresetNewResponseDataPermissionsWaitingRoomType = "SKIP"` - `const PresetNewResponseDataPermissionsWaitingRoomTypeOnPrivilegedUserEntry PresetNewResponseDataPermissionsWaitingRoomType = "ON_PRIVILEGED_USER_ENTRY"` - `const PresetNewResponseDataPermissionsWaitingRoomTypeSkipOnAccept PresetNewResponseDataPermissionsWaitingRoomType = "SKIP_ON_ACCEPT"` - `IsRecorder bool` - `Success bool` Success status of the operation ### 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"), ) preset, err := client.RealtimeKit.Presets.New( context.TODO(), "app_id", realtime_kit.PresetNewParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Config: cloudflare.F(realtime_kit.PresetNewParamsConfig{ MaxScreenshareCount: cloudflare.F(int64(0)), MaxVideoStreams: cloudflare.F(realtime_kit.PresetNewParamsConfigMaxVideoStreams{ Desktop: cloudflare.F(int64(0)), Mobile: cloudflare.F(int64(0)), }), Media: cloudflare.F(realtime_kit.PresetNewParamsConfigMedia{ Screenshare: cloudflare.F(realtime_kit.PresetNewParamsConfigMediaScreenshare{ FrameRate: cloudflare.F(int64(0)), Quality: cloudflare.F(realtime_kit.PresetNewParamsConfigMediaScreenshareQualityHD), }), Video: cloudflare.F(realtime_kit.PresetNewParamsConfigMediaVideo{ FrameRate: cloudflare.F(int64(30)), Quality: cloudflare.F(realtime_kit.PresetNewParamsConfigMediaVideoQualityHD), }), }), ViewType: cloudflare.F(realtime_kit.PresetNewParamsConfigViewTypeGroupCall), }), Name: cloudflare.F("name"), UI: cloudflare.F(realtime_kit.PresetNewParamsUI{ DesignTokens: cloudflare.F(realtime_kit.PresetNewParamsUIDesignTokens{ BorderRadius: cloudflare.F(realtime_kit.PresetNewParamsUIDesignTokensBorderRadiusRounded), BorderWidth: cloudflare.F(realtime_kit.PresetNewParamsUIDesignTokensBorderWidthThin), Colors: cloudflare.F(realtime_kit.PresetNewParamsUIDesignTokensColors{ Background: cloudflare.F(realtime_kit.PresetNewParamsUIDesignTokensColorsBackground{ Number600: cloudflare.F("600"), Number700: cloudflare.F("700"), Number800: cloudflare.F("800"), Number900: cloudflare.F("900"), Number1000: cloudflare.F("1000"), }), Brand: cloudflare.F(realtime_kit.PresetNewParamsUIDesignTokensColorsBrand{ Number300: cloudflare.F("300"), Number400: cloudflare.F("400"), Number500: cloudflare.F("500"), Number600: cloudflare.F("600"), Number700: cloudflare.F("700"), }), Danger: cloudflare.F("danger"), Success: cloudflare.F("success"), Text: cloudflare.F("text"), TextOnBrand: cloudflare.F("text_on_brand"), VideoBg: cloudflare.F("video_bg"), Warning: cloudflare.F("warning"), }), Logo: cloudflare.F("logo"), SpacingBase: cloudflare.F(0.000000), Theme: cloudflare.F(realtime_kit.PresetNewParamsUIDesignTokensThemeDark), }), }), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", preset.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "max_screenshare_count": 0, "max_video_streams": { "desktop": 0, "mobile": 0 }, "media": { "screenshare": { "frame_rate": 0, "quality": "hd" }, "video": { "frame_rate": 30, "quality": "hd" }, "audio": { "enable_high_bitrate": true, "enable_stereo": true } }, "view_type": "GROUP_CALL" }, "name": "name", "ui": { "design_tokens": { "border_radius": "rounded", "border_width": "thin", "colors": { "background": { "600": "600", "700": "700", "800": "800", "900": "900", "1000": "1000" }, "brand": { "300": "300", "400": "400", "500": "500", "600": "600", "700": "700" }, "danger": "danger", "success": "success", "text": "text", "text_on_brand": "text_on_brand", "video_bg": "video_bg", "warning": "warning" }, "logo": "logo", "spacing_base": 0, "theme": "dark" }, "config_diff": {} }, "permissions": { "accept_waiting_requests": true, "can_accept_production_requests": true, "can_change_participant_permissions": true, "can_edit_display_name": true, "can_livestream": true, "can_record": true, "can_spotlight": true, "chat": { "private": { "can_receive": true, "can_send": true, "files": true, "text": true }, "public": { "can_send": true, "files": true, "text": true } }, "connected_meetings": { "can_alter_connected_meetings": true, "can_switch_connected_meetings": true, "can_switch_to_parent_meeting": true }, "disable_participant_audio": true, "disable_participant_screensharing": true, "disable_participant_video": true, "hidden_participant": true, "kick_participant": true, "media": { "audio": { "can_produce": "ALLOWED" }, "screenshare": { "can_produce": "ALLOWED" }, "video": { "can_produce": "ALLOWED" } }, "pin_participant": true, "plugins": { "can_close": true, "can_edit_config": true, "can_start": true, "config": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "polls": { "can_create": true, "can_view": true, "can_vote": true }, "recorder_type": "RECORDER", "show_participant_list": true, "waiting_room_type": "SKIP", "is_recorder": true } }, "success": true } ``` ## Fetch details of a preset `client.RealtimeKit.Presets.GetPresetByID(ctx, appID, presetID, query) (*PresetGetPresetByIDResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}` Fetches details of a preset using the provided preset ID ### Parameters - `appID string` The app identifier tag. - `presetID string` - `query PresetGetPresetByIDParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type PresetGetPresetByIDResponse struct{…}` - `Data PresetGetPresetByIDResponseData` Data returned by the operation - `ID string` ID of the preset - `Config PresetGetPresetByIDResponseDataConfig` - `MaxScreenshareCount int64` Maximum number of screen shares that can be active at a given time - `MaxVideoStreams PresetGetPresetByIDResponseDataConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `Desktop int64` Maximum number of video streams visible on desktop devices - `Mobile int64` Maximum number of streams visible on mobile devices - `Media PresetGetPresetByIDResponseDataConfigMedia` Media configuration options. eg: Video quality - `Screenshare PresetGetPresetByIDResponseDataConfigMediaScreenshare` Configuration options for participant screen shares - `FrameRate int64` Frame rate of screen share - `Quality PresetGetPresetByIDResponseDataConfigMediaScreenshareQuality` Quality of screen share - `const PresetGetPresetByIDResponseDataConfigMediaScreenshareQualityHD PresetGetPresetByIDResponseDataConfigMediaScreenshareQuality = "hd"` - `const PresetGetPresetByIDResponseDataConfigMediaScreenshareQualityVga PresetGetPresetByIDResponseDataConfigMediaScreenshareQuality = "vga"` - `const PresetGetPresetByIDResponseDataConfigMediaScreenshareQualityQvga PresetGetPresetByIDResponseDataConfigMediaScreenshareQuality = "qvga"` - `Video PresetGetPresetByIDResponseDataConfigMediaVideo` Configuration options for participant videos - `FrameRate int64` Frame rate of participants' video - `Quality PresetGetPresetByIDResponseDataConfigMediaVideoQuality` Video quality of participants - `const PresetGetPresetByIDResponseDataConfigMediaVideoQualityHD PresetGetPresetByIDResponseDataConfigMediaVideoQuality = "hd"` - `const PresetGetPresetByIDResponseDataConfigMediaVideoQualityVga PresetGetPresetByIDResponseDataConfigMediaVideoQuality = "vga"` - `const PresetGetPresetByIDResponseDataConfigMediaVideoQualityQvga PresetGetPresetByIDResponseDataConfigMediaVideoQuality = "qvga"` - `Audio PresetGetPresetByIDResponseDataConfigMediaAudio` Control options for Audio quality. - `EnableHighBitrate bool` Enable High Quality Audio for your meetings - `EnableStereo bool` Enable Stereo for your meetings - `ViewType PresetGetPresetByIDResponseDataConfigViewType` Type of the meeting - `const PresetGetPresetByIDResponseDataConfigViewTypeGroupCall PresetGetPresetByIDResponseDataConfigViewType = "GROUP_CALL"` - `const PresetGetPresetByIDResponseDataConfigViewTypeWebinar PresetGetPresetByIDResponseDataConfigViewType = "WEBINAR"` - `const PresetGetPresetByIDResponseDataConfigViewTypeAudioRoom PresetGetPresetByIDResponseDataConfigViewType = "AUDIO_ROOM"` - `Name string` Name of the preset - `UI PresetGetPresetByIDResponseDataUI` - `DesignTokens PresetGetPresetByIDResponseDataUIDesignTokens` - `BorderRadius PresetGetPresetByIDResponseDataUIDesignTokensBorderRadius` - `const PresetGetPresetByIDResponseDataUIDesignTokensBorderRadiusRounded PresetGetPresetByIDResponseDataUIDesignTokensBorderRadius = "rounded"` - `BorderWidth PresetGetPresetByIDResponseDataUIDesignTokensBorderWidth` - `const PresetGetPresetByIDResponseDataUIDesignTokensBorderWidthThin PresetGetPresetByIDResponseDataUIDesignTokensBorderWidth = "thin"` - `Colors PresetGetPresetByIDResponseDataUIDesignTokensColors` - `Background PresetGetPresetByIDResponseDataUIDesignTokensColorsBackground` - `Number1000 string` - `Number600 string` - `Number700 string` - `Number800 string` - `Number900 string` - `Brand PresetGetPresetByIDResponseDataUIDesignTokensColorsBrand` - `Number300 string` - `Number400 string` - `Number500 string` - `Number600 string` - `Number700 string` - `Danger string` - `Success string` - `Text string` - `TextOnBrand string` - `VideoBg string` - `Warning string` - `Logo string` - `SpacingBase float64` - `Theme PresetGetPresetByIDResponseDataUIDesignTokensTheme` - `const PresetGetPresetByIDResponseDataUIDesignTokensThemeDark PresetGetPresetByIDResponseDataUIDesignTokensTheme = "dark"` - `ConfigDiff unknown` - `Permissions PresetGetPresetByIDResponseDataPermissions` - `AcceptWaitingRequests bool` Whether this participant can accept waiting requests - `CanAcceptProductionRequests bool` - `CanChangeParticipantPermissions bool` - `CanEditDisplayName bool` - `CanLivestream bool` - `CanRecord bool` - `CanSpotlight bool` - `Chat PresetGetPresetByIDResponseDataPermissionsChat` Chat permissions - `Private PresetGetPresetByIDResponseDataPermissionsChatPrivate` - `CanReceive bool` - `CanSend bool` - `Files bool` - `Text bool` - `Public PresetGetPresetByIDResponseDataPermissionsChatPublic` - `CanSend bool` Can send messages in general - `Files bool` Can send file messages - `Text bool` Can send text messages - `ConnectedMeetings PresetGetPresetByIDResponseDataPermissionsConnectedMeetings` - `CanAlterConnectedMeetings bool` - `CanSwitchConnectedMeetings bool` - `CanSwitchToParentMeeting bool` - `DisableParticipantAudio bool` - `DisableParticipantScreensharing bool` - `DisableParticipantVideo bool` - `HiddenParticipant bool` Whether this participant is visible to others or not - `KickParticipant bool` - `Media PresetGetPresetByIDResponseDataPermissionsMedia` Media permissions - `Audio PresetGetPresetByIDResponseDataPermissionsMediaAudio` Audio permissions - `CanProduce PresetGetPresetByIDResponseDataPermissionsMediaAudioCanProduce` Can produce audio - `const PresetGetPresetByIDResponseDataPermissionsMediaAudioCanProduceAllowed PresetGetPresetByIDResponseDataPermissionsMediaAudioCanProduce = "ALLOWED"` - `const PresetGetPresetByIDResponseDataPermissionsMediaAudioCanProduceNotAllowed PresetGetPresetByIDResponseDataPermissionsMediaAudioCanProduce = "NOT_ALLOWED"` - `const PresetGetPresetByIDResponseDataPermissionsMediaAudioCanProduceCanRequest PresetGetPresetByIDResponseDataPermissionsMediaAudioCanProduce = "CAN_REQUEST"` - `Screenshare PresetGetPresetByIDResponseDataPermissionsMediaScreenshare` Screenshare permissions - `CanProduce PresetGetPresetByIDResponseDataPermissionsMediaScreenshareCanProduce` Can produce screen share video - `const PresetGetPresetByIDResponseDataPermissionsMediaScreenshareCanProduceAllowed PresetGetPresetByIDResponseDataPermissionsMediaScreenshareCanProduce = "ALLOWED"` - `const PresetGetPresetByIDResponseDataPermissionsMediaScreenshareCanProduceNotAllowed PresetGetPresetByIDResponseDataPermissionsMediaScreenshareCanProduce = "NOT_ALLOWED"` - `const PresetGetPresetByIDResponseDataPermissionsMediaScreenshareCanProduceCanRequest PresetGetPresetByIDResponseDataPermissionsMediaScreenshareCanProduce = "CAN_REQUEST"` - `Video PresetGetPresetByIDResponseDataPermissionsMediaVideo` Video permissions - `CanProduce PresetGetPresetByIDResponseDataPermissionsMediaVideoCanProduce` Can produce video - `const PresetGetPresetByIDResponseDataPermissionsMediaVideoCanProduceAllowed PresetGetPresetByIDResponseDataPermissionsMediaVideoCanProduce = "ALLOWED"` - `const PresetGetPresetByIDResponseDataPermissionsMediaVideoCanProduceNotAllowed PresetGetPresetByIDResponseDataPermissionsMediaVideoCanProduce = "NOT_ALLOWED"` - `const PresetGetPresetByIDResponseDataPermissionsMediaVideoCanProduceCanRequest PresetGetPresetByIDResponseDataPermissionsMediaVideoCanProduce = "CAN_REQUEST"` - `PinParticipant bool` - `Plugins PresetGetPresetByIDResponseDataPermissionsPlugins` Plugin permissions - `CanClose bool` Can close plugins that are already open - `CanEditConfig bool` Can edit plugin config - `CanStart bool` Can start plugins - `Config PresetGetPresetByIDResponseDataPermissionsPluginsConfigUnion` - `UnionString` - `type PresetGetPresetByIDResponseDataPermissionsPluginsConfigObject struct{…}` - `AccessControl PresetGetPresetByIDResponseDataPermissionsPluginsConfigObjectAccessControl` - `const PresetGetPresetByIDResponseDataPermissionsPluginsConfigObjectAccessControlFullAccess PresetGetPresetByIDResponseDataPermissionsPluginsConfigObjectAccessControl = "FULL_ACCESS"` - `const PresetGetPresetByIDResponseDataPermissionsPluginsConfigObjectAccessControlViewOnly PresetGetPresetByIDResponseDataPermissionsPluginsConfigObjectAccessControl = "VIEW_ONLY"` - `HandlesViewOnly bool` - `Polls PresetGetPresetByIDResponseDataPermissionsPolls` Poll permissions - `CanCreate bool` Can create polls - `CanView bool` Can view polls - `CanVote bool` Can vote on polls - `RecorderType PresetGetPresetByIDResponseDataPermissionsRecorderType` Type of the recording peer - `const PresetGetPresetByIDResponseDataPermissionsRecorderTypeRecorder PresetGetPresetByIDResponseDataPermissionsRecorderType = "RECORDER"` - `const PresetGetPresetByIDResponseDataPermissionsRecorderTypeLivestreamer PresetGetPresetByIDResponseDataPermissionsRecorderType = "LIVESTREAMER"` - `const PresetGetPresetByIDResponseDataPermissionsRecorderTypeNone PresetGetPresetByIDResponseDataPermissionsRecorderType = "NONE"` - `ShowParticipantList bool` - `WaitingRoomType PresetGetPresetByIDResponseDataPermissionsWaitingRoomType` Waiting room type - `const PresetGetPresetByIDResponseDataPermissionsWaitingRoomTypeSkip PresetGetPresetByIDResponseDataPermissionsWaitingRoomType = "SKIP"` - `const PresetGetPresetByIDResponseDataPermissionsWaitingRoomTypeOnPrivilegedUserEntry PresetGetPresetByIDResponseDataPermissionsWaitingRoomType = "ON_PRIVILEGED_USER_ENTRY"` - `const PresetGetPresetByIDResponseDataPermissionsWaitingRoomTypeSkipOnAccept PresetGetPresetByIDResponseDataPermissionsWaitingRoomType = "SKIP_ON_ACCEPT"` - `IsRecorder bool` - `Success bool` Success status of the operation ### 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.Presets.GetPresetByID( context.TODO(), "app_id", "preset_id", realtime_kit.PresetGetPresetByIDParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "max_screenshare_count": 0, "max_video_streams": { "desktop": 0, "mobile": 0 }, "media": { "screenshare": { "frame_rate": 0, "quality": "hd" }, "video": { "frame_rate": 30, "quality": "hd" }, "audio": { "enable_high_bitrate": true, "enable_stereo": true } }, "view_type": "GROUP_CALL" }, "name": "name", "ui": { "design_tokens": { "border_radius": "rounded", "border_width": "thin", "colors": { "background": { "600": "600", "700": "700", "800": "800", "900": "900", "1000": "1000" }, "brand": { "300": "300", "400": "400", "500": "500", "600": "600", "700": "700" }, "danger": "danger", "success": "success", "text": "text", "text_on_brand": "text_on_brand", "video_bg": "video_bg", "warning": "warning" }, "logo": "logo", "spacing_base": 0, "theme": "dark" }, "config_diff": {} }, "permissions": { "accept_waiting_requests": true, "can_accept_production_requests": true, "can_change_participant_permissions": true, "can_edit_display_name": true, "can_livestream": true, "can_record": true, "can_spotlight": true, "chat": { "private": { "can_receive": true, "can_send": true, "files": true, "text": true }, "public": { "can_send": true, "files": true, "text": true } }, "connected_meetings": { "can_alter_connected_meetings": true, "can_switch_connected_meetings": true, "can_switch_to_parent_meeting": true }, "disable_participant_audio": true, "disable_participant_screensharing": true, "disable_participant_video": true, "hidden_participant": true, "kick_participant": true, "media": { "audio": { "can_produce": "ALLOWED" }, "screenshare": { "can_produce": "ALLOWED" }, "video": { "can_produce": "ALLOWED" } }, "pin_participant": true, "plugins": { "can_close": true, "can_edit_config": true, "can_start": true, "config": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "polls": { "can_create": true, "can_view": true, "can_vote": true }, "recorder_type": "RECORDER", "show_participant_list": true, "waiting_room_type": "SKIP", "is_recorder": true } }, "success": true } ``` ## Delete a preset `client.RealtimeKit.Presets.Delete(ctx, appID, presetID, body) (*PresetDeleteResponse, error)` **delete** `/accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}` Deletes a preset using the provided preset ID ### Parameters - `appID string` The app identifier tag. - `presetID string` - `body PresetDeleteParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type PresetDeleteResponse struct{…}` - `Data PresetDeleteResponseData` Data returned by the operation - `ID string` ID of the preset - `Config PresetDeleteResponseDataConfig` - `MaxScreenshareCount int64` Maximum number of screen shares that can be active at a given time - `MaxVideoStreams PresetDeleteResponseDataConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `Desktop int64` Maximum number of video streams visible on desktop devices - `Mobile int64` Maximum number of streams visible on mobile devices - `Media PresetDeleteResponseDataConfigMedia` Media configuration options. eg: Video quality - `Screenshare PresetDeleteResponseDataConfigMediaScreenshare` Configuration options for participant screen shares - `FrameRate int64` Frame rate of screen share - `Quality PresetDeleteResponseDataConfigMediaScreenshareQuality` Quality of screen share - `const PresetDeleteResponseDataConfigMediaScreenshareQualityHD PresetDeleteResponseDataConfigMediaScreenshareQuality = "hd"` - `const PresetDeleteResponseDataConfigMediaScreenshareQualityVga PresetDeleteResponseDataConfigMediaScreenshareQuality = "vga"` - `const PresetDeleteResponseDataConfigMediaScreenshareQualityQvga PresetDeleteResponseDataConfigMediaScreenshareQuality = "qvga"` - `Video PresetDeleteResponseDataConfigMediaVideo` Configuration options for participant videos - `FrameRate int64` Frame rate of participants' video - `Quality PresetDeleteResponseDataConfigMediaVideoQuality` Video quality of participants - `const PresetDeleteResponseDataConfigMediaVideoQualityHD PresetDeleteResponseDataConfigMediaVideoQuality = "hd"` - `const PresetDeleteResponseDataConfigMediaVideoQualityVga PresetDeleteResponseDataConfigMediaVideoQuality = "vga"` - `const PresetDeleteResponseDataConfigMediaVideoQualityQvga PresetDeleteResponseDataConfigMediaVideoQuality = "qvga"` - `Audio PresetDeleteResponseDataConfigMediaAudio` Control options for Audio quality. - `EnableHighBitrate bool` Enable High Quality Audio for your meetings - `EnableStereo bool` Enable Stereo for your meetings - `ViewType PresetDeleteResponseDataConfigViewType` Type of the meeting - `const PresetDeleteResponseDataConfigViewTypeGroupCall PresetDeleteResponseDataConfigViewType = "GROUP_CALL"` - `const PresetDeleteResponseDataConfigViewTypeWebinar PresetDeleteResponseDataConfigViewType = "WEBINAR"` - `const PresetDeleteResponseDataConfigViewTypeAudioRoom PresetDeleteResponseDataConfigViewType = "AUDIO_ROOM"` - `Name string` Name of the preset - `UI PresetDeleteResponseDataUI` - `DesignTokens PresetDeleteResponseDataUIDesignTokens` - `BorderRadius PresetDeleteResponseDataUIDesignTokensBorderRadius` - `const PresetDeleteResponseDataUIDesignTokensBorderRadiusRounded PresetDeleteResponseDataUIDesignTokensBorderRadius = "rounded"` - `BorderWidth PresetDeleteResponseDataUIDesignTokensBorderWidth` - `const PresetDeleteResponseDataUIDesignTokensBorderWidthThin PresetDeleteResponseDataUIDesignTokensBorderWidth = "thin"` - `Colors PresetDeleteResponseDataUIDesignTokensColors` - `Background PresetDeleteResponseDataUIDesignTokensColorsBackground` - `Number1000 string` - `Number600 string` - `Number700 string` - `Number800 string` - `Number900 string` - `Brand PresetDeleteResponseDataUIDesignTokensColorsBrand` - `Number300 string` - `Number400 string` - `Number500 string` - `Number600 string` - `Number700 string` - `Danger string` - `Success string` - `Text string` - `TextOnBrand string` - `VideoBg string` - `Warning string` - `Logo string` - `SpacingBase float64` - `Theme PresetDeleteResponseDataUIDesignTokensTheme` - `const PresetDeleteResponseDataUIDesignTokensThemeDark PresetDeleteResponseDataUIDesignTokensTheme = "dark"` - `ConfigDiff unknown` - `Permissions PresetDeleteResponseDataPermissions` - `AcceptWaitingRequests bool` Whether this participant can accept waiting requests - `CanAcceptProductionRequests bool` - `CanChangeParticipantPermissions bool` - `CanEditDisplayName bool` - `CanLivestream bool` - `CanRecord bool` - `CanSpotlight bool` - `Chat PresetDeleteResponseDataPermissionsChat` Chat permissions - `Private PresetDeleteResponseDataPermissionsChatPrivate` - `CanReceive bool` - `CanSend bool` - `Files bool` - `Text bool` - `Public PresetDeleteResponseDataPermissionsChatPublic` - `CanSend bool` Can send messages in general - `Files bool` Can send file messages - `Text bool` Can send text messages - `ConnectedMeetings PresetDeleteResponseDataPermissionsConnectedMeetings` - `CanAlterConnectedMeetings bool` - `CanSwitchConnectedMeetings bool` - `CanSwitchToParentMeeting bool` - `DisableParticipantAudio bool` - `DisableParticipantScreensharing bool` - `DisableParticipantVideo bool` - `HiddenParticipant bool` Whether this participant is visible to others or not - `KickParticipant bool` - `Media PresetDeleteResponseDataPermissionsMedia` Media permissions - `Audio PresetDeleteResponseDataPermissionsMediaAudio` Audio permissions - `CanProduce PresetDeleteResponseDataPermissionsMediaAudioCanProduce` Can produce audio - `const PresetDeleteResponseDataPermissionsMediaAudioCanProduceAllowed PresetDeleteResponseDataPermissionsMediaAudioCanProduce = "ALLOWED"` - `const PresetDeleteResponseDataPermissionsMediaAudioCanProduceNotAllowed PresetDeleteResponseDataPermissionsMediaAudioCanProduce = "NOT_ALLOWED"` - `const PresetDeleteResponseDataPermissionsMediaAudioCanProduceCanRequest PresetDeleteResponseDataPermissionsMediaAudioCanProduce = "CAN_REQUEST"` - `Screenshare PresetDeleteResponseDataPermissionsMediaScreenshare` Screenshare permissions - `CanProduce PresetDeleteResponseDataPermissionsMediaScreenshareCanProduce` Can produce screen share video - `const PresetDeleteResponseDataPermissionsMediaScreenshareCanProduceAllowed PresetDeleteResponseDataPermissionsMediaScreenshareCanProduce = "ALLOWED"` - `const PresetDeleteResponseDataPermissionsMediaScreenshareCanProduceNotAllowed PresetDeleteResponseDataPermissionsMediaScreenshareCanProduce = "NOT_ALLOWED"` - `const PresetDeleteResponseDataPermissionsMediaScreenshareCanProduceCanRequest PresetDeleteResponseDataPermissionsMediaScreenshareCanProduce = "CAN_REQUEST"` - `Video PresetDeleteResponseDataPermissionsMediaVideo` Video permissions - `CanProduce PresetDeleteResponseDataPermissionsMediaVideoCanProduce` Can produce video - `const PresetDeleteResponseDataPermissionsMediaVideoCanProduceAllowed PresetDeleteResponseDataPermissionsMediaVideoCanProduce = "ALLOWED"` - `const PresetDeleteResponseDataPermissionsMediaVideoCanProduceNotAllowed PresetDeleteResponseDataPermissionsMediaVideoCanProduce = "NOT_ALLOWED"` - `const PresetDeleteResponseDataPermissionsMediaVideoCanProduceCanRequest PresetDeleteResponseDataPermissionsMediaVideoCanProduce = "CAN_REQUEST"` - `PinParticipant bool` - `Plugins PresetDeleteResponseDataPermissionsPlugins` Plugin permissions - `CanClose bool` Can close plugins that are already open - `CanEditConfig bool` Can edit plugin config - `CanStart bool` Can start plugins - `Config PresetDeleteResponseDataPermissionsPluginsConfigUnion` - `UnionString` - `type PresetDeleteResponseDataPermissionsPluginsConfigObject struct{…}` - `AccessControl PresetDeleteResponseDataPermissionsPluginsConfigObjectAccessControl` - `const PresetDeleteResponseDataPermissionsPluginsConfigObjectAccessControlFullAccess PresetDeleteResponseDataPermissionsPluginsConfigObjectAccessControl = "FULL_ACCESS"` - `const PresetDeleteResponseDataPermissionsPluginsConfigObjectAccessControlViewOnly PresetDeleteResponseDataPermissionsPluginsConfigObjectAccessControl = "VIEW_ONLY"` - `HandlesViewOnly bool` - `Polls PresetDeleteResponseDataPermissionsPolls` Poll permissions - `CanCreate bool` Can create polls - `CanView bool` Can view polls - `CanVote bool` Can vote on polls - `RecorderType PresetDeleteResponseDataPermissionsRecorderType` Type of the recording peer - `const PresetDeleteResponseDataPermissionsRecorderTypeRecorder PresetDeleteResponseDataPermissionsRecorderType = "RECORDER"` - `const PresetDeleteResponseDataPermissionsRecorderTypeLivestreamer PresetDeleteResponseDataPermissionsRecorderType = "LIVESTREAMER"` - `const PresetDeleteResponseDataPermissionsRecorderTypeNone PresetDeleteResponseDataPermissionsRecorderType = "NONE"` - `ShowParticipantList bool` - `WaitingRoomType PresetDeleteResponseDataPermissionsWaitingRoomType` Waiting room type - `const PresetDeleteResponseDataPermissionsWaitingRoomTypeSkip PresetDeleteResponseDataPermissionsWaitingRoomType = "SKIP"` - `const PresetDeleteResponseDataPermissionsWaitingRoomTypeOnPrivilegedUserEntry PresetDeleteResponseDataPermissionsWaitingRoomType = "ON_PRIVILEGED_USER_ENTRY"` - `const PresetDeleteResponseDataPermissionsWaitingRoomTypeSkipOnAccept PresetDeleteResponseDataPermissionsWaitingRoomType = "SKIP_ON_ACCEPT"` - `IsRecorder bool` - `Success bool` Success status of the operation ### 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"), ) preset, err := client.RealtimeKit.Presets.Delete( context.TODO(), "app_id", "preset_id", realtime_kit.PresetDeleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", preset.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "max_screenshare_count": 0, "max_video_streams": { "desktop": 0, "mobile": 0 }, "media": { "screenshare": { "frame_rate": 0, "quality": "hd" }, "video": { "frame_rate": 30, "quality": "hd" }, "audio": { "enable_high_bitrate": true, "enable_stereo": true } }, "view_type": "GROUP_CALL" }, "name": "name", "ui": { "design_tokens": { "border_radius": "rounded", "border_width": "thin", "colors": { "background": { "600": "600", "700": "700", "800": "800", "900": "900", "1000": "1000" }, "brand": { "300": "300", "400": "400", "500": "500", "600": "600", "700": "700" }, "danger": "danger", "success": "success", "text": "text", "text_on_brand": "text_on_brand", "video_bg": "video_bg", "warning": "warning" }, "logo": "logo", "spacing_base": 0, "theme": "dark" }, "config_diff": {} }, "permissions": { "accept_waiting_requests": true, "can_accept_production_requests": true, "can_change_participant_permissions": true, "can_edit_display_name": true, "can_livestream": true, "can_record": true, "can_spotlight": true, "chat": { "private": { "can_receive": true, "can_send": true, "files": true, "text": true }, "public": { "can_send": true, "files": true, "text": true } }, "connected_meetings": { "can_alter_connected_meetings": true, "can_switch_connected_meetings": true, "can_switch_to_parent_meeting": true }, "disable_participant_audio": true, "disable_participant_screensharing": true, "disable_participant_video": true, "hidden_participant": true, "kick_participant": true, "media": { "audio": { "can_produce": "ALLOWED" }, "screenshare": { "can_produce": "ALLOWED" }, "video": { "can_produce": "ALLOWED" } }, "pin_participant": true, "plugins": { "can_close": true, "can_edit_config": true, "can_start": true, "config": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "polls": { "can_create": true, "can_view": true, "can_vote": true }, "recorder_type": "RECORDER", "show_participant_list": true, "waiting_room_type": "SKIP", "is_recorder": true } }, "success": true } ``` ## Update a preset `client.RealtimeKit.Presets.Update(ctx, appID, presetID, params) (*PresetUpdateResponse, error)` **patch** `/accounts/{account_id}/realtime/kit/{app_id}/presets/{preset_id}` Update a preset by the provided preset ID ### Parameters - `appID string` The app identifier tag. - `presetID string` - `params PresetUpdateParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Config param.Field[PresetUpdateParamsConfig]` Body param - `MaxScreenshareCount int64` Maximum number of screen shares that can be active at a given time - `MaxVideoStreams PresetUpdateParamsConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `Desktop int64` Maximum number of video streams visible on desktop devices - `Mobile int64` Maximum number of streams visible on mobile devices - `Media PresetUpdateParamsConfigMedia` Media configuration options. eg: Video quality - `Screenshare PresetUpdateParamsConfigMediaScreenshare` Configuration options for participant screen shares - `FrameRate int64` Frame rate of screen share - `Quality PresetUpdateParamsConfigMediaScreenshareQuality` Quality of screen share - `const PresetUpdateParamsConfigMediaScreenshareQualityHD PresetUpdateParamsConfigMediaScreenshareQuality = "hd"` - `const PresetUpdateParamsConfigMediaScreenshareQualityVga PresetUpdateParamsConfigMediaScreenshareQuality = "vga"` - `const PresetUpdateParamsConfigMediaScreenshareQualityQvga PresetUpdateParamsConfigMediaScreenshareQuality = "qvga"` - `Video PresetUpdateParamsConfigMediaVideo` Configuration options for participant videos - `FrameRate int64` Frame rate of participants' video - `Quality PresetUpdateParamsConfigMediaVideoQuality` Video quality of participants - `const PresetUpdateParamsConfigMediaVideoQualityHD PresetUpdateParamsConfigMediaVideoQuality = "hd"` - `const PresetUpdateParamsConfigMediaVideoQualityVga PresetUpdateParamsConfigMediaVideoQuality = "vga"` - `const PresetUpdateParamsConfigMediaVideoQualityQvga PresetUpdateParamsConfigMediaVideoQuality = "qvga"` - `ViewType PresetUpdateParamsConfigViewType` Type of the meeting - `const PresetUpdateParamsConfigViewTypeGroupCall PresetUpdateParamsConfigViewType = "GROUP_CALL"` - `const PresetUpdateParamsConfigViewTypeWebinar PresetUpdateParamsConfigViewType = "WEBINAR"` - `const PresetUpdateParamsConfigViewTypeAudioRoom PresetUpdateParamsConfigViewType = "AUDIO_ROOM"` - `Name param.Field[string]` Body param: Name of the preset - `Permissions param.Field[PresetUpdateParamsPermissions]` Body param - `AcceptWaitingRequests bool` Whether this participant can accept waiting requests - `CanAcceptProductionRequests bool` - `CanChangeParticipantPermissions bool` - `CanEditDisplayName bool` - `CanLivestream bool` - `CanRecord bool` - `CanSpotlight bool` - `Chat PresetUpdateParamsPermissionsChat` Chat permissions - `Private PresetUpdateParamsPermissionsChatPrivate` - `CanReceive bool` - `CanSend bool` - `Files bool` - `Text bool` - `Public PresetUpdateParamsPermissionsChatPublic` - `CanSend bool` Can send messages in general - `Files bool` Can send file messages - `Text bool` Can send text messages - `ConnectedMeetings PresetUpdateParamsPermissionsConnectedMeetings` - `CanAlterConnectedMeetings bool` - `CanSwitchConnectedMeetings bool` - `CanSwitchToParentMeeting bool` - `DisableParticipantAudio bool` - `DisableParticipantScreensharing bool` - `DisableParticipantVideo bool` - `HiddenParticipant bool` Whether this participant is visible to others or not - `IsRecorder bool` - `KickParticipant bool` - `Media PresetUpdateParamsPermissionsMedia` Media permissions - `Audio PresetUpdateParamsPermissionsMediaAudio` Audio permissions - `CanProduce PresetUpdateParamsPermissionsMediaAudioCanProduce` Can produce audio - `const PresetUpdateParamsPermissionsMediaAudioCanProduceAllowed PresetUpdateParamsPermissionsMediaAudioCanProduce = "ALLOWED"` - `const PresetUpdateParamsPermissionsMediaAudioCanProduceNotAllowed PresetUpdateParamsPermissionsMediaAudioCanProduce = "NOT_ALLOWED"` - `const PresetUpdateParamsPermissionsMediaAudioCanProduceCanRequest PresetUpdateParamsPermissionsMediaAudioCanProduce = "CAN_REQUEST"` - `Screenshare PresetUpdateParamsPermissionsMediaScreenshare` Screenshare permissions - `CanProduce PresetUpdateParamsPermissionsMediaScreenshareCanProduce` Can produce screen share video - `const PresetUpdateParamsPermissionsMediaScreenshareCanProduceAllowed PresetUpdateParamsPermissionsMediaScreenshareCanProduce = "ALLOWED"` - `const PresetUpdateParamsPermissionsMediaScreenshareCanProduceNotAllowed PresetUpdateParamsPermissionsMediaScreenshareCanProduce = "NOT_ALLOWED"` - `const PresetUpdateParamsPermissionsMediaScreenshareCanProduceCanRequest PresetUpdateParamsPermissionsMediaScreenshareCanProduce = "CAN_REQUEST"` - `Video PresetUpdateParamsPermissionsMediaVideo` Video permissions - `CanProduce PresetUpdateParamsPermissionsMediaVideoCanProduce` Can produce video - `const PresetUpdateParamsPermissionsMediaVideoCanProduceAllowed PresetUpdateParamsPermissionsMediaVideoCanProduce = "ALLOWED"` - `const PresetUpdateParamsPermissionsMediaVideoCanProduceNotAllowed PresetUpdateParamsPermissionsMediaVideoCanProduce = "NOT_ALLOWED"` - `const PresetUpdateParamsPermissionsMediaVideoCanProduceCanRequest PresetUpdateParamsPermissionsMediaVideoCanProduce = "CAN_REQUEST"` - `PinParticipant bool` - `Plugins PresetUpdateParamsPermissionsPlugins` Plugin permissions - `CanClose bool` Can close plugins that are already open - `CanEditConfig bool` Can edit plugin config - `CanStart bool` Can start plugins - `Config PresetUpdateParamsPermissionsPluginsConfigUnion` - `UnionString` - `type PresetUpdateParamsPermissionsPluginsConfigObject struct{…}` - `AccessControl PresetUpdateParamsPermissionsPluginsConfigObjectAccessControl` - `const PresetUpdateParamsPermissionsPluginsConfigObjectAccessControlFullAccess PresetUpdateParamsPermissionsPluginsConfigObjectAccessControl = "FULL_ACCESS"` - `const PresetUpdateParamsPermissionsPluginsConfigObjectAccessControlViewOnly PresetUpdateParamsPermissionsPluginsConfigObjectAccessControl = "VIEW_ONLY"` - `HandlesViewOnly bool` - `Polls PresetUpdateParamsPermissionsPolls` Poll permissions - `CanCreate bool` Can create polls - `CanView bool` Can view polls - `CanVote bool` Can vote on polls - `RecorderType PresetUpdateParamsPermissionsRecorderType` Type of the recording peer - `const PresetUpdateParamsPermissionsRecorderTypeRecorder PresetUpdateParamsPermissionsRecorderType = "RECORDER"` - `const PresetUpdateParamsPermissionsRecorderTypeLivestreamer PresetUpdateParamsPermissionsRecorderType = "LIVESTREAMER"` - `const PresetUpdateParamsPermissionsRecorderTypeNone PresetUpdateParamsPermissionsRecorderType = "NONE"` - `ShowParticipantList bool` - `WaitingRoomType PresetUpdateParamsPermissionsWaitingRoomType` Waiting room type - `const PresetUpdateParamsPermissionsWaitingRoomTypeSkip PresetUpdateParamsPermissionsWaitingRoomType = "SKIP"` - `const PresetUpdateParamsPermissionsWaitingRoomTypeOnPrivilegedUserEntry PresetUpdateParamsPermissionsWaitingRoomType = "ON_PRIVILEGED_USER_ENTRY"` - `const PresetUpdateParamsPermissionsWaitingRoomTypeSkipOnAccept PresetUpdateParamsPermissionsWaitingRoomType = "SKIP_ON_ACCEPT"` - `UI param.Field[PresetUpdateParamsUI]` Body param - `ConfigDiff unknown` - `DesignTokens PresetUpdateParamsUIDesignTokens` - `BorderRadius PresetUpdateParamsUIDesignTokensBorderRadius` - `const PresetUpdateParamsUIDesignTokensBorderRadiusRounded PresetUpdateParamsUIDesignTokensBorderRadius = "rounded"` - `BorderWidth PresetUpdateParamsUIDesignTokensBorderWidth` - `const PresetUpdateParamsUIDesignTokensBorderWidthThin PresetUpdateParamsUIDesignTokensBorderWidth = "thin"` - `Colors PresetUpdateParamsUIDesignTokensColors` - `Background PresetUpdateParamsUIDesignTokensColorsBackground` - `Number1000 string` - `Number600 string` - `Number700 string` - `Number800 string` - `Number900 string` - `Brand PresetUpdateParamsUIDesignTokensColorsBrand` - `Number300 string` - `Number400 string` - `Number500 string` - `Number600 string` - `Number700 string` - `Danger string` - `Success string` - `Text string` - `TextOnBrand string` - `VideoBg string` - `Warning string` - `Logo string` - `SpacingBase float64` - `Theme PresetUpdateParamsUIDesignTokensTheme` - `const PresetUpdateParamsUIDesignTokensThemeDark PresetUpdateParamsUIDesignTokensTheme = "dark"` ### Returns - `type PresetUpdateResponse struct{…}` - `Data PresetUpdateResponseData` Data returned by the operation - `ID string` ID of the preset - `Config PresetUpdateResponseDataConfig` - `MaxScreenshareCount int64` Maximum number of screen shares that can be active at a given time - `MaxVideoStreams PresetUpdateResponseDataConfigMaxVideoStreams` Maximum number of streams that are visible on a device - `Desktop int64` Maximum number of video streams visible on desktop devices - `Mobile int64` Maximum number of streams visible on mobile devices - `Media PresetUpdateResponseDataConfigMedia` Media configuration options. eg: Video quality - `Screenshare PresetUpdateResponseDataConfigMediaScreenshare` Configuration options for participant screen shares - `FrameRate int64` Frame rate of screen share - `Quality PresetUpdateResponseDataConfigMediaScreenshareQuality` Quality of screen share - `const PresetUpdateResponseDataConfigMediaScreenshareQualityHD PresetUpdateResponseDataConfigMediaScreenshareQuality = "hd"` - `const PresetUpdateResponseDataConfigMediaScreenshareQualityVga PresetUpdateResponseDataConfigMediaScreenshareQuality = "vga"` - `const PresetUpdateResponseDataConfigMediaScreenshareQualityQvga PresetUpdateResponseDataConfigMediaScreenshareQuality = "qvga"` - `Video PresetUpdateResponseDataConfigMediaVideo` Configuration options for participant videos - `FrameRate int64` Frame rate of participants' video - `Quality PresetUpdateResponseDataConfigMediaVideoQuality` Video quality of participants - `const PresetUpdateResponseDataConfigMediaVideoQualityHD PresetUpdateResponseDataConfigMediaVideoQuality = "hd"` - `const PresetUpdateResponseDataConfigMediaVideoQualityVga PresetUpdateResponseDataConfigMediaVideoQuality = "vga"` - `const PresetUpdateResponseDataConfigMediaVideoQualityQvga PresetUpdateResponseDataConfigMediaVideoQuality = "qvga"` - `Audio PresetUpdateResponseDataConfigMediaAudio` Control options for Audio quality. - `EnableHighBitrate bool` Enable High Quality Audio for your meetings - `EnableStereo bool` Enable Stereo for your meetings - `ViewType PresetUpdateResponseDataConfigViewType` Type of the meeting - `const PresetUpdateResponseDataConfigViewTypeGroupCall PresetUpdateResponseDataConfigViewType = "GROUP_CALL"` - `const PresetUpdateResponseDataConfigViewTypeWebinar PresetUpdateResponseDataConfigViewType = "WEBINAR"` - `const PresetUpdateResponseDataConfigViewTypeAudioRoom PresetUpdateResponseDataConfigViewType = "AUDIO_ROOM"` - `Name string` Name of the preset - `UI PresetUpdateResponseDataUI` - `DesignTokens PresetUpdateResponseDataUIDesignTokens` - `BorderRadius PresetUpdateResponseDataUIDesignTokensBorderRadius` - `const PresetUpdateResponseDataUIDesignTokensBorderRadiusRounded PresetUpdateResponseDataUIDesignTokensBorderRadius = "rounded"` - `BorderWidth PresetUpdateResponseDataUIDesignTokensBorderWidth` - `const PresetUpdateResponseDataUIDesignTokensBorderWidthThin PresetUpdateResponseDataUIDesignTokensBorderWidth = "thin"` - `Colors PresetUpdateResponseDataUIDesignTokensColors` - `Background PresetUpdateResponseDataUIDesignTokensColorsBackground` - `Number1000 string` - `Number600 string` - `Number700 string` - `Number800 string` - `Number900 string` - `Brand PresetUpdateResponseDataUIDesignTokensColorsBrand` - `Number300 string` - `Number400 string` - `Number500 string` - `Number600 string` - `Number700 string` - `Danger string` - `Success string` - `Text string` - `TextOnBrand string` - `VideoBg string` - `Warning string` - `Logo string` - `SpacingBase float64` - `Theme PresetUpdateResponseDataUIDesignTokensTheme` - `const PresetUpdateResponseDataUIDesignTokensThemeDark PresetUpdateResponseDataUIDesignTokensTheme = "dark"` - `ConfigDiff unknown` - `Permissions PresetUpdateResponseDataPermissions` - `AcceptWaitingRequests bool` Whether this participant can accept waiting requests - `CanAcceptProductionRequests bool` - `CanChangeParticipantPermissions bool` - `CanEditDisplayName bool` - `CanLivestream bool` - `CanRecord bool` - `CanSpotlight bool` - `Chat PresetUpdateResponseDataPermissionsChat` Chat permissions - `Private PresetUpdateResponseDataPermissionsChatPrivate` - `CanReceive bool` - `CanSend bool` - `Files bool` - `Text bool` - `Public PresetUpdateResponseDataPermissionsChatPublic` - `CanSend bool` Can send messages in general - `Files bool` Can send file messages - `Text bool` Can send text messages - `ConnectedMeetings PresetUpdateResponseDataPermissionsConnectedMeetings` - `CanAlterConnectedMeetings bool` - `CanSwitchConnectedMeetings bool` - `CanSwitchToParentMeeting bool` - `DisableParticipantAudio bool` - `DisableParticipantScreensharing bool` - `DisableParticipantVideo bool` - `HiddenParticipant bool` Whether this participant is visible to others or not - `KickParticipant bool` - `Media PresetUpdateResponseDataPermissionsMedia` Media permissions - `Audio PresetUpdateResponseDataPermissionsMediaAudio` Audio permissions - `CanProduce PresetUpdateResponseDataPermissionsMediaAudioCanProduce` Can produce audio - `const PresetUpdateResponseDataPermissionsMediaAudioCanProduceAllowed PresetUpdateResponseDataPermissionsMediaAudioCanProduce = "ALLOWED"` - `const PresetUpdateResponseDataPermissionsMediaAudioCanProduceNotAllowed PresetUpdateResponseDataPermissionsMediaAudioCanProduce = "NOT_ALLOWED"` - `const PresetUpdateResponseDataPermissionsMediaAudioCanProduceCanRequest PresetUpdateResponseDataPermissionsMediaAudioCanProduce = "CAN_REQUEST"` - `Screenshare PresetUpdateResponseDataPermissionsMediaScreenshare` Screenshare permissions - `CanProduce PresetUpdateResponseDataPermissionsMediaScreenshareCanProduce` Can produce screen share video - `const PresetUpdateResponseDataPermissionsMediaScreenshareCanProduceAllowed PresetUpdateResponseDataPermissionsMediaScreenshareCanProduce = "ALLOWED"` - `const PresetUpdateResponseDataPermissionsMediaScreenshareCanProduceNotAllowed PresetUpdateResponseDataPermissionsMediaScreenshareCanProduce = "NOT_ALLOWED"` - `const PresetUpdateResponseDataPermissionsMediaScreenshareCanProduceCanRequest PresetUpdateResponseDataPermissionsMediaScreenshareCanProduce = "CAN_REQUEST"` - `Video PresetUpdateResponseDataPermissionsMediaVideo` Video permissions - `CanProduce PresetUpdateResponseDataPermissionsMediaVideoCanProduce` Can produce video - `const PresetUpdateResponseDataPermissionsMediaVideoCanProduceAllowed PresetUpdateResponseDataPermissionsMediaVideoCanProduce = "ALLOWED"` - `const PresetUpdateResponseDataPermissionsMediaVideoCanProduceNotAllowed PresetUpdateResponseDataPermissionsMediaVideoCanProduce = "NOT_ALLOWED"` - `const PresetUpdateResponseDataPermissionsMediaVideoCanProduceCanRequest PresetUpdateResponseDataPermissionsMediaVideoCanProduce = "CAN_REQUEST"` - `PinParticipant bool` - `Plugins PresetUpdateResponseDataPermissionsPlugins` Plugin permissions - `CanClose bool` Can close plugins that are already open - `CanEditConfig bool` Can edit plugin config - `CanStart bool` Can start plugins - `Config PresetUpdateResponseDataPermissionsPluginsConfigUnion` - `UnionString` - `type PresetUpdateResponseDataPermissionsPluginsConfigObject struct{…}` - `AccessControl PresetUpdateResponseDataPermissionsPluginsConfigObjectAccessControl` - `const PresetUpdateResponseDataPermissionsPluginsConfigObjectAccessControlFullAccess PresetUpdateResponseDataPermissionsPluginsConfigObjectAccessControl = "FULL_ACCESS"` - `const PresetUpdateResponseDataPermissionsPluginsConfigObjectAccessControlViewOnly PresetUpdateResponseDataPermissionsPluginsConfigObjectAccessControl = "VIEW_ONLY"` - `HandlesViewOnly bool` - `Polls PresetUpdateResponseDataPermissionsPolls` Poll permissions - `CanCreate bool` Can create polls - `CanView bool` Can view polls - `CanVote bool` Can vote on polls - `RecorderType PresetUpdateResponseDataPermissionsRecorderType` Type of the recording peer - `const PresetUpdateResponseDataPermissionsRecorderTypeRecorder PresetUpdateResponseDataPermissionsRecorderType = "RECORDER"` - `const PresetUpdateResponseDataPermissionsRecorderTypeLivestreamer PresetUpdateResponseDataPermissionsRecorderType = "LIVESTREAMER"` - `const PresetUpdateResponseDataPermissionsRecorderTypeNone PresetUpdateResponseDataPermissionsRecorderType = "NONE"` - `ShowParticipantList bool` - `WaitingRoomType PresetUpdateResponseDataPermissionsWaitingRoomType` Waiting room type - `const PresetUpdateResponseDataPermissionsWaitingRoomTypeSkip PresetUpdateResponseDataPermissionsWaitingRoomType = "SKIP"` - `const PresetUpdateResponseDataPermissionsWaitingRoomTypeOnPrivilegedUserEntry PresetUpdateResponseDataPermissionsWaitingRoomType = "ON_PRIVILEGED_USER_ENTRY"` - `const PresetUpdateResponseDataPermissionsWaitingRoomTypeSkipOnAccept PresetUpdateResponseDataPermissionsWaitingRoomType = "SKIP_ON_ACCEPT"` - `IsRecorder bool` - `Success bool` Success status of the operation ### 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"), ) preset, err := client.RealtimeKit.Presets.Update( context.TODO(), "app_id", "preset_id", realtime_kit.PresetUpdateParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", preset.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "config": { "max_screenshare_count": 0, "max_video_streams": { "desktop": 0, "mobile": 0 }, "media": { "screenshare": { "frame_rate": 0, "quality": "hd" }, "video": { "frame_rate": 30, "quality": "hd" }, "audio": { "enable_high_bitrate": true, "enable_stereo": true } }, "view_type": "GROUP_CALL" }, "name": "name", "ui": { "design_tokens": { "border_radius": "rounded", "border_width": "thin", "colors": { "background": { "600": "600", "700": "700", "800": "800", "900": "900", "1000": "1000" }, "brand": { "300": "300", "400": "400", "500": "500", "600": "600", "700": "700" }, "danger": "danger", "success": "success", "text": "text", "text_on_brand": "text_on_brand", "video_bg": "video_bg", "warning": "warning" }, "logo": "logo", "spacing_base": 0, "theme": "dark" }, "config_diff": {} }, "permissions": { "accept_waiting_requests": true, "can_accept_production_requests": true, "can_change_participant_permissions": true, "can_edit_display_name": true, "can_livestream": true, "can_record": true, "can_spotlight": true, "chat": { "private": { "can_receive": true, "can_send": true, "files": true, "text": true }, "public": { "can_send": true, "files": true, "text": true } }, "connected_meetings": { "can_alter_connected_meetings": true, "can_switch_connected_meetings": true, "can_switch_to_parent_meeting": true }, "disable_participant_audio": true, "disable_participant_screensharing": true, "disable_participant_video": true, "hidden_participant": true, "kick_participant": true, "media": { "audio": { "can_produce": "ALLOWED" }, "screenshare": { "can_produce": "ALLOWED" }, "video": { "can_produce": "ALLOWED" } }, "pin_participant": true, "plugins": { "can_close": true, "can_edit_config": true, "can_start": true, "config": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "polls": { "can_create": true, "can_view": true, "can_vote": true }, "recorder_type": "RECORDER", "show_participant_list": true, "waiting_room_type": "SKIP", "is_recorder": true } }, "success": true } ``` # Sessions ## Fetch all sessions of an App `client.RealtimeKit.Sessions.GetSessions(ctx, appID, params) (*SessionGetSessionsResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions` Returns details of all sessions of an App. ### Parameters - `appID string` The app identifier tag. - `params SessionGetSessionsParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `AssociatedID param.Field[string]` Query param: ID of the meeting that sessions should be associated with - `EndTime param.Field[Time]` Query param: The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `PageNo param.Field[float64]` Query param: The page number from which you want your page search results to be displayed. - `Participants param.Field[string]` Query param - `PerPage param.Field[float64]` Query param: Number of results per page - `Search param.Field[string]` Query param: Search string that matches sessions based on meeting title, meeting ID, and session ID - `SortBy param.Field[SessionGetSessionsParamsSortBy]` Query param - `const SessionGetSessionsParamsSortByMinutesConsumed SessionGetSessionsParamsSortBy = "minutesConsumed"` - `const SessionGetSessionsParamsSortByCreatedAt SessionGetSessionsParamsSortBy = "createdAt"` - `SortOrder param.Field[SessionGetSessionsParamsSortOrder]` Query param - `const SessionGetSessionsParamsSortOrderAsc SessionGetSessionsParamsSortOrder = "ASC"` - `const SessionGetSessionsParamsSortOrderDesc SessionGetSessionsParamsSortOrder = "DESC"` - `StartTime param.Field[Time]` Query param: The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `Status param.Field[SessionGetSessionsParamsStatus]` Query param - `const SessionGetSessionsParamsStatusLive SessionGetSessionsParamsStatus = "LIVE"` - `const SessionGetSessionsParamsStatusEnded SessionGetSessionsParamsStatus = "ENDED"` ### Returns - `type SessionGetSessionsResponse struct{…}` - `Data SessionGetSessionsResponseData` - `Sessions []SessionGetSessionsResponseDataSession` - `ID string` ID of the session - `AssociatedID string` ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form `abcdef-ghijkl` - `CreatedAt string` timestamp when session created - `LiveParticipants float64` number of participants currently in the session - `MaxConcurrentParticipants float64` number of maximum participants that were in the session - `MeetingDisplayName string` Title of the meeting this session belongs to - `MinutesConsumed float64` number of minutes consumed since the session started - `OrganizationID string` App id that hosted this session - `StartedAt string` timestamp when session started - `Status SessionGetSessionsResponseDataSessionsStatus` current status of session - `const SessionGetSessionsResponseDataSessionsStatusLive SessionGetSessionsResponseDataSessionsStatus = "LIVE"` - `const SessionGetSessionsResponseDataSessionsStatusEnded SessionGetSessionsResponseDataSessionsStatus = "ENDED"` - `Type SessionGetSessionsResponseDataSessionsType` type of session - `const SessionGetSessionsResponseDataSessionsTypeMeeting SessionGetSessionsResponseDataSessionsType = "meeting"` - `const SessionGetSessionsResponseDataSessionsTypeLivestream SessionGetSessionsResponseDataSessionsType = "livestream"` - `const SessionGetSessionsResponseDataSessionsTypeParticipant SessionGetSessionsResponseDataSessionsType = "participant"` - `UpdatedAt string` timestamp when session was last updated - `BreakoutRooms []unknown` - `EndedAt string` timestamp when session ended - `Meta unknown` Any meta data about session. - `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.GetSessions( context.TODO(), "app_id", realtime_kit.SessionGetSessionsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "sessions": [ { "id": "id", "associated_id": "associated_id", "created_at": "created_at", "live_participants": 0, "max_concurrent_participants": 0, "meeting_display_name": "meeting_display_name", "minutes_consumed": 0, "organization_id": "organization_id", "started_at": "started_at", "status": "LIVE", "type": "meeting", "updated_at": "updated_at", "breakout_rooms": [ {} ], "ended_at": "ended_at", "meta": {} } ] }, "success": true } ``` ## Fetch details of a session `client.RealtimeKit.Sessions.GetSessionDetails(ctx, appID, sessionID, params) (*SessionGetSessionDetailsResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}` Returns data of the given session ID including recording details. ### Parameters - `appID string` The app identifier tag. - `sessionID string` - `params SessionGetSessionDetailsParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `IncludeBreakoutRooms param.Field[bool]` Query param: List all breakout rooms ### Returns - `type SessionGetSessionDetailsResponse struct{…}` - `Data SessionGetSessionDetailsResponseData` - `Session SessionGetSessionDetailsResponseDataSession` - `ID string` ID of the session - `AssociatedID string` ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form `abcdef-ghijkl` - `CreatedAt string` timestamp when session created - `LiveParticipants float64` number of participants currently in the session - `MaxConcurrentParticipants float64` number of maximum participants that were in the session - `MeetingDisplayName string` Title of the meeting this session belongs to - `MinutesConsumed float64` number of minutes consumed since the session started - `OrganizationID string` App id that hosted this session - `StartedAt string` timestamp when session started - `Status SessionGetSessionDetailsResponseDataSessionStatus` current status of session - `const SessionGetSessionDetailsResponseDataSessionStatusLive SessionGetSessionDetailsResponseDataSessionStatus = "LIVE"` - `const SessionGetSessionDetailsResponseDataSessionStatusEnded SessionGetSessionDetailsResponseDataSessionStatus = "ENDED"` - `Type SessionGetSessionDetailsResponseDataSessionType` type of session - `const SessionGetSessionDetailsResponseDataSessionTypeMeeting SessionGetSessionDetailsResponseDataSessionType = "meeting"` - `const SessionGetSessionDetailsResponseDataSessionTypeLivestream SessionGetSessionDetailsResponseDataSessionType = "livestream"` - `const SessionGetSessionDetailsResponseDataSessionTypeParticipant SessionGetSessionDetailsResponseDataSessionType = "participant"` - `UpdatedAt string` timestamp when session was last updated - `BreakoutRooms []unknown` - `EndedAt string` timestamp when session ended - `Meta unknown` Any meta data about session. - `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.GetSessionDetails( context.TODO(), "app_id", "session_id", realtime_kit.SessionGetSessionDetailsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "session": { "id": "id", "associated_id": "associated_id", "created_at": "created_at", "live_participants": 0, "max_concurrent_participants": 0, "meeting_display_name": "meeting_display_name", "minutes_consumed": 0, "organization_id": "organization_id", "started_at": "started_at", "status": "LIVE", "type": "meeting", "updated_at": "updated_at", "breakout_rooms": [ {} ], "ended_at": "ended_at", "meta": {} } }, "success": true } ``` ## Fetch participants list of a session `client.RealtimeKit.Sessions.GetSessionParticipants(ctx, appID, sessionID, params) (*SessionGetSessionParticipantsResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/participants` Returns a list of participants for the given session ID. ### Parameters - `appID string` The app identifier tag. - `sessionID string` - `params SessionGetSessionParticipantsParams` - `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 participants. - `PageNo param.Field[float64]` Query param: The page number from which you want your page search results to be displayed. - `PerPage param.Field[float64]` Query param: Number of results per page - `Search param.Field[string]` Query param: The search query string. You can search using the meeting ID or title. - `SortBy param.Field[SessionGetSessionParticipantsParamsSortBy]` Query param - `const SessionGetSessionParticipantsParamsSortByJoinedAt SessionGetSessionParticipantsParamsSortBy = "joinedAt"` - `const SessionGetSessionParticipantsParamsSortByDuration SessionGetSessionParticipantsParamsSortBy = "duration"` - `SortOrder param.Field[SessionGetSessionParticipantsParamsSortOrder]` Query param - `const SessionGetSessionParticipantsParamsSortOrderAsc SessionGetSessionParticipantsParamsSortOrder = "ASC"` - `const SessionGetSessionParticipantsParamsSortOrderDesc SessionGetSessionParticipantsParamsSortOrder = "DESC"` - `View param.Field[SessionGetSessionParticipantsParamsView]` Query param: 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. - `const SessionGetSessionParticipantsParamsViewRaw SessionGetSessionParticipantsParamsView = "raw"` - `const SessionGetSessionParticipantsParamsViewConsolidated SessionGetSessionParticipantsParamsView = "consolidated"` ### Returns - `type SessionGetSessionParticipantsResponse struct{…}` - `Data SessionGetSessionParticipantsResponseData` - `Participants []SessionGetSessionParticipantsResponseDataParticipant` - `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. - `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.GetSessionParticipants( context.TODO(), "app_id", "session_id", realtime_kit.SessionGetSessionParticipantsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "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 } ``` ## 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. - `Filters param.Field[SessionGetSessionParticipantDetailsParamsFilters]` 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]` 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. - `PeerStats SessionGetSessionParticipantDetailsResponseDataParticipantPeerStats` - `Config string` - `DeviceInfo SessionGetSessionParticipantDetailsResponseDataParticipantPeerStatsDeviceInfo` - `Browser string` - `BrowserVersion string` - `CPUs float64` - `Engine string` - `IsMobile bool` - `Memory float64` - `OS string` - `OSVersion string` - `SDKName string` - `SDKVersion string` - `UserAgent string` - `WebglSupport string` - `Events []SessionGetSessionParticipantDetailsResponseDataParticipantPeerStatsEvent` - `Timestamp string` - `Type string` - `IPInformation SessionGetSessionParticipantDetailsResponseDataParticipantPeerStatsIPInformation` - `City string` - `Country string` - `IPLocation string` - `IPV4 string` - `Org string` - `Portal string` - `Region string` - `Timezone string` - `PrecallNetworkInformation SessionGetSessionParticipantDetailsResponseDataParticipantPeerStatsPrecallNetworkInformation` - `BackendRTT float64` - `EffectiveNetworktype string` - `FractionalLoss float64` - `Jitter float64` - `ReflexiveConnectivity bool` - `RelayConnectivity bool` - `RTT float64` - `Throughtput float64` - `TURNConnectivity bool` - `Status string` - `PresetName string` Name of the preset associated with the participant. - `QualityStats []SessionGetSessionParticipantDetailsResponseDataParticipantQualityStat` - `AudioBandwidth float64` - `AudioPacketLoss float64` - `AudioStats []SessionGetSessionParticipantDetailsResponseDataParticipantQualityStatsAudioStat` - `ConcealmentEvents float64` - `Jitter float64` - `PacketsLost float64` - `Quality float64` - `Timestamp string` - `AverageQuality float64` - `End string` - `PeerID string` - `Start string` - `VideoBandwidth float64` - `VideoPacketLoss float64` - `VideoStats []SessionGetSessionParticipantDetailsResponseDataParticipantQualityStatsVideoStat` - `FrameHeight float64` - `FrameWidth float64` - `FramesDropped float64` - `FramesPerSecond float64` - `Jitter float64` - `PacketsLost float64` - `Quality float64` - `Timestamp string` - `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", "session_id", "participant_id", 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_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 } ``` ## Fetch all chat messages of a session `client.RealtimeKit.Sessions.GetSessionChat(ctx, appID, sessionID, query) (*SessionGetSessionChatResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/chat` Returns a URL to download all chat messages of the session ID in CSV format. ### Parameters - `appID string` The app identifier tag. - `sessionID string` - `query SessionGetSessionChatParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type SessionGetSessionChatResponse struct{…}` - `Data SessionGetSessionChatResponseData` - `ChatDownloadURL string` URL where the chat logs can be downloaded - `ChatDownloadURLExpiry string` Time when the download URL will expire - `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.GetSessionChat( context.TODO(), "app_id", "session_id", realtime_kit.SessionGetSessionChatParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "chat_download_url": "chat_download_url", "chat_download_url_expiry": "chat_download_url_expiry" }, "success": true } ``` ## Fetch the complete transcript for a session `client.RealtimeKit.Sessions.GetSessionTranscripts(ctx, appID, sessionID, query) (*SessionGetSessionTranscriptsResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/transcript` Returns a URL to download the transcript for the session ID in CSV format. ### Parameters - `appID string` The app identifier tag. - `sessionID string` - `query SessionGetSessionTranscriptsParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type SessionGetSessionTranscriptsResponse struct{…}` - `Data SessionGetSessionTranscriptsResponseData` - `SessionID string` - `TranscriptDownloadURL string` URL where the transcript can be downloaded - `TranscriptDownloadURLExpiry string` Time when the download URL will expire - `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.GetSessionTranscripts( context.TODO(), "app_id", "session_id", realtime_kit.SessionGetSessionTranscriptsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "sessionId": "sessionId", "transcript_download_url": "transcript_download_url", "transcript_download_url_expiry": "transcript_download_url_expiry" }, "success": true } ``` ## Fetch summary of transcripts for a session `client.RealtimeKit.Sessions.GetSessionSummary(ctx, appID, sessionID, query) (*SessionGetSessionSummaryResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/summary` Returns a Summary URL to download the Summary of Transcripts for the session ID as plain text. ### Parameters - `appID string` The app identifier tag. - `sessionID string` - `query SessionGetSessionSummaryParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type SessionGetSessionSummaryResponse struct{…}` - `Data SessionGetSessionSummaryResponseData` - `SessionID string` - `SummaryDownloadURL string` URL where the summary of transcripts can be downloaded - `SummaryDownloadURLExpiry string` Time of Expiry before when you need to download the csv file. - `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.GetSessionSummary( context.TODO(), "app_id", "session_id", realtime_kit.SessionGetSessionSummaryParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "sessionId": "sessionId", "summaryDownloadUrl": "summaryDownloadUrl", "summaryDownloadUrlExpiry": "summaryDownloadUrlExpiry" }, "success": true } ``` ## Generate summary of Transcripts for the session `client.RealtimeKit.Sessions.GenerateSummaryOfTranscripts(ctx, appID, sessionID, body) error` **post** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/{session_id}/summary` Trigger Summary generation of Transcripts for the session ID. ### Parameters - `appID string` The app identifier tag. - `sessionID string` - `body SessionGenerateSummaryOfTranscriptsParams` - `AccountID param.Field[string]` The account identifier tag. ### Example ```go package main import ( "context" "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"), ) err := client.RealtimeKit.Sessions.GenerateSummaryOfTranscripts( context.TODO(), "app_id", "session_id", realtime_kit.SessionGenerateSummaryOfTranscriptsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } } ``` ## Fetch details of peer `client.RealtimeKit.Sessions.GetParticipantDataFromPeerID(ctx, appID, peerID, params) (*SessionGetParticipantDataFromPeerIDResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/sessions/peer-report/{peer_id}` Returns details of the given peer ID along with call statistics for the given session ID. ### Parameters - `appID string` The app identifier tag. - `peerID string` - `params SessionGetParticipantDataFromPeerIDParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Filters param.Field[SessionGetParticipantDataFromPeerIDParamsFilters]` Query param: Comma separated list of filters to apply. Note that there must be no spaces between the filters. - `const SessionGetParticipantDataFromPeerIDParamsFiltersDeviceInfo SessionGetParticipantDataFromPeerIDParamsFilters = "device_info"` - `const SessionGetParticipantDataFromPeerIDParamsFiltersIPInformation SessionGetParticipantDataFromPeerIDParamsFilters = "ip_information"` - `const SessionGetParticipantDataFromPeerIDParamsFiltersPrecallNetworkInformation SessionGetParticipantDataFromPeerIDParamsFilters = "precall_network_information"` - `const SessionGetParticipantDataFromPeerIDParamsFiltersEvents SessionGetParticipantDataFromPeerIDParamsFilters = "events"` - `const SessionGetParticipantDataFromPeerIDParamsFiltersQualityStats SessionGetParticipantDataFromPeerIDParamsFilters = "quality_stats"` ### Returns - `type SessionGetParticipantDataFromPeerIDResponse struct{…}` - `Data SessionGetParticipantDataFromPeerIDResponseData` - `Participant SessionGetParticipantDataFromPeerIDResponseDataParticipant` - `ID string` - `CreatedAt string` - `CustomParticipantID string` - `DisplayName string` - `Duration float64` - `JoinedAt string` - `LeftAt string` - `PeerReport SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReport` - `Metadata SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadata` - `AudioDevicesUpdates []unknown` - `BrowserMetadata SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataBrowserMetadata` - `Browser string` - `BrowserVersion string` - `Engine string` - `UserAgent string` - `WebglSupport string` - `CandidatePairs SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataCandidatePairs` - `ConsumingTransport []unknown` - `ProducingTransport []SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataCandidatePairsProducingTransport` - `AvailableOutgoingBitrate int64` - `BytesDiscardedOnSend int64` - `BytesReceived int64` - `BytesSent int64` - `CurrentRoundTripTime float64` - `LastPacketReceivedTimestamp int64` - `LastPacketSentTimestamp int64` - `LocalCandidateAddress string` - `LocalCandidateID string` - `LocalCandidateNetworkType string` - `LocalCandidatePort int64` - `LocalCandidateProtocol string` - `LocalCandidateRelatedAddress string` - `LocalCandidateRelatedPort int64` - `LocalCandidateType string` - `Nominated bool` - `PacketsDiscardedOnSend int64` - `PacketsReceived int64` - `PacketsSent int64` - `RemoteCandidateAddress string` - `RemoteCandidateID string` - `RemoteCandidatePort int64` - `RemoteCandidateProtocol string` - `RemoteCandidateType string` - `TotalRoundTripTime float64` - `DeviceInfo SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataDeviceInfo` - `CPUs int64` - `IsMobile bool` - `OS string` - `OSVersion string` - `Events []SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataEvent` - `Name string` - `Timestamp string` - `IPInformation SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataIPInformation` - `ASN SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataIPInformationASN` - `ASN string` - `City string` - `Country string` - `IPV4 string` - `Region string` - `Timezone string` - `PcMetadata []SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportMetadataPcMetadata` - `EffectiveNetworkType string` - `ReflexiveConnectivity bool` - `RelayConnectivity bool` - `Timestamp string` - `TURNConnectivity bool` - `RoomViewType string` - `SDKName string` - `SDKVersion string` - `SelectedDeviceUpdates []unknown` - `SpeakerDevicesUpdates []unknown` - `VideoDevicesUpdates []unknown` - `Quality SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportQuality` - `AudioConsumer []unknown` - `AudioConsumerCumulative unknown` - `AudioProducer []SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportQualityAudioProducer` - `BytesSent int64` - `Jitter int64` - `Mid string` - `MosQuality int64` - `PacketsLost int64` - `PacketsSent int64` - `ProducerID string` - `RTT float64` - `Ssrc int64` - `Timestamp string` - `AudioProducerCumulative SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportQualityAudioProducerCumulative` - `PacketLoss SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportQualityAudioProducerCumulativePacketLoss` - `Number10OrGreaterEventFraction int64` - `Number25OrGreaterEventFraction int64` - `Number5OrGreaterEventFraction int64` - `Number50OrGreaterEventFraction int64` - `Avg int64` - `QualityMos SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportQualityAudioProducerCumulativeQualityMos` - `Avg int64` - `P50 int64` - `P75 int64` - `P90 int64` - `RTT SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerReportQualityAudioProducerCumulativeRTT` - `Number100msOrGreaterEventFraction float64` - `Number250msOrGreaterEventFraction float64` - `Number500msOrGreaterEventFraction float64` - `Avg float64` - `ScreenshareAudioConsumer []unknown` - `ScreenshareAudioConsumerCumulative unknown` - `ScreenshareAudioProducer []unknown` - `ScreenshareAudioProducerCumulative unknown` - `ScreenshareVideoConsumer []unknown` - `ScreenshareVideoConsumerCumulative unknown` - `ScreenshareVideoProducer []unknown` - `ScreenshareVideoProducerCumulative unknown` - `VideoConsumer []unknown` - `VideoConsumerCumulative unknown` - `VideoProducer []unknown` - `VideoProducerCumulative unknown` - `PeerStats SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStats` - `DeviceInfo SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsDeviceInfo` - `Browser string` - `BrowserVersion string` - `CPUs int64` - `Engine string` - `IsMobile bool` - `OS string` - `OSVersion string` - `SDKName string` - `SDKVersion string` - `UserAgent string` - `WebglSupport string` - `Events []SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEvent` - `Metadata SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadata` - `ConnectionInfo SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadataConnectionInfo` - `BackendRTT float64` - `Connectivity SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadataConnectionInfoConnectivity` - `Host bool` - `Reflexive bool` - `Relay bool` - `EffectiveNetworkType string` - `FractionalLoss int64` - `IPDetails SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadataConnectionInfoIPDetails` - `ASN SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadataConnectionInfoIPDetailsASN` - `ASN string` - `City string` - `Country string` - `IP string` - `LOC string` - `Postal string` - `Region string` - `Timezone string` - `Jitter int64` - `Location SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadataConnectionInfoLocation` - `Coords SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsEventsMetadataConnectionInfoLocationCoords` - `Latitude float64` - `Longitude float64` - `RTT float64` - `Throughput int64` - `TURNConnectivity bool` - `Timestamp string` - `Type string` - `IPInformation SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsIPInformation` - `ASN SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsIPInformationASN` - `ASN string` - `City string` - `Country string` - `IPLocation string` - `IPV4 string` - `Org string` - `Region string` - `Timezone string` - `PrecallNetworkInformation SessionGetParticipantDataFromPeerIDResponseDataParticipantPeerStatsPrecallNetworkInformation` - `BackendRTT float64` - `EffectiveNetworktype string` - `FractionalLoss int64` - `Jitter int64` - `ReflexiveConnectivity bool` - `RelayConnectivity bool` - `RTT float64` - `Throughput int64` - `TURNConnectivity bool` - `QualityStats SessionGetParticipantDataFromPeerIDResponseDataParticipantQualityStats` - `AudioBandwidth int64` - `AudioStats []unknown` - `AverageQuality int64` - `End string` - `FirstAudioPacketReceived string` - `FirstVideoPacketReceived string` - `LastAudioPacketReceived string` - `LastVideoPacketReceived string` - `PeerIDs []string` - `Start string` - `TotalAudioPackets int64` - `TotalAudioPacketsLost int64` - `TotalVideoPackets int64` - `TotalVideoPacketsLost int64` - `VideoBandwidth int64` - `VideoStats []unknown` - `Role string` - `UpdatedAt string` - `UserID string` - `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.GetParticipantDataFromPeerID( context.TODO(), "app_id", "peer_id", realtime_kit.SessionGetParticipantDataFromPeerIDParams{ 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_report": { "metadata": { "audio_devices_updates": [ {} ], "browser_metadata": { "browser": "browser", "browser_version": "browser_version", "engine": "engine", "user_agent": "user_agent", "webgl_support": "webgl_support" }, "candidate_pairs": { "consuming_transport": [ {} ], "producing_transport": [ { "available_outgoing_bitrate": 0, "bytes_discarded_on_send": 0, "bytes_received": 0, "bytes_sent": 0, "current_round_trip_time": 0, "last_packet_received_timestamp": 0, "last_packet_sent_timestamp": 0, "local_candidate_address": "local_candidate_address", "local_candidate_id": "local_candidate_id", "local_candidate_network_type": "local_candidate_network_type", "local_candidate_port": 0, "local_candidate_protocol": "local_candidate_protocol", "local_candidate_related_address": "local_candidate_related_address", "local_candidate_related_port": 0, "local_candidate_type": "local_candidate_type", "nominated": true, "packets_discarded_on_send": 0, "packets_received": 0, "packets_sent": 0, "remote_candidate_address": "remote_candidate_address", "remote_candidate_id": "remote_candidate_id", "remote_candidate_port": 0, "remote_candidate_protocol": "remote_candidate_protocol", "remote_candidate_type": "remote_candidate_type", "total_round_trip_time": 0 } ] }, "device_info": { "cpus": 0, "is_mobile": true, "os": "os", "os_version": "os_version" }, "events": [ { "name": "name", "timestamp": "timestamp" } ], "ip_information": { "asn": { "asn": "asn" }, "city": "city", "country": "country", "ipv4": "ipv4", "region": "region", "timezone": "timezone" }, "pc_metadata": [ { "effective_network_type": "effective_network_type", "reflexive_connectivity": true, "relay_connectivity": true, "timestamp": "timestamp", "turn_connectivity": true } ], "room_view_type": "room_view_type", "sdk_name": "sdk_name", "sdk_version": "sdk_version", "selected_device_updates": [ {} ], "speaker_devices_updates": [ {} ], "video_devices_updates": [ {} ] }, "quality": { "audio_consumer": [ {} ], "audio_consumer_cumulative": {}, "audio_producer": [ { "bytes_sent": 0, "jitter": 0, "mid": "mid", "mos_quality": 0, "packets_lost": 0, "packets_sent": 0, "producer_id": "producer_id", "rtt": 0, "ssrc": 0, "timestamp": "timestamp" } ], "audio_producer_cumulative": { "packet_loss": { "10_or_greater_event_fraction": 0, "25_or_greater_event_fraction": 0, "5_or_greater_event_fraction": 0, "50_or_greater_event_fraction": 0, "avg": 0 }, "quality_mos": { "avg": 0, "p50": 0, "p75": 0, "p90": 0 }, "rtt": { "100ms_or_greater_event_fraction": 0, "250ms_or_greater_event_fraction": 0, "500ms_or_greater_event_fraction": 0, "avg": 0 } }, "screenshare_audio_consumer": [ {} ], "screenshare_audio_consumer_cumulative": {}, "screenshare_audio_producer": [ {} ], "screenshare_audio_producer_cumulative": {}, "screenshare_video_consumer": [ {} ], "screenshare_video_consumer_cumulative": {}, "screenshare_video_producer": [ {} ], "screenshare_video_producer_cumulative": {}, "video_consumer": [ {} ], "video_consumer_cumulative": {}, "video_producer": [ {} ], "video_producer_cumulative": {} } }, "peer_stats": { "device_info": { "browser": "browser", "browser_version": "browser_version", "cpus": 0, "engine": "engine", "is_mobile": true, "os": "os", "os_version": "os_version", "sdk_name": "sdk_name", "sdk_version": "sdk_version", "user_agent": "user_agent", "webgl_support": "webgl_support" }, "events": [ { "metadata": { "connection_info": { "backend_r_t_t": 0, "connectivity": { "host": true, "reflexive": true, "relay": true }, "effective_network_type": "effective_network_type", "fractional_loss": 0, "ip_details": { "asn": { "asn": "asn" }, "city": "city", "country": "country", "ip": "ip", "loc": "loc", "postal": "postal", "region": "region", "timezone": "timezone" }, "jitter": 0, "location": { "coords": { "latitude": 0, "longitude": 0 } }, "r_t_t": 0, "throughput": 0, "turn_connectivity": true } }, "timestamp": "timestamp", "type": "type" } ], "ip_information": { "asn": { "asn": "asn" }, "city": "city", "country": "country", "ip_location": "ip_location", "ipv4": "ipv4", "org": "org", "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, "throughput": 0, "turn_connectivity": true } }, "quality_stats": { "audio_bandwidth": 0, "audio_stats": [ {} ], "average_quality": 0, "end": "end", "first_audio_packet_received": "first_audio_packet_received", "first_video_packet_received": "first_video_packet_received", "last_audio_packet_received": "last_audio_packet_received", "last_video_packet_received": "last_video_packet_received", "peer_ids": [ "string" ], "start": "start", "total_audio_packets": 0, "total_audio_packets_lost": 0, "total_video_packets": 0, "total_video_packets_lost": 0, "video_bandwidth": 0, "video_stats": [ {} ] }, "role": "role", "updated_at": "updated_at", "user_id": "user_id" } }, "success": true } ``` # Recordings ## Fetch all recordings for an App `client.RealtimeKit.Recordings.GetRecordings(ctx, appID, params) (*RecordingGetRecordingsResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/recordings` Returns all recordings for an App. If the `meeting_id` parameter is passed, returns all recordings for the given meeting ID. ### Parameters - `appID string` The app identifier tag. - `params RecordingGetRecordingsParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `EndTime param.Field[Time]` Query param: The end time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `Expired param.Field[bool]` Query param: If passed, only shows expired/non-expired recordings on RealtimeKit's bucket - `MeetingID param.Field[string]` Query param: ID of a meeting. Optional. Will limit results to only this meeting if passed. - `PageNo param.Field[float64]` Query param: The page number from which you want your page search results to be displayed. - `PerPage param.Field[float64]` Query param: Number of results per page - `Search param.Field[string]` Query param: The search query string. You can search using the meeting ID or title. - `SortBy param.Field[RecordingGetRecordingsParamsSortBy]` Query param - `const RecordingGetRecordingsParamsSortByInvokedTime RecordingGetRecordingsParamsSortBy = "invokedTime"` - `SortOrder param.Field[RecordingGetRecordingsParamsSortOrder]` Query param - `const RecordingGetRecordingsParamsSortOrderAsc RecordingGetRecordingsParamsSortOrder = "ASC"` - `const RecordingGetRecordingsParamsSortOrderDesc RecordingGetRecordingsParamsSortOrder = "DESC"` - `StartTime param.Field[Time]` Query param: The start time range for which you want to retrieve the meetings. The time must be specified in ISO format. - `Status param.Field[[]RecordingGetRecordingsParamsStatus]` Query param: Filter by one or more recording status - `const RecordingGetRecordingsParamsStatusInvoked RecordingGetRecordingsParamsStatus = "INVOKED"` - `const RecordingGetRecordingsParamsStatusRecording RecordingGetRecordingsParamsStatus = "RECORDING"` - `const RecordingGetRecordingsParamsStatusUploading RecordingGetRecordingsParamsStatus = "UPLOADING"` - `const RecordingGetRecordingsParamsStatusUploaded RecordingGetRecordingsParamsStatus = "UPLOADED"` ### Returns - `type RecordingGetRecordingsResponse struct{…}` - `Data []RecordingGetRecordingsResponseData` - `ID string` ID of the recording - `AudioDownloadURL string` If the audio_config is passed, the URL for downloading the audio recording is returned. - `DownloadURL string` URL where the recording can be downloaded. - `DownloadURLExpiry Time` Timestamp when the download URL expires. - `FileSize float64` File size of the recording, in bytes. - `InvokedTime Time` Timestamp when this recording was invoked. - `OutputFileName string` File name of the recording. - `SessionID string` ID of the meeting session this recording is for. - `StartedTime Time` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `Status RecordingGetRecordingsResponseDataStatus` Current status of the recording. - `const RecordingGetRecordingsResponseDataStatusInvoked RecordingGetRecordingsResponseDataStatus = "INVOKED"` - `const RecordingGetRecordingsResponseDataStatusRecording RecordingGetRecordingsResponseDataStatus = "RECORDING"` - `const RecordingGetRecordingsResponseDataStatusUploading RecordingGetRecordingsResponseDataStatus = "UPLOADING"` - `const RecordingGetRecordingsResponseDataStatusUploaded RecordingGetRecordingsResponseDataStatus = "UPLOADED"` - `const RecordingGetRecordingsResponseDataStatusErrored RecordingGetRecordingsResponseDataStatus = "ERRORED"` - `const RecordingGetRecordingsResponseDataStatusPaused RecordingGetRecordingsResponseDataStatus = "PAUSED"` - `StoppedTime Time` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `Meeting RecordingGetRecordingsResponseDataMeeting` - `ID string` ID of the meeting. - `CreatedAt Time` Timestamp the object was created at. The time is returned in ISO format. - `UpdatedAt Time` Timestamp the object was updated at. The time is returned in ISO format. - `LiveStreamOnStart bool` Specifies if the meeting should start getting livestreamed on start. - `PersistChat bool` Specifies if Chat within a meeting should persist for a week. - `RecordOnStart bool` Specifies if the meeting should start getting recorded as soon as someone joins the meeting. - `SessionKeepAliveTimeInSecs float64` Time in seconds, for which a session remains active, after the last participant has left the meeting. - `Status RecordingGetRecordingsResponseDataMeetingStatus` Whether the meeting is `ACTIVE` or `INACTIVE`. Users will not be able to join an `INACTIVE` meeting. - `const RecordingGetRecordingsResponseDataMeetingStatusActive RecordingGetRecordingsResponseDataMeetingStatus = "ACTIVE"` - `const RecordingGetRecordingsResponseDataMeetingStatusInactive RecordingGetRecordingsResponseDataMeetingStatus = "INACTIVE"` - `SummarizeOnEnd bool` Automatically generate summary of meetings using transcripts. Requires Transcriptions to be enabled, and can be retrieved via Webhooks or summary API. - `Title string` Title of the meeting. - `RecordingDuration int64` Total recording time in seconds. - `StorageConfig RecordingGetRecordingsResponseDataStorageConfig` - `Type RecordingGetRecordingsResponseDataStorageConfigType` Type of storage media. - `const RecordingGetRecordingsResponseDataStorageConfigTypeAws RecordingGetRecordingsResponseDataStorageConfigType = "aws"` - `const RecordingGetRecordingsResponseDataStorageConfigTypeAzure RecordingGetRecordingsResponseDataStorageConfigType = "azure"` - `const RecordingGetRecordingsResponseDataStorageConfigTypeDigitalocean RecordingGetRecordingsResponseDataStorageConfigType = "digitalocean"` - `const RecordingGetRecordingsResponseDataStorageConfigTypeGcs RecordingGetRecordingsResponseDataStorageConfigType = "gcs"` - `const RecordingGetRecordingsResponseDataStorageConfigTypeSftp RecordingGetRecordingsResponseDataStorageConfigType = "sftp"` - `AccessKey string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `AuthMethod RecordingGetRecordingsResponseDataStorageConfigAuthMethod` Authentication method used for "sftp" type storage medium - `const RecordingGetRecordingsResponseDataStorageConfigAuthMethodKey RecordingGetRecordingsResponseDataStorageConfigAuthMethod = "KEY"` - `const RecordingGetRecordingsResponseDataStorageConfigAuthMethodPassword RecordingGetRecordingsResponseDataStorageConfigAuthMethod = "PASSWORD"` - `Bucket string` Name of the storage medium's bucket. - `Host string` SSH destination server host for SFTP type storage medium - `Password string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `Path string` Path relative to the bucket root at which the recording will be placed. - `Port float64` SSH destination server port for SFTP type storage medium - `PrivateKey string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `Region string` Region of the storage medium. - `Secret string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `Username string` SSH destination server username for SFTP type storage medium - `Paging RecordingGetRecordingsResponsePaging` - `EndOffset float64` - `StartOffset float64` - `TotalCount float64` - `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.Recordings.GetRecordings( context.TODO(), "app_id", realtime_kit.RecordingGetRecordingsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "meeting": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created_at": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "live_stream_on_start": true, "persist_chat": true, "record_on_start": true, "session_keep_alive_time_in_secs": 60, "status": "ACTIVE", "summarize_on_end": true, "title": "title" }, "recording_duration": 0, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" } } ], "paging": { "end_offset": 30, "start_offset": 1, "total_count": 30 }, "success": true } ``` ## Start recording a meeting `client.RealtimeKit.Recordings.StartRecordings(ctx, appID, params) (*RecordingStartRecordingsResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/recordings` Starts recording a meeting. The meeting can be started by an App admin directly, or a participant with permissions to start a recording, based on the type of authorization used. ### Parameters - `appID string` The app identifier tag. - `params RecordingStartRecordingsParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `AllowMultipleRecordings param.Field[bool]` Body param: By default, a meeting allows only one recording to run at a time. Enabling the `allow_multiple_recordings` parameter to true allows you to initiate multiple recordings concurrently in the same meeting. This allows you to record separate videos of the same meeting with different configurations, such as portrait mode or landscape mode. - `AudioConfig param.Field[RecordingStartRecordingsParamsAudioConfig]` Body param: Object containing configuration regarding the audio that is being recorded. - `Channel RecordingStartRecordingsParamsAudioConfigChannel` Audio signal pathway within an audio file that carries a specific sound source. - `const RecordingStartRecordingsParamsAudioConfigChannelMono RecordingStartRecordingsParamsAudioConfigChannel = "mono"` - `const RecordingStartRecordingsParamsAudioConfigChannelStereo RecordingStartRecordingsParamsAudioConfigChannel = "stereo"` - `Codec RecordingStartRecordingsParamsAudioConfigCodec` Codec using which the recording will be encoded. If VP8/VP9 is selected for videoConfig, changing audioConfig is not allowed. In this case, the codec in the audioConfig is automatically set to vorbis. - `const RecordingStartRecordingsParamsAudioConfigCodecMP3 RecordingStartRecordingsParamsAudioConfigCodec = "MP3"` - `const RecordingStartRecordingsParamsAudioConfigCodecAac RecordingStartRecordingsParamsAudioConfigCodec = "AAC"` - `ExportFile bool` Controls whether to export audio file seperately - `FileNamePrefix param.Field[string]` Body param: Update the recording file name. - `InteractiveConfig param.Field[RecordingStartRecordingsParamsInteractiveConfig]` Body param: Allows you to add timed metadata to your recordings, which are digital markers inserted into a video file to provide contextual information at specific points in the content range. The ID3 tags containing this information are available to clients on the playback timeline in HLS format. The output files are generated in a compressed .tar format. - `Type RecordingStartRecordingsParamsInteractiveConfigType` The metadata is presented in the form of ID3 tags. - `const RecordingStartRecordingsParamsInteractiveConfigTypeId3 RecordingStartRecordingsParamsInteractiveConfigType = "ID3"` - `MaxSeconds param.Field[int64]` Body param: Specifies the maximum duration for recording in seconds, ranging from a minimum of 60 seconds to a maximum of 24 hours. - `MeetingID param.Field[string]` Body param: ID of the meeting to record. - `RealtimekitBucketConfig param.Field[RecordingStartRecordingsParamsRealtimekitBucketConfig]` Body param - `Enabled bool` Controls whether recordings are uploaded to RealtimeKit's bucket. If set to false, `download_url`, `audio_download_url`, `download_url_expiry` won't be generated for a recording. - `RtmpOutConfig param.Field[RecordingStartRecordingsParamsRtmpOutConfig]` Body param - `RtmpURL string` RTMP URL to stream to - `StorageConfig param.Field[RecordingStartRecordingsParamsStorageConfig]` Body param - `Type RecordingStartRecordingsParamsStorageConfigType` Type of storage media. - `const RecordingStartRecordingsParamsStorageConfigTypeAws RecordingStartRecordingsParamsStorageConfigType = "aws"` - `const RecordingStartRecordingsParamsStorageConfigTypeAzure RecordingStartRecordingsParamsStorageConfigType = "azure"` - `const RecordingStartRecordingsParamsStorageConfigTypeDigitalocean RecordingStartRecordingsParamsStorageConfigType = "digitalocean"` - `const RecordingStartRecordingsParamsStorageConfigTypeGcs RecordingStartRecordingsParamsStorageConfigType = "gcs"` - `const RecordingStartRecordingsParamsStorageConfigTypeSftp RecordingStartRecordingsParamsStorageConfigType = "sftp"` - `AccessKey string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `AuthMethod RecordingStartRecordingsParamsStorageConfigAuthMethod` Authentication method used for "sftp" type storage medium - `const RecordingStartRecordingsParamsStorageConfigAuthMethodKey RecordingStartRecordingsParamsStorageConfigAuthMethod = "KEY"` - `const RecordingStartRecordingsParamsStorageConfigAuthMethodPassword RecordingStartRecordingsParamsStorageConfigAuthMethod = "PASSWORD"` - `Bucket string` Name of the storage medium's bucket. - `Host string` SSH destination server host for SFTP type storage medium - `Password string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `Path string` Path relative to the bucket root at which the recording will be placed. - `Port float64` SSH destination server port for SFTP type storage medium - `PrivateKey string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `Region string` Region of the storage medium. - `Secret string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `Username string` SSH destination server username for SFTP type storage medium - `URL param.Field[string]` Body param: Pass a custom url to record arbitary screen - `VideoConfig param.Field[RecordingStartRecordingsParamsVideoConfig]` Body param - `Codec RecordingStartRecordingsParamsVideoConfigCodec` Codec using which the recording will be encoded. - `const RecordingStartRecordingsParamsVideoConfigCodecH264 RecordingStartRecordingsParamsVideoConfigCodec = "H264"` - `const RecordingStartRecordingsParamsVideoConfigCodecVp8 RecordingStartRecordingsParamsVideoConfigCodec = "VP8"` - `ExportFile bool` Controls whether to export video file seperately - `Height int64` Height of the recording video in pixels - `Watermark RecordingStartRecordingsParamsVideoConfigWatermark` Watermark to be added to the recording - `Position RecordingStartRecordingsParamsVideoConfigWatermarkPosition` Position of the watermark - `const RecordingStartRecordingsParamsVideoConfigWatermarkPositionLeftTop RecordingStartRecordingsParamsVideoConfigWatermarkPosition = "left top"` - `const RecordingStartRecordingsParamsVideoConfigWatermarkPositionRightTop RecordingStartRecordingsParamsVideoConfigWatermarkPosition = "right top"` - `const RecordingStartRecordingsParamsVideoConfigWatermarkPositionLeftBottom RecordingStartRecordingsParamsVideoConfigWatermarkPosition = "left bottom"` - `const RecordingStartRecordingsParamsVideoConfigWatermarkPositionRightBottom RecordingStartRecordingsParamsVideoConfigWatermarkPosition = "right bottom"` - `Size RecordingStartRecordingsParamsVideoConfigWatermarkSize` Size of the watermark - `Height int64` Height of the watermark in px - `Width int64` Width of the watermark in px - `URL string` URL of the watermark image - `Width int64` Width of the recording video in pixels ### Returns - `type RecordingStartRecordingsResponse struct{…}` - `Success bool` Success status of the operation - `Data RecordingStartRecordingsResponseData` Data returned by the operation - `ID string` ID of the recording - `AudioDownloadURL string` If the audio_config is passed, the URL for downloading the audio recording is returned. - `DownloadURL string` URL where the recording can be downloaded. - `DownloadURLExpiry Time` Timestamp when the download URL expires. - `FileSize float64` File size of the recording, in bytes. - `InvokedTime Time` Timestamp when this recording was invoked. - `OutputFileName string` File name of the recording. - `SessionID string` ID of the meeting session this recording is for. - `StartedTime Time` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `Status RecordingStartRecordingsResponseDataStatus` Current status of the recording. - `const RecordingStartRecordingsResponseDataStatusInvoked RecordingStartRecordingsResponseDataStatus = "INVOKED"` - `const RecordingStartRecordingsResponseDataStatusRecording RecordingStartRecordingsResponseDataStatus = "RECORDING"` - `const RecordingStartRecordingsResponseDataStatusUploading RecordingStartRecordingsResponseDataStatus = "UPLOADING"` - `const RecordingStartRecordingsResponseDataStatusUploaded RecordingStartRecordingsResponseDataStatus = "UPLOADED"` - `const RecordingStartRecordingsResponseDataStatusErrored RecordingStartRecordingsResponseDataStatus = "ERRORED"` - `const RecordingStartRecordingsResponseDataStatusPaused RecordingStartRecordingsResponseDataStatus = "PAUSED"` - `StoppedTime Time` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `RecordingDuration int64` Total recording time in seconds. - `StartReason RecordingStartRecordingsResponseDataStartReason` - `Caller RecordingStartRecordingsResponseDataStartReasonCaller` - `Name string` Name of the user who started the recording. - `Type RecordingStartRecordingsResponseDataStartReasonCallerType` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `const RecordingStartRecordingsResponseDataStartReasonCallerTypeOrganization RecordingStartRecordingsResponseDataStartReasonCallerType = "ORGANIZATION"` - `const RecordingStartRecordingsResponseDataStartReasonCallerTypeUser RecordingStartRecordingsResponseDataStartReasonCallerType = "USER"` - `UserID string` The user ID of the person who started the recording. - `Reason RecordingStartRecordingsResponseDataStartReasonReason` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `const RecordingStartRecordingsResponseDataStartReasonReasonAPICall RecordingStartRecordingsResponseDataStartReasonReason = "API_CALL"` - `const RecordingStartRecordingsResponseDataStartReasonReasonRecordOnStart RecordingStartRecordingsResponseDataStartReasonReason = "RECORD_ON_START"` - `StopReason RecordingStartRecordingsResponseDataStopReason` - `Caller RecordingStartRecordingsResponseDataStopReasonCaller` - `Name string` Name of the user who stopped the recording. - `Type RecordingStartRecordingsResponseDataStopReasonCallerType` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `const RecordingStartRecordingsResponseDataStopReasonCallerTypeOrganization RecordingStartRecordingsResponseDataStopReasonCallerType = "ORGANIZATION"` - `const RecordingStartRecordingsResponseDataStopReasonCallerTypeUser RecordingStartRecordingsResponseDataStopReasonCallerType = "USER"` - `UserID string` The user ID of the person who stopped the recording. - `Reason RecordingStartRecordingsResponseDataStopReasonReason` Specifies the reason why the recording stopped. - `const RecordingStartRecordingsResponseDataStopReasonReasonAPICall RecordingStartRecordingsResponseDataStopReasonReason = "API_CALL"` - `const RecordingStartRecordingsResponseDataStopReasonReasonInternalError RecordingStartRecordingsResponseDataStopReasonReason = "INTERNAL_ERROR"` - `const RecordingStartRecordingsResponseDataStopReasonReasonAllPeersLeft RecordingStartRecordingsResponseDataStopReasonReason = "ALL_PEERS_LEFT"` - `StorageConfig RecordingStartRecordingsResponseDataStorageConfig` - `Type RecordingStartRecordingsResponseDataStorageConfigType` Type of storage media. - `const RecordingStartRecordingsResponseDataStorageConfigTypeAws RecordingStartRecordingsResponseDataStorageConfigType = "aws"` - `const RecordingStartRecordingsResponseDataStorageConfigTypeAzure RecordingStartRecordingsResponseDataStorageConfigType = "azure"` - `const RecordingStartRecordingsResponseDataStorageConfigTypeDigitalocean RecordingStartRecordingsResponseDataStorageConfigType = "digitalocean"` - `const RecordingStartRecordingsResponseDataStorageConfigTypeGcs RecordingStartRecordingsResponseDataStorageConfigType = "gcs"` - `const RecordingStartRecordingsResponseDataStorageConfigTypeSftp RecordingStartRecordingsResponseDataStorageConfigType = "sftp"` - `AccessKey string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `AuthMethod RecordingStartRecordingsResponseDataStorageConfigAuthMethod` Authentication method used for "sftp" type storage medium - `const RecordingStartRecordingsResponseDataStorageConfigAuthMethodKey RecordingStartRecordingsResponseDataStorageConfigAuthMethod = "KEY"` - `const RecordingStartRecordingsResponseDataStorageConfigAuthMethodPassword RecordingStartRecordingsResponseDataStorageConfigAuthMethod = "PASSWORD"` - `Bucket string` Name of the storage medium's bucket. - `Host string` SSH destination server host for SFTP type storage medium - `Password string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `Path string` Path relative to the bucket root at which the recording will be placed. - `Port float64` SSH destination server port for SFTP type storage medium - `PrivateKey string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `Region string` Region of the storage medium. - `Secret string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `Username string` SSH destination server username for SFTP type storage medium ### 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.Recordings.StartRecordings( context.TODO(), "app_id", realtime_kit.RecordingStartRecordingsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), AudioConfig: cloudflare.F(realtime_kit.RecordingStartRecordingsParamsAudioConfig{ Channel: cloudflare.F(realtime_kit.RecordingStartRecordingsParamsAudioConfigChannelStereo), Codec: cloudflare.F(realtime_kit.RecordingStartRecordingsParamsAudioConfigCodecAac), ExportFile: cloudflare.F(true), }), FileNamePrefix: cloudflare.F("string"), InteractiveConfig: cloudflare.F(realtime_kit.RecordingStartRecordingsParamsInteractiveConfig{ Type: cloudflare.F(realtime_kit.RecordingStartRecordingsParamsInteractiveConfigTypeId3), }), MaxSeconds: cloudflare.F(int64(60)), MeetingID: cloudflare.F("97440c6a-140b-40a9-9499-b23fd7a3868a"), RealtimekitBucketConfig: cloudflare.F(realtime_kit.RecordingStartRecordingsParamsRealtimekitBucketConfig{ Enabled: cloudflare.F(true), }), VideoConfig: cloudflare.F(realtime_kit.RecordingStartRecordingsParamsVideoConfig{ Codec: cloudflare.F(realtime_kit.RecordingStartRecordingsParamsVideoConfigCodecH264), ExportFile: cloudflare.F(true), Height: cloudflare.F(int64(720)), Watermark: cloudflare.F(realtime_kit.RecordingStartRecordingsParamsVideoConfigWatermark{ Position: cloudflare.F(realtime_kit.RecordingStartRecordingsParamsVideoConfigWatermarkPositionLeftTop), Size: cloudflare.F(realtime_kit.RecordingStartRecordingsParamsVideoConfigWatermarkSize{ Height: cloudflare.F(int64(1)), Width: cloudflare.F(int64(1)), }), URL: cloudflare.F("http://example.com"), }), Width: cloudflare.F(int64(1280)), }), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Success) } ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "recording_duration": 0, "start_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "stop_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" } } } ``` ## Fetch active recording `client.RealtimeKit.Recordings.GetActiveRecordings(ctx, appID, meetingID, query) (*RecordingGetActiveRecordingsResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/recordings/active-recording/{meeting_id}` Returns the active recording details for the given meeting ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `query RecordingGetActiveRecordingsParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type RecordingGetActiveRecordingsResponse struct{…}` - `Data RecordingGetActiveRecordingsResponseData` Data returned by the operation - `ID string` ID of the recording - `AudioDownloadURL string` If the audio_config is passed, the URL for downloading the audio recording is returned. - `DownloadURL string` URL where the recording can be downloaded. - `DownloadURLExpiry Time` Timestamp when the download URL expires. - `FileSize float64` File size of the recording, in bytes. - `InvokedTime Time` Timestamp when this recording was invoked. - `OutputFileName string` File name of the recording. - `SessionID string` ID of the meeting session this recording is for. - `StartedTime Time` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `Status RecordingGetActiveRecordingsResponseDataStatus` Current status of the recording. - `const RecordingGetActiveRecordingsResponseDataStatusInvoked RecordingGetActiveRecordingsResponseDataStatus = "INVOKED"` - `const RecordingGetActiveRecordingsResponseDataStatusRecording RecordingGetActiveRecordingsResponseDataStatus = "RECORDING"` - `const RecordingGetActiveRecordingsResponseDataStatusUploading RecordingGetActiveRecordingsResponseDataStatus = "UPLOADING"` - `const RecordingGetActiveRecordingsResponseDataStatusUploaded RecordingGetActiveRecordingsResponseDataStatus = "UPLOADED"` - `const RecordingGetActiveRecordingsResponseDataStatusErrored RecordingGetActiveRecordingsResponseDataStatus = "ERRORED"` - `const RecordingGetActiveRecordingsResponseDataStatusPaused RecordingGetActiveRecordingsResponseDataStatus = "PAUSED"` - `StoppedTime Time` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `RecordingDuration int64` Total recording time in seconds. - `Success bool` Success status of the operation ### 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.Recordings.GetActiveRecordings( context.TODO(), "app_id", "meeting_id", realtime_kit.RecordingGetActiveRecordingsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "recording_duration": 0 }, "success": true } ``` ## Fetch details of a recording `client.RealtimeKit.Recordings.GetOneRecording(ctx, appID, recordingID, query) (*RecordingGetOneRecordingResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/recordings/{recording_id}` Returns details of a recording for the given recording ID. ### Parameters - `appID string` The app identifier tag. - `recordingID string` - `query RecordingGetOneRecordingParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type RecordingGetOneRecordingResponse struct{…}` - `Success bool` Success status of the operation - `Data RecordingGetOneRecordingResponseData` Data returned by the operation - `ID string` ID of the recording - `AudioDownloadURL string` If the audio_config is passed, the URL for downloading the audio recording is returned. - `DownloadURL string` URL where the recording can be downloaded. - `DownloadURLExpiry Time` Timestamp when the download URL expires. - `FileSize float64` File size of the recording, in bytes. - `InvokedTime Time` Timestamp when this recording was invoked. - `OutputFileName string` File name of the recording. - `SessionID string` ID of the meeting session this recording is for. - `StartedTime Time` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `Status RecordingGetOneRecordingResponseDataStatus` Current status of the recording. - `const RecordingGetOneRecordingResponseDataStatusInvoked RecordingGetOneRecordingResponseDataStatus = "INVOKED"` - `const RecordingGetOneRecordingResponseDataStatusRecording RecordingGetOneRecordingResponseDataStatus = "RECORDING"` - `const RecordingGetOneRecordingResponseDataStatusUploading RecordingGetOneRecordingResponseDataStatus = "UPLOADING"` - `const RecordingGetOneRecordingResponseDataStatusUploaded RecordingGetOneRecordingResponseDataStatus = "UPLOADED"` - `const RecordingGetOneRecordingResponseDataStatusErrored RecordingGetOneRecordingResponseDataStatus = "ERRORED"` - `const RecordingGetOneRecordingResponseDataStatusPaused RecordingGetOneRecordingResponseDataStatus = "PAUSED"` - `StoppedTime Time` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `RecordingDuration int64` Total recording time in seconds. - `StartReason RecordingGetOneRecordingResponseDataStartReason` - `Caller RecordingGetOneRecordingResponseDataStartReasonCaller` - `Name string` Name of the user who started the recording. - `Type RecordingGetOneRecordingResponseDataStartReasonCallerType` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `const RecordingGetOneRecordingResponseDataStartReasonCallerTypeOrganization RecordingGetOneRecordingResponseDataStartReasonCallerType = "ORGANIZATION"` - `const RecordingGetOneRecordingResponseDataStartReasonCallerTypeUser RecordingGetOneRecordingResponseDataStartReasonCallerType = "USER"` - `UserID string` The user ID of the person who started the recording. - `Reason RecordingGetOneRecordingResponseDataStartReasonReason` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `const RecordingGetOneRecordingResponseDataStartReasonReasonAPICall RecordingGetOneRecordingResponseDataStartReasonReason = "API_CALL"` - `const RecordingGetOneRecordingResponseDataStartReasonReasonRecordOnStart RecordingGetOneRecordingResponseDataStartReasonReason = "RECORD_ON_START"` - `StopReason RecordingGetOneRecordingResponseDataStopReason` - `Caller RecordingGetOneRecordingResponseDataStopReasonCaller` - `Name string` Name of the user who stopped the recording. - `Type RecordingGetOneRecordingResponseDataStopReasonCallerType` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `const RecordingGetOneRecordingResponseDataStopReasonCallerTypeOrganization RecordingGetOneRecordingResponseDataStopReasonCallerType = "ORGANIZATION"` - `const RecordingGetOneRecordingResponseDataStopReasonCallerTypeUser RecordingGetOneRecordingResponseDataStopReasonCallerType = "USER"` - `UserID string` The user ID of the person who stopped the recording. - `Reason RecordingGetOneRecordingResponseDataStopReasonReason` Specifies the reason why the recording stopped. - `const RecordingGetOneRecordingResponseDataStopReasonReasonAPICall RecordingGetOneRecordingResponseDataStopReasonReason = "API_CALL"` - `const RecordingGetOneRecordingResponseDataStopReasonReasonInternalError RecordingGetOneRecordingResponseDataStopReasonReason = "INTERNAL_ERROR"` - `const RecordingGetOneRecordingResponseDataStopReasonReasonAllPeersLeft RecordingGetOneRecordingResponseDataStopReasonReason = "ALL_PEERS_LEFT"` - `StorageConfig RecordingGetOneRecordingResponseDataStorageConfig` - `Type RecordingGetOneRecordingResponseDataStorageConfigType` Type of storage media. - `const RecordingGetOneRecordingResponseDataStorageConfigTypeAws RecordingGetOneRecordingResponseDataStorageConfigType = "aws"` - `const RecordingGetOneRecordingResponseDataStorageConfigTypeAzure RecordingGetOneRecordingResponseDataStorageConfigType = "azure"` - `const RecordingGetOneRecordingResponseDataStorageConfigTypeDigitalocean RecordingGetOneRecordingResponseDataStorageConfigType = "digitalocean"` - `const RecordingGetOneRecordingResponseDataStorageConfigTypeGcs RecordingGetOneRecordingResponseDataStorageConfigType = "gcs"` - `const RecordingGetOneRecordingResponseDataStorageConfigTypeSftp RecordingGetOneRecordingResponseDataStorageConfigType = "sftp"` - `AccessKey string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `AuthMethod RecordingGetOneRecordingResponseDataStorageConfigAuthMethod` Authentication method used for "sftp" type storage medium - `const RecordingGetOneRecordingResponseDataStorageConfigAuthMethodKey RecordingGetOneRecordingResponseDataStorageConfigAuthMethod = "KEY"` - `const RecordingGetOneRecordingResponseDataStorageConfigAuthMethodPassword RecordingGetOneRecordingResponseDataStorageConfigAuthMethod = "PASSWORD"` - `Bucket string` Name of the storage medium's bucket. - `Host string` SSH destination server host for SFTP type storage medium - `Password string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `Path string` Path relative to the bucket root at which the recording will be placed. - `Port float64` SSH destination server port for SFTP type storage medium - `PrivateKey string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `Region string` Region of the storage medium. - `Secret string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `Username string` SSH destination server username for SFTP type storage medium ### 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.Recordings.GetOneRecording( context.TODO(), "app_id", "recording_id", realtime_kit.RecordingGetOneRecordingParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Success) } ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "recording_duration": 0, "start_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "stop_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" } } } ``` ## Pause/Resume/Stop recording `client.RealtimeKit.Recordings.PauseResumeStopRecording(ctx, appID, recordingID, params) (*RecordingPauseResumeStopRecordingResponse, error)` **put** `/accounts/{account_id}/realtime/kit/{app_id}/recordings/{recording_id}` Pause/Resume/Stop a given recording ID. ### Parameters - `appID string` - `recordingID string` - `params RecordingPauseResumeStopRecordingParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Action param.Field[RecordingPauseResumeStopRecordingParamsAction]` Body param - `const RecordingPauseResumeStopRecordingParamsActionStop RecordingPauseResumeStopRecordingParamsAction = "stop"` - `const RecordingPauseResumeStopRecordingParamsActionPause RecordingPauseResumeStopRecordingParamsAction = "pause"` - `const RecordingPauseResumeStopRecordingParamsActionResume RecordingPauseResumeStopRecordingParamsAction = "resume"` ### Returns - `type RecordingPauseResumeStopRecordingResponse struct{…}` - `Success bool` Success status of the operation - `Data RecordingPauseResumeStopRecordingResponseData` Data returned by the operation - `ID string` ID of the recording - `AudioDownloadURL string` If the audio_config is passed, the URL for downloading the audio recording is returned. - `DownloadURL string` URL where the recording can be downloaded. - `DownloadURLExpiry Time` Timestamp when the download URL expires. - `FileSize float64` File size of the recording, in bytes. - `InvokedTime Time` Timestamp when this recording was invoked. - `OutputFileName string` File name of the recording. - `SessionID string` ID of the meeting session this recording is for. - `StartedTime Time` Timestamp when this recording actually started after being invoked. Usually a few seconds after `invoked_time`. - `Status RecordingPauseResumeStopRecordingResponseDataStatus` Current status of the recording. - `const RecordingPauseResumeStopRecordingResponseDataStatusInvoked RecordingPauseResumeStopRecordingResponseDataStatus = "INVOKED"` - `const RecordingPauseResumeStopRecordingResponseDataStatusRecording RecordingPauseResumeStopRecordingResponseDataStatus = "RECORDING"` - `const RecordingPauseResumeStopRecordingResponseDataStatusUploading RecordingPauseResumeStopRecordingResponseDataStatus = "UPLOADING"` - `const RecordingPauseResumeStopRecordingResponseDataStatusUploaded RecordingPauseResumeStopRecordingResponseDataStatus = "UPLOADED"` - `const RecordingPauseResumeStopRecordingResponseDataStatusErrored RecordingPauseResumeStopRecordingResponseDataStatus = "ERRORED"` - `const RecordingPauseResumeStopRecordingResponseDataStatusPaused RecordingPauseResumeStopRecordingResponseDataStatus = "PAUSED"` - `StoppedTime Time` Timestamp when this recording was stopped. Optional; is present only when the recording has actually been stopped. - `RecordingDuration int64` Total recording time in seconds. - `StartReason RecordingPauseResumeStopRecordingResponseDataStartReason` - `Caller RecordingPauseResumeStopRecordingResponseDataStartReasonCaller` - `Name string` Name of the user who started the recording. - `Type RecordingPauseResumeStopRecordingResponseDataStartReasonCallerType` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `const RecordingPauseResumeStopRecordingResponseDataStartReasonCallerTypeOrganization RecordingPauseResumeStopRecordingResponseDataStartReasonCallerType = "ORGANIZATION"` - `const RecordingPauseResumeStopRecordingResponseDataStartReasonCallerTypeUser RecordingPauseResumeStopRecordingResponseDataStartReasonCallerType = "USER"` - `UserID string` The user ID of the person who started the recording. - `Reason RecordingPauseResumeStopRecordingResponseDataStartReasonReason` Specifies if the recording was started using the "Start a Recording"API or using the parameter RECORD_ON_START in the "Create a meeting" API. If the recording is initiated using the "RECORD_ON_START" parameter, the user details will not be populated. - `const RecordingPauseResumeStopRecordingResponseDataStartReasonReasonAPICall RecordingPauseResumeStopRecordingResponseDataStartReasonReason = "API_CALL"` - `const RecordingPauseResumeStopRecordingResponseDataStartReasonReasonRecordOnStart RecordingPauseResumeStopRecordingResponseDataStartReasonReason = "RECORD_ON_START"` - `StopReason RecordingPauseResumeStopRecordingResponseDataStopReason` - `Caller RecordingPauseResumeStopRecordingResponseDataStopReasonCaller` - `Name string` Name of the user who stopped the recording. - `Type RecordingPauseResumeStopRecordingResponseDataStopReasonCallerType` The type can be an App or a user. If the type is `user`, then only the `user_Id` and `name` are returned. - `const RecordingPauseResumeStopRecordingResponseDataStopReasonCallerTypeOrganization RecordingPauseResumeStopRecordingResponseDataStopReasonCallerType = "ORGANIZATION"` - `const RecordingPauseResumeStopRecordingResponseDataStopReasonCallerTypeUser RecordingPauseResumeStopRecordingResponseDataStopReasonCallerType = "USER"` - `UserID string` The user ID of the person who stopped the recording. - `Reason RecordingPauseResumeStopRecordingResponseDataStopReasonReason` Specifies the reason why the recording stopped. - `const RecordingPauseResumeStopRecordingResponseDataStopReasonReasonAPICall RecordingPauseResumeStopRecordingResponseDataStopReasonReason = "API_CALL"` - `const RecordingPauseResumeStopRecordingResponseDataStopReasonReasonInternalError RecordingPauseResumeStopRecordingResponseDataStopReasonReason = "INTERNAL_ERROR"` - `const RecordingPauseResumeStopRecordingResponseDataStopReasonReasonAllPeersLeft RecordingPauseResumeStopRecordingResponseDataStopReasonReason = "ALL_PEERS_LEFT"` - `StorageConfig RecordingPauseResumeStopRecordingResponseDataStorageConfig` - `Type RecordingPauseResumeStopRecordingResponseDataStorageConfigType` Type of storage media. - `const RecordingPauseResumeStopRecordingResponseDataStorageConfigTypeAws RecordingPauseResumeStopRecordingResponseDataStorageConfigType = "aws"` - `const RecordingPauseResumeStopRecordingResponseDataStorageConfigTypeAzure RecordingPauseResumeStopRecordingResponseDataStorageConfigType = "azure"` - `const RecordingPauseResumeStopRecordingResponseDataStorageConfigTypeDigitalocean RecordingPauseResumeStopRecordingResponseDataStorageConfigType = "digitalocean"` - `const RecordingPauseResumeStopRecordingResponseDataStorageConfigTypeGcs RecordingPauseResumeStopRecordingResponseDataStorageConfigType = "gcs"` - `const RecordingPauseResumeStopRecordingResponseDataStorageConfigTypeSftp RecordingPauseResumeStopRecordingResponseDataStorageConfigType = "sftp"` - `AccessKey string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `AuthMethod RecordingPauseResumeStopRecordingResponseDataStorageConfigAuthMethod` Authentication method used for "sftp" type storage medium - `const RecordingPauseResumeStopRecordingResponseDataStorageConfigAuthMethodKey RecordingPauseResumeStopRecordingResponseDataStorageConfigAuthMethod = "KEY"` - `const RecordingPauseResumeStopRecordingResponseDataStorageConfigAuthMethodPassword RecordingPauseResumeStopRecordingResponseDataStorageConfigAuthMethod = "PASSWORD"` - `Bucket string` Name of the storage medium's bucket. - `Host string` SSH destination server host for SFTP type storage medium - `Password string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `Path string` Path relative to the bucket root at which the recording will be placed. - `Port float64` SSH destination server port for SFTP type storage medium - `PrivateKey string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `Region string` Region of the storage medium. - `Secret string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `Username string` SSH destination server username for SFTP type storage medium ### 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.Recordings.PauseResumeStopRecording( context.TODO(), "2a95132c15732412d22c1476fa83f27a", "recording_id", realtime_kit.RecordingPauseResumeStopRecordingParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Action: cloudflare.F(realtime_kit.RecordingPauseResumeStopRecordingParamsActionStop), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Success) } ``` #### Response ```json { "success": true, "data": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "audio_download_url": "https://example.com", "download_url": "https://example.com", "download_url_expiry": "2019-12-27T18:11:19.117Z", "file_size": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "output_file_name": "output_file_name", "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "started_time": "2019-12-27T18:11:19.117Z", "status": "INVOKED", "stopped_time": "2019-12-27T18:11:19.117Z", "recording_duration": 0, "start_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "stop_reason": { "caller": { "name": "RealtimeKit_test", "type": "ORGANIZATION", "user_Id": "d61f6956-e68f-4375-bf10-c38a704d1bec" }, "reason": "API_CALL" }, "storage_config": { "type": "aws", "auth_method": "KEY", "bucket": "bucket", "host": "host", "password": "password", "path": "path", "port": 0, "private_key": "private_key", "region": "us-east-1", "secret": "secret", "username": "username" } } } ``` ## Start recording audio and video tracks `client.RealtimeKit.Recordings.StartTrackRecording(ctx, appID, params) error` **post** `/accounts/{account_id}/realtime/kit/{app_id}/recordings/track` Starts a track recording in a meeting. Track recordings consist of "layers". Layers are used to map audio/video tracks in a meeting to output destinations. More information about track recordings is available in the [Track Recordings Guide Page](https://docs.realtime.cloudflare.com/guides/capabilities/recording/recording-overview). ### Parameters - `appID string` The app identifier tag. - `params RecordingStartTrackRecordingParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Layers param.Field[map[string, RecordingStartTrackRecordingParamsLayers]]` Body param - `FileNamePrefix string` A file name prefix to apply for files generated from this layer - `Outputs []RecordingStartTrackRecordingParamsLayersOutput` - `StorageConfig RecordingStartTrackRecordingParamsLayersOutputsStorageConfig` - `Type RecordingStartTrackRecordingParamsLayersOutputsStorageConfigType` Type of storage media. - `const RecordingStartTrackRecordingParamsLayersOutputsStorageConfigTypeAws RecordingStartTrackRecordingParamsLayersOutputsStorageConfigType = "aws"` - `const RecordingStartTrackRecordingParamsLayersOutputsStorageConfigTypeAzure RecordingStartTrackRecordingParamsLayersOutputsStorageConfigType = "azure"` - `const RecordingStartTrackRecordingParamsLayersOutputsStorageConfigTypeDigitalocean RecordingStartTrackRecordingParamsLayersOutputsStorageConfigType = "digitalocean"` - `const RecordingStartTrackRecordingParamsLayersOutputsStorageConfigTypeGcs RecordingStartTrackRecordingParamsLayersOutputsStorageConfigType = "gcs"` - `const RecordingStartTrackRecordingParamsLayersOutputsStorageConfigTypeSftp RecordingStartTrackRecordingParamsLayersOutputsStorageConfigType = "sftp"` - `AccessKey string` Access key of the storage medium. Access key is not required for the `gcs` storage media type. Note that this field is not readable by clients, only writeable. - `AuthMethod RecordingStartTrackRecordingParamsLayersOutputsStorageConfigAuthMethod` Authentication method used for "sftp" type storage medium - `const RecordingStartTrackRecordingParamsLayersOutputsStorageConfigAuthMethodKey RecordingStartTrackRecordingParamsLayersOutputsStorageConfigAuthMethod = "KEY"` - `const RecordingStartTrackRecordingParamsLayersOutputsStorageConfigAuthMethodPassword RecordingStartTrackRecordingParamsLayersOutputsStorageConfigAuthMethod = "PASSWORD"` - `Bucket string` Name of the storage medium's bucket. - `Host string` SSH destination server host for SFTP type storage medium - `Password string` SSH destination server password for SFTP type storage medium when auth_method is "PASSWORD". If auth_method is "KEY", this specifies the password for the ssh private key. - `Path string` Path relative to the bucket root at which the recording will be placed. - `Port float64` SSH destination server port for SFTP type storage medium - `PrivateKey string` Private key used to login to destination SSH server for SFTP type storage medium, when auth_method used is "KEY" - `Region string` Region of the storage medium. - `Secret string` Secret key of the storage medium. Similar to `access_key`, it is only writeable by clients, not readable. - `Username string` SSH destination server username for SFTP type storage medium - `Type RecordingStartTrackRecordingParamsLayersOutputsType` The type of output destination this layer is being exported to. - `const RecordingStartTrackRecordingParamsLayersOutputsTypeRealtimekitBucket RecordingStartTrackRecordingParamsLayersOutputsType = "REALTIMEKIT_BUCKET"` - `const RecordingStartTrackRecordingParamsLayersOutputsTypeStorageConfig RecordingStartTrackRecordingParamsLayersOutputsType = "STORAGE_CONFIG"` - `MeetingID param.Field[string]` Body param: ID of the meeting to record. - `MaxSeconds param.Field[float64]` Body param: Maximum seconds this recording should be active for (beta) ### Example ```go package main import ( "context" "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"), ) err := client.RealtimeKit.Recordings.StartTrackRecording( context.TODO(), "app_id", realtime_kit.RecordingStartTrackRecordingParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Layers: cloudflare.F(map[string]realtime_kit.RecordingStartTrackRecordingParamsLayers{ "default": realtime_kit.RecordingStartTrackRecordingParamsLayers{ FileNamePrefix: cloudflare.F("string"), Outputs: cloudflare.F([]realtime_kit.RecordingStartTrackRecordingParamsLayersOutput{realtime_kit.RecordingStartTrackRecordingParamsLayersOutput{ Type: cloudflare.F(realtime_kit.RecordingStartTrackRecordingParamsLayersOutputsTypeRealtimekitBucket), }}), }, "default-video": realtime_kit.RecordingStartTrackRecordingParamsLayers{ FileNamePrefix: cloudflare.F("string"), Outputs: cloudflare.F([]realtime_kit.RecordingStartTrackRecordingParamsLayersOutput{realtime_kit.RecordingStartTrackRecordingParamsLayersOutput{ Type: cloudflare.F(realtime_kit.RecordingStartTrackRecordingParamsLayersOutputsTypeRealtimekitBucket), }}), }, }), MeetingID: cloudflare.F("string"), MaxSeconds: cloudflare.F(60.000000), }, ) if err != nil { panic(err.Error()) } } ``` # Webhooks ## Fetch all webhooks details `client.RealtimeKit.Webhooks.GetWebhooks(ctx, appID, query) (*WebhookGetWebhooksResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks` Returns details of all webhooks for an App. ### Parameters - `appID string` The app identifier tag. - `query WebhookGetWebhooksParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type WebhookGetWebhooksResponse struct{…}` - `Data []WebhookGetWebhooksResponseData` - `ID string` ID of the webhook - `CreatedAt Time` Timestamp when this webhook was created - `Enabled bool` Set to true if the webhook is active - `Events []WebhookGetWebhooksResponseDataEvent` Events this webhook will send updates for - `const WebhookGetWebhooksResponseDataEventMeetingStarted WebhookGetWebhooksResponseDataEvent = "meeting.started"` - `const WebhookGetWebhooksResponseDataEventMeetingEnded WebhookGetWebhooksResponseDataEvent = "meeting.ended"` - `const WebhookGetWebhooksResponseDataEventMeetingParticipantJoined WebhookGetWebhooksResponseDataEvent = "meeting.participantJoined"` - `const WebhookGetWebhooksResponseDataEventMeetingParticipantLeft WebhookGetWebhooksResponseDataEvent = "meeting.participantLeft"` - `const WebhookGetWebhooksResponseDataEventMeetingChatSynced WebhookGetWebhooksResponseDataEvent = "meeting.chatSynced"` - `const WebhookGetWebhooksResponseDataEventRecordingStatusUpdate WebhookGetWebhooksResponseDataEvent = "recording.statusUpdate"` - `const WebhookGetWebhooksResponseDataEventLivestreamingStatusUpdate WebhookGetWebhooksResponseDataEvent = "livestreaming.statusUpdate"` - `const WebhookGetWebhooksResponseDataEventMeetingTranscript WebhookGetWebhooksResponseDataEvent = "meeting.transcript"` - `const WebhookGetWebhooksResponseDataEventMeetingSummary WebhookGetWebhooksResponseDataEvent = "meeting.summary"` - `Name string` Name of the webhook - `UpdatedAt Time` Timestamp when this webhook was updated - `URL string` URL the webhook will send events to - `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.Webhooks.GetWebhooks( context.TODO(), "app_id", realtime_kit.WebhookGetWebhooksParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": [ { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" } ], "success": true } ``` ## Add a webhook `client.RealtimeKit.Webhooks.NewWebhook(ctx, appID, params) (*WebhookNewWebhookResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks` Adds a new webhook to an App. ### Parameters - `appID string` The app identifier tag. - `params WebhookNewWebhookParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Events param.Field[[]WebhookNewWebhookParamsEvent]` Body param: Events that this webhook will get triggered by - `const WebhookNewWebhookParamsEventMeetingStarted WebhookNewWebhookParamsEvent = "meeting.started"` - `const WebhookNewWebhookParamsEventMeetingEnded WebhookNewWebhookParamsEvent = "meeting.ended"` - `const WebhookNewWebhookParamsEventMeetingParticipantJoined WebhookNewWebhookParamsEvent = "meeting.participantJoined"` - `const WebhookNewWebhookParamsEventMeetingParticipantLeft WebhookNewWebhookParamsEvent = "meeting.participantLeft"` - `const WebhookNewWebhookParamsEventMeetingChatSynced WebhookNewWebhookParamsEvent = "meeting.chatSynced"` - `const WebhookNewWebhookParamsEventRecordingStatusUpdate WebhookNewWebhookParamsEvent = "recording.statusUpdate"` - `const WebhookNewWebhookParamsEventLivestreamingStatusUpdate WebhookNewWebhookParamsEvent = "livestreaming.statusUpdate"` - `const WebhookNewWebhookParamsEventMeetingTranscript WebhookNewWebhookParamsEvent = "meeting.transcript"` - `const WebhookNewWebhookParamsEventMeetingSummary WebhookNewWebhookParamsEvent = "meeting.summary"` - `Name param.Field[string]` Body param: Name of the webhook - `URL param.Field[string]` Body param: URL this webhook will send events to - `Enabled param.Field[bool]` Body param: Set whether or not the webhook should be active when created ### Returns - `type WebhookNewWebhookResponse struct{…}` - `Data WebhookNewWebhookResponseData` - `ID string` ID of the webhook - `CreatedAt Time` Timestamp when this webhook was created - `Enabled bool` Set to true if the webhook is active - `Events []WebhookNewWebhookResponseDataEvent` Events this webhook will send updates for - `const WebhookNewWebhookResponseDataEventMeetingStarted WebhookNewWebhookResponseDataEvent = "meeting.started"` - `const WebhookNewWebhookResponseDataEventMeetingEnded WebhookNewWebhookResponseDataEvent = "meeting.ended"` - `const WebhookNewWebhookResponseDataEventMeetingParticipantJoined WebhookNewWebhookResponseDataEvent = "meeting.participantJoined"` - `const WebhookNewWebhookResponseDataEventMeetingParticipantLeft WebhookNewWebhookResponseDataEvent = "meeting.participantLeft"` - `const WebhookNewWebhookResponseDataEventMeetingChatSynced WebhookNewWebhookResponseDataEvent = "meeting.chatSynced"` - `const WebhookNewWebhookResponseDataEventRecordingStatusUpdate WebhookNewWebhookResponseDataEvent = "recording.statusUpdate"` - `const WebhookNewWebhookResponseDataEventLivestreamingStatusUpdate WebhookNewWebhookResponseDataEvent = "livestreaming.statusUpdate"` - `const WebhookNewWebhookResponseDataEventMeetingTranscript WebhookNewWebhookResponseDataEvent = "meeting.transcript"` - `const WebhookNewWebhookResponseDataEventMeetingSummary WebhookNewWebhookResponseDataEvent = "meeting.summary"` - `Name string` Name of the webhook - `UpdatedAt Time` Timestamp when this webhook was updated - `URL string` URL the webhook will send events to - `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.Webhooks.NewWebhook( context.TODO(), "app_id", realtime_kit.WebhookNewWebhookParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Events: cloudflare.F([]realtime_kit.WebhookNewWebhookParamsEvent{realtime_kit.WebhookNewWebhookParamsEventMeetingStarted, realtime_kit.WebhookNewWebhookParamsEventMeetingEnded, realtime_kit.WebhookNewWebhookParamsEventMeetingParticipantJoined, realtime_kit.WebhookNewWebhookParamsEventMeetingParticipantLeft, realtime_kit.WebhookNewWebhookParamsEventMeetingChatSynced, realtime_kit.WebhookNewWebhookParamsEventRecordingStatusUpdate, realtime_kit.WebhookNewWebhookParamsEventLivestreamingStatusUpdate, realtime_kit.WebhookNewWebhookParamsEventMeetingTranscript, realtime_kit.WebhookNewWebhookParamsEventMeetingSummary}), Name: cloudflare.F("All events webhook"), URL: cloudflare.F("https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Fetch details of a webhook `client.RealtimeKit.Webhooks.GetWebhookByID(ctx, appID, webhookID, query) (*WebhookGetWebhookByIDResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Returns webhook details for the given webhook ID. ### Parameters - `appID string` The app identifier tag. - `webhookID string` - `query WebhookGetWebhookByIDParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type WebhookGetWebhookByIDResponse struct{…}` - `Data WebhookGetWebhookByIDResponseData` - `ID string` ID of the webhook - `CreatedAt Time` Timestamp when this webhook was created - `Enabled bool` Set to true if the webhook is active - `Events []WebhookGetWebhookByIDResponseDataEvent` Events this webhook will send updates for - `const WebhookGetWebhookByIDResponseDataEventMeetingStarted WebhookGetWebhookByIDResponseDataEvent = "meeting.started"` - `const WebhookGetWebhookByIDResponseDataEventMeetingEnded WebhookGetWebhookByIDResponseDataEvent = "meeting.ended"` - `const WebhookGetWebhookByIDResponseDataEventMeetingParticipantJoined WebhookGetWebhookByIDResponseDataEvent = "meeting.participantJoined"` - `const WebhookGetWebhookByIDResponseDataEventMeetingParticipantLeft WebhookGetWebhookByIDResponseDataEvent = "meeting.participantLeft"` - `const WebhookGetWebhookByIDResponseDataEventMeetingChatSynced WebhookGetWebhookByIDResponseDataEvent = "meeting.chatSynced"` - `const WebhookGetWebhookByIDResponseDataEventRecordingStatusUpdate WebhookGetWebhookByIDResponseDataEvent = "recording.statusUpdate"` - `const WebhookGetWebhookByIDResponseDataEventLivestreamingStatusUpdate WebhookGetWebhookByIDResponseDataEvent = "livestreaming.statusUpdate"` - `const WebhookGetWebhookByIDResponseDataEventMeetingTranscript WebhookGetWebhookByIDResponseDataEvent = "meeting.transcript"` - `const WebhookGetWebhookByIDResponseDataEventMeetingSummary WebhookGetWebhookByIDResponseDataEvent = "meeting.summary"` - `Name string` Name of the webhook - `UpdatedAt Time` Timestamp when this webhook was updated - `URL string` URL the webhook will send events to - `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.Webhooks.GetWebhookByID( context.TODO(), "app_id", "webhook_id", realtime_kit.WebhookGetWebhookByIDParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Replace a webhook `client.RealtimeKit.Webhooks.ReplaceWebhook(ctx, appID, webhookID, params) (*WebhookReplaceWebhookResponse, error)` **put** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Replace all details for the given webhook ID. ### Parameters - `appID string` The app identifier tag. - `webhookID string` - `params WebhookReplaceWebhookParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Events param.Field[[]WebhookReplaceWebhookParamsEvent]` Body param: Events that this webhook will get triggered by - `const WebhookReplaceWebhookParamsEventMeetingStarted WebhookReplaceWebhookParamsEvent = "meeting.started"` - `const WebhookReplaceWebhookParamsEventMeetingEnded WebhookReplaceWebhookParamsEvent = "meeting.ended"` - `const WebhookReplaceWebhookParamsEventMeetingParticipantJoined WebhookReplaceWebhookParamsEvent = "meeting.participantJoined"` - `const WebhookReplaceWebhookParamsEventMeetingParticipantLeft WebhookReplaceWebhookParamsEvent = "meeting.participantLeft"` - `const WebhookReplaceWebhookParamsEventMeetingChatSynced WebhookReplaceWebhookParamsEvent = "meeting.chatSynced"` - `const WebhookReplaceWebhookParamsEventRecordingStatusUpdate WebhookReplaceWebhookParamsEvent = "recording.statusUpdate"` - `const WebhookReplaceWebhookParamsEventLivestreamingStatusUpdate WebhookReplaceWebhookParamsEvent = "livestreaming.statusUpdate"` - `const WebhookReplaceWebhookParamsEventMeetingTranscript WebhookReplaceWebhookParamsEvent = "meeting.transcript"` - `const WebhookReplaceWebhookParamsEventMeetingSummary WebhookReplaceWebhookParamsEvent = "meeting.summary"` - `Name param.Field[string]` Body param: Name of the webhook - `URL param.Field[string]` Body param: URL this webhook will send events to - `Enabled param.Field[bool]` Body param: Set whether or not the webhook should be active when created ### Returns - `type WebhookReplaceWebhookResponse struct{…}` - `Data WebhookReplaceWebhookResponseData` - `ID string` ID of the webhook - `CreatedAt Time` Timestamp when this webhook was created - `Enabled bool` Set to true if the webhook is active - `Events []WebhookReplaceWebhookResponseDataEvent` Events this webhook will send updates for - `const WebhookReplaceWebhookResponseDataEventMeetingStarted WebhookReplaceWebhookResponseDataEvent = "meeting.started"` - `const WebhookReplaceWebhookResponseDataEventMeetingEnded WebhookReplaceWebhookResponseDataEvent = "meeting.ended"` - `const WebhookReplaceWebhookResponseDataEventMeetingParticipantJoined WebhookReplaceWebhookResponseDataEvent = "meeting.participantJoined"` - `const WebhookReplaceWebhookResponseDataEventMeetingParticipantLeft WebhookReplaceWebhookResponseDataEvent = "meeting.participantLeft"` - `const WebhookReplaceWebhookResponseDataEventMeetingChatSynced WebhookReplaceWebhookResponseDataEvent = "meeting.chatSynced"` - `const WebhookReplaceWebhookResponseDataEventRecordingStatusUpdate WebhookReplaceWebhookResponseDataEvent = "recording.statusUpdate"` - `const WebhookReplaceWebhookResponseDataEventLivestreamingStatusUpdate WebhookReplaceWebhookResponseDataEvent = "livestreaming.statusUpdate"` - `const WebhookReplaceWebhookResponseDataEventMeetingTranscript WebhookReplaceWebhookResponseDataEvent = "meeting.transcript"` - `const WebhookReplaceWebhookResponseDataEventMeetingSummary WebhookReplaceWebhookResponseDataEvent = "meeting.summary"` - `Name string` Name of the webhook - `UpdatedAt Time` Timestamp when this webhook was updated - `URL string` URL the webhook will send events to - `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.Webhooks.ReplaceWebhook( context.TODO(), "app_id", "webhook_id", realtime_kit.WebhookReplaceWebhookParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Events: cloudflare.F([]realtime_kit.WebhookReplaceWebhookParamsEvent{realtime_kit.WebhookReplaceWebhookParamsEventMeetingStarted, realtime_kit.WebhookReplaceWebhookParamsEventMeetingEnded, realtime_kit.WebhookReplaceWebhookParamsEventMeetingParticipantJoined, realtime_kit.WebhookReplaceWebhookParamsEventMeetingParticipantLeft, realtime_kit.WebhookReplaceWebhookParamsEventMeetingChatSynced, realtime_kit.WebhookReplaceWebhookParamsEventRecordingStatusUpdate, realtime_kit.WebhookReplaceWebhookParamsEventLivestreamingStatusUpdate, realtime_kit.WebhookReplaceWebhookParamsEventMeetingTranscript, realtime_kit.WebhookReplaceWebhookParamsEventMeetingSummary}), Name: cloudflare.F("All events webhook"), URL: cloudflare.F("https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Edit a webhook `client.RealtimeKit.Webhooks.EditWebhook(ctx, appID, webhookID, params) (*WebhookEditWebhookResponse, error)` **patch** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Edits the webhook details for the given webhook ID. ### Parameters - `appID string` The app identifier tag. - `webhookID string` - `params WebhookEditWebhookParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Enabled param.Field[bool]` Body param - `Events param.Field[[]WebhookEditWebhookParamsEvent]` Body param: Events that the webhook will get triggered by - `const WebhookEditWebhookParamsEventMeetingStarted WebhookEditWebhookParamsEvent = "meeting.started"` - `const WebhookEditWebhookParamsEventMeetingEnded WebhookEditWebhookParamsEvent = "meeting.ended"` - `const WebhookEditWebhookParamsEventMeetingParticipantJoined WebhookEditWebhookParamsEvent = "meeting.participantJoined"` - `const WebhookEditWebhookParamsEventMeetingParticipantLeft WebhookEditWebhookParamsEvent = "meeting.participantLeft"` - `const WebhookEditWebhookParamsEventRecordingStatusUpdate WebhookEditWebhookParamsEvent = "recording.statusUpdate"` - `const WebhookEditWebhookParamsEventLivestreamingStatusUpdate WebhookEditWebhookParamsEvent = "livestreaming.statusUpdate"` - `const WebhookEditWebhookParamsEventMeetingChatSynced WebhookEditWebhookParamsEvent = "meeting.chatSynced"` - `const WebhookEditWebhookParamsEventMeetingTranscript WebhookEditWebhookParamsEvent = "meeting.transcript"` - `const WebhookEditWebhookParamsEventMeetingSummary WebhookEditWebhookParamsEvent = "meeting.summary"` - `Name param.Field[string]` Body param: Name of the webhook - `URL param.Field[string]` Body param: URL the webhook will send events to ### Returns - `type WebhookEditWebhookResponse struct{…}` - `Data WebhookEditWebhookResponseData` - `ID string` ID of the webhook - `CreatedAt Time` Timestamp when this webhook was created - `Enabled bool` Set to true if the webhook is active - `Events []WebhookEditWebhookResponseDataEvent` Events this webhook will send updates for - `const WebhookEditWebhookResponseDataEventMeetingStarted WebhookEditWebhookResponseDataEvent = "meeting.started"` - `const WebhookEditWebhookResponseDataEventMeetingEnded WebhookEditWebhookResponseDataEvent = "meeting.ended"` - `const WebhookEditWebhookResponseDataEventMeetingParticipantJoined WebhookEditWebhookResponseDataEvent = "meeting.participantJoined"` - `const WebhookEditWebhookResponseDataEventMeetingParticipantLeft WebhookEditWebhookResponseDataEvent = "meeting.participantLeft"` - `const WebhookEditWebhookResponseDataEventMeetingChatSynced WebhookEditWebhookResponseDataEvent = "meeting.chatSynced"` - `const WebhookEditWebhookResponseDataEventRecordingStatusUpdate WebhookEditWebhookResponseDataEvent = "recording.statusUpdate"` - `const WebhookEditWebhookResponseDataEventLivestreamingStatusUpdate WebhookEditWebhookResponseDataEvent = "livestreaming.statusUpdate"` - `const WebhookEditWebhookResponseDataEventMeetingTranscript WebhookEditWebhookResponseDataEvent = "meeting.transcript"` - `const WebhookEditWebhookResponseDataEventMeetingSummary WebhookEditWebhookResponseDataEvent = "meeting.summary"` - `Name string` Name of the webhook - `UpdatedAt Time` Timestamp when this webhook was updated - `URL string` URL the webhook will send events to - `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.Webhooks.EditWebhook( context.TODO(), "app_id", "webhook_id", realtime_kit.WebhookEditWebhookParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` ## Delete a webhook `client.RealtimeKit.Webhooks.DeleteWebhook(ctx, appID, webhookID, body) (*WebhookDeleteWebhookResponse, error)` **delete** `/accounts/{account_id}/realtime/kit/{app_id}/webhooks/{webhook_id}` Removes a webhook for the given webhook ID. ### Parameters - `appID string` The app identifier tag. - `webhookID string` - `body WebhookDeleteWebhookParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type WebhookDeleteWebhookResponse struct{…}` - `Data WebhookDeleteWebhookResponseData` - `ID string` ID of the webhook - `CreatedAt Time` Timestamp when this webhook was created - `Enabled bool` Set to true if the webhook is active - `Events []WebhookDeleteWebhookResponseDataEvent` Events this webhook will send updates for - `const WebhookDeleteWebhookResponseDataEventMeetingStarted WebhookDeleteWebhookResponseDataEvent = "meeting.started"` - `const WebhookDeleteWebhookResponseDataEventMeetingEnded WebhookDeleteWebhookResponseDataEvent = "meeting.ended"` - `const WebhookDeleteWebhookResponseDataEventMeetingParticipantJoined WebhookDeleteWebhookResponseDataEvent = "meeting.participantJoined"` - `const WebhookDeleteWebhookResponseDataEventMeetingParticipantLeft WebhookDeleteWebhookResponseDataEvent = "meeting.participantLeft"` - `const WebhookDeleteWebhookResponseDataEventMeetingChatSynced WebhookDeleteWebhookResponseDataEvent = "meeting.chatSynced"` - `const WebhookDeleteWebhookResponseDataEventRecordingStatusUpdate WebhookDeleteWebhookResponseDataEvent = "recording.statusUpdate"` - `const WebhookDeleteWebhookResponseDataEventLivestreamingStatusUpdate WebhookDeleteWebhookResponseDataEvent = "livestreaming.statusUpdate"` - `const WebhookDeleteWebhookResponseDataEventMeetingTranscript WebhookDeleteWebhookResponseDataEvent = "meeting.transcript"` - `const WebhookDeleteWebhookResponseDataEventMeetingSummary WebhookDeleteWebhookResponseDataEvent = "meeting.summary"` - `Name string` Name of the webhook - `UpdatedAt Time` Timestamp when this webhook was updated - `URL string` URL the webhook will send events to - `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.Webhooks.DeleteWebhook( context.TODO(), "app_id", "webhook_id", realtime_kit.WebhookDeleteWebhookParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "0d1f069d-43bb-489a-ad8c-7eb95592ba8e", "created_at": "2022-05-28T07:01:53.075Z", "enabled": true, "events": [ "meeting.started", "meeting.ended", "meeting.participantJoined", "meeting.participantLeft", "meeting.chatSynced", "recording.statusUpdate", "livestreaming.statusUpdate", "meeting.transcript", "meeting.summary" ], "name": "All events webhook", "updated_at": "2022-05-28T07:01:53.075Z", "url": "https://webhook.site/b23a5bbd-c7b0-4ced-a9e2-78ae7889897e" }, "success": true } ``` # Active Session ## Fetch details of an active session `client.RealtimeKit.ActiveSession.GetActiveSession(ctx, appID, meetingID, query) (*ActiveSessionGetActiveSessionResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session` Returns details of an ongoing active session for the given meeting ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `query ActiveSessionGetActiveSessionParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type ActiveSessionGetActiveSessionResponse struct{…}` - `Data ActiveSessionGetActiveSessionResponseData` - `ID string` ID of the session - `AssociatedID string` ID of the meeting this session is associated with. In the case of V2 meetings, it is always a UUID. In V1 meetings, it is a room name of the form `abcdef-ghijkl` - `CreatedAt string` timestamp when session created - `LiveParticipants float64` number of participants currently in the session - `MaxConcurrentParticipants float64` number of maximum participants that were in the session - `MeetingDisplayName string` Title of the meeting this session belongs to - `MinutesConsumed float64` number of minutes consumed since the session started - `OrganizationID string` App id that hosted this session - `StartedAt string` timestamp when session started - `Status ActiveSessionGetActiveSessionResponseDataStatus` current status of session - `const ActiveSessionGetActiveSessionResponseDataStatusLive ActiveSessionGetActiveSessionResponseDataStatus = "LIVE"` - `const ActiveSessionGetActiveSessionResponseDataStatusEnded ActiveSessionGetActiveSessionResponseDataStatus = "ENDED"` - `Type ActiveSessionGetActiveSessionResponseDataType` type of session - `const ActiveSessionGetActiveSessionResponseDataTypeMeeting ActiveSessionGetActiveSessionResponseDataType = "meeting"` - `const ActiveSessionGetActiveSessionResponseDataTypeLivestream ActiveSessionGetActiveSessionResponseDataType = "livestream"` - `const ActiveSessionGetActiveSessionResponseDataTypeParticipant ActiveSessionGetActiveSessionResponseDataType = "participant"` - `UpdatedAt string` timestamp when session was last updated - `BreakoutRooms []unknown` - `EndedAt string` timestamp when session ended - `Meta unknown` Any meta data about session. - `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.ActiveSession.GetActiveSession( context.TODO(), "app_id", "meeting_id", realtime_kit.ActiveSessionGetActiveSessionParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "id", "associated_id": "associated_id", "created_at": "created_at", "live_participants": 0, "max_concurrent_participants": 0, "meeting_display_name": "meeting_display_name", "minutes_consumed": 0, "organization_id": "organization_id", "started_at": "started_at", "status": "LIVE", "type": "meeting", "updated_at": "updated_at", "breakout_rooms": [ {} ], "ended_at": "ended_at", "meta": {} }, "success": true } ``` ## Kick participants from an active session `client.RealtimeKit.ActiveSession.KickParticipants(ctx, appID, meetingID, params) (*ActiveSessionKickParticipantsResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/kick` Kicks one or more participants from an active session using user ID or custom participant ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `params ActiveSessionKickParticipantsParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `CustomParticipantIDs param.Field[[]string]` Body param - `ParticipantIDs param.Field[[]string]` Body param ### Returns - `type ActiveSessionKickParticipantsResponse struct{…}` - `Data ActiveSessionKickParticipantsResponseData` - `Action string` - `Participants []ActiveSessionKickParticipantsResponseDataParticipant` - `ID string` ID of the session participant - `CreatedAt string` - `UpdatedAt string` - `Email string` Email of the session participant. - `Name string` Name of the session participant. - `Picture string` A URL pointing to a picture of the 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.ActiveSession.KickParticipants( context.TODO(), "app_id", "meeting_id", realtime_kit.ActiveSessionKickParticipantsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), CustomParticipantIDs: cloudflare.F([]string{"string"}), ParticipantIDs: cloudflare.F([]string{"string"}), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "action": "action", "participants": [ { "id": "id", "created_at": "created_at", "updated_at": "updated_at", "email": "email", "name": "name", "picture": "picture" } ] }, "success": true } ``` ## Kick all participants `client.RealtimeKit.ActiveSession.KickAllParticipants(ctx, appID, meetingID, body) (*ActiveSessionKickAllParticipantsResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/kick-all` Kicks all participants from an active session for the given meeting ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `body ActiveSessionKickAllParticipantsParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type ActiveSessionKickAllParticipantsResponse struct{…}` - `Data ActiveSessionKickAllParticipantsResponseData` - `Action string` - `KickedParticipantsCount float64` - `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.ActiveSession.KickAllParticipants( context.TODO(), "app_id", "meeting_id", realtime_kit.ActiveSessionKickAllParticipantsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "action": "action", "kicked_participants_count": 0 }, "success": true } ``` ## Create a poll `client.RealtimeKit.ActiveSession.NewPoll(ctx, appID, meetingID, params) (*ActiveSessionNewPollResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-session/poll` Creates a new poll in an active session for the given meeting ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `params ActiveSessionNewPollParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Options param.Field[[]string]` Body param: Different options for the question - `Question param.Field[string]` Body param: Question of the poll - `Anonymous param.Field[bool]` Body param: if voters on a poll are anonymous - `HideVotes param.Field[bool]` Body param: if votes on an option are visible before a person votes ### Returns - `type ActiveSessionNewPollResponse struct{…}` - `Data ActiveSessionNewPollResponseData` - `Action string` - `Poll ActiveSessionNewPollResponseDataPoll` - `ID string` ID of the poll - `Options []ActiveSessionNewPollResponseDataPollOption` Answer options - `Count float64` - `Text string` Text of the answer option - `Votes []ActiveSessionNewPollResponseDataPollOptionsVote` - `ID string` - `Name string` - `Question string` Question asked by the poll - `Anonymous bool` - `CreatedBy string` - `HideVotes bool` - `Voted []string` - `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.ActiveSession.NewPoll( context.TODO(), "app_id", "meeting_id", realtime_kit.ActiveSessionNewPollParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Options: cloudflare.F([]string{"string"}), Question: cloudflare.F("question"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "action": "action", "poll": { "id": "id", "options": [ { "count": 0, "text": "text", "votes": [ { "id": "id", "name": "name" } ] } ], "question": "question", "anonymous": true, "created_by": "created_by", "hide_votes": true, "voted": [ "string" ] } }, "success": true } ``` # Livestreams ## Create an independent livestream `client.RealtimeKit.Livestreams.NewIndependentLivestream(ctx, appID, params) (*LivestreamNewIndependentLivestreamResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/livestreams` Creates a livestream for the given App ID and returns ingest server, stream key, and playback URL. You can pass custom input to the ingest server and stream key, and freely distribute the content using the playback URL on any player that supports HLS/LHLS. ### Parameters - `appID string` The app identifier tag. - `params LivestreamNewIndependentLivestreamParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Name param.Field[string]` Body param: Name of the livestream ### Returns - `type LivestreamNewIndependentLivestreamResponse struct{…}` - `Data LivestreamNewIndependentLivestreamResponseData` - `ID string` The livestream ID. - `Disabled bool` Specifies if the livestream was disabled. - `IngestServer string` The server URL to which the RTMP encoder should send the video and audio data. - `MeetingID string` - `Name string` - `PlaybackURL string` The web address that viewers can use to watch the livestream. - `Status LivestreamNewIndependentLivestreamResponseDataStatus` - `const LivestreamNewIndependentLivestreamResponseDataStatusLive LivestreamNewIndependentLivestreamResponseDataStatus = "LIVE"` - `const LivestreamNewIndependentLivestreamResponseDataStatusIdle LivestreamNewIndependentLivestreamResponseDataStatus = "IDLE"` - `const LivestreamNewIndependentLivestreamResponseDataStatusErrored LivestreamNewIndependentLivestreamResponseDataStatus = "ERRORED"` - `const LivestreamNewIndependentLivestreamResponseDataStatusInvoked LivestreamNewIndependentLivestreamResponseDataStatus = "INVOKED"` - `StreamKey string` Unique key for accessing each livestream. - `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.Livestreams.NewIndependentLivestream( context.TODO(), "app_id", realtime_kit.LivestreamNewIndependentLivestreamParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Name: cloudflare.F("prdmmp-xhycsl"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "disabled": false, "id": "78dd0b50-4147-4bb8-88d3-2ccc2e98bff0", "ingest_server": "rtmps://live.cloudflare.com:443/live/", "meeting_id": null, "name": "Livestreaming-Demo", "playback_url": "https://customer-s8oj0c1n5ek8ah1e.cloudflarestream.com/7de6a3fec0f9c05bf1df140950d3a237/manifest/video.m3u8", "status": "INVOKED", "stream_key": "f26566285faca6fbe2e79a73a66rsrrsrrsr3cde23a2bb7dbc6c2c1761b98f4e4" }, "success": true } ``` ## Fetch all livestreams `client.RealtimeKit.Livestreams.GetAllLivestreams(ctx, appID, params) (*LivestreamGetAllLivestreamsResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/livestreams` Returns details of livestreams associated with the given App ID. It includes livestreams created by your App and RealtimeKit meetings that are livestreamed by your App. If you only want details of livestreams created by your App and not RealtimeKit meetings, you can use the `exclude_meetings` query parameter. ### Parameters - `appID string` The app identifier tag. - `params LivestreamGetAllLivestreamsParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `EndTime param.Field[Time]` Query param: Specify the end time range in ISO format to access the live stream. - `ExcludeMeetings param.Field[bool]` Query param: Exclude the RealtimeKit meetings that are livestreamed. - `PageNo param.Field[int64]` Query param: The page number from which you want your page search results to be displayed. - `PerPage param.Field[int64]` Query param: Number of results per page. - `SortOrder param.Field[LivestreamGetAllLivestreamsParamsSortOrder]` Query param: Specifies the sorting order for the results. - `const LivestreamGetAllLivestreamsParamsSortOrderAsc LivestreamGetAllLivestreamsParamsSortOrder = "ASC"` - `const LivestreamGetAllLivestreamsParamsSortOrderDsc LivestreamGetAllLivestreamsParamsSortOrder = "DSC"` - `StartTime param.Field[Time]` Query param: Specify the start time range in ISO format to access the live stream. - `Status param.Field[LivestreamGetAllLivestreamsParamsStatus]` Query param: Specifies the status of the operation. - `const LivestreamGetAllLivestreamsParamsStatusLive LivestreamGetAllLivestreamsParamsStatus = "LIVE"` - `const LivestreamGetAllLivestreamsParamsStatusIdle LivestreamGetAllLivestreamsParamsStatus = "IDLE"` - `const LivestreamGetAllLivestreamsParamsStatusErrored LivestreamGetAllLivestreamsParamsStatus = "ERRORED"` - `const LivestreamGetAllLivestreamsParamsStatusInvoked LivestreamGetAllLivestreamsParamsStatus = "INVOKED"` ### Returns - `type LivestreamGetAllLivestreamsResponse struct{…}` - `Data LivestreamGetAllLivestreamsResponseData` - `ID string` The ID of the livestream. - `CreatedAt Time` Timestamp the object was created at. The time is returned in ISO format. - `Disabled string` Specifies if the livestream was disabled. - `IngestServer string` The server URL to which the RTMP encoder sends the video and audio data. - `MeetingID string` ID of the meeting. - `Name string` Name of the livestream. - `Paging LivestreamGetAllLivestreamsResponseDataPaging` - `EndOffset int64` - `StartOffset int64` - `TotalCount int64` - `PlaybackURL string` The web address that viewers can use to watch the livestream. - `Status LivestreamGetAllLivestreamsResponseDataStatus` - `const LivestreamGetAllLivestreamsResponseDataStatusLive LivestreamGetAllLivestreamsResponseDataStatus = "LIVE"` - `const LivestreamGetAllLivestreamsResponseDataStatusIdle LivestreamGetAllLivestreamsResponseDataStatus = "IDLE"` - `const LivestreamGetAllLivestreamsResponseDataStatusErrored LivestreamGetAllLivestreamsResponseDataStatus = "ERRORED"` - `const LivestreamGetAllLivestreamsResponseDataStatusInvoked LivestreamGetAllLivestreamsResponseDataStatus = "INVOKED"` - `StreamKey string` Unique key for accessing each livestream. - `UpdatedAt Time` Timestamp the object was updated at. The time is returned in ISO format. - `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.Livestreams.GetAllLivestreams( context.TODO(), "app_id", realtime_kit.LivestreamGetAllLivestreamsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "3fd739f4-3c41-456e-bfba-6ebd51e16d2d", "created_at": "2023-07-15T11:48:34.753Z", "disabled": "disabled", "ingest_server": "rtmps://live.cloudflare.com:443/live/", "meeting_id": "meeting_id", "name": "test", "paging": { "end_offset": 1, "start_offset": 1, "total_count": 1 }, "playback_url": "https://customer-s8oj0c1n5ek8ah1e.cloudflarestream.com/7de6a3fec0f9c05bf1df140950d3a237/manifest/video.m3u8", "status": "LIVE", "stream_key": "f26566285faca6fbe2e79a73a66rsrrsrrsr3cde23a2bb7dbc6c2c1761b98f4e4", "updated_at": "2023-07-15T11:48:34.753Z" }, "success": true } ``` ## Stop livestreaming a meeting `client.RealtimeKit.Livestreams.StopLivestreamingAMeeting(ctx, appID, meetingID, body) (*LivestreamStopLivestreamingAMeetingResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-livestream/stop` Stops the active livestream of a meeting associated with the given meeting ID. Retreive the meeting ID using the `Create a meeting` API. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `body LivestreamStopLivestreamingAMeetingParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type LivestreamStopLivestreamingAMeetingResponse struct{…}` - `Data LivestreamStopLivestreamingAMeetingResponseData` - `Message string` - `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.Livestreams.StopLivestreamingAMeeting( context.TODO(), "app_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", realtime_kit.LivestreamStopLivestreamingAMeetingParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "message": "Stopped live stream successfully" }, "success": true } ``` ## Start livestreaming a meeting `client.RealtimeKit.Livestreams.StartLivestreamingAMeeting(ctx, appID, meetingID, params) (*LivestreamStartLivestreamingAMeetingResponse, error)` **post** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/livestreams` Starts livestream of a meeting associated with the given meeting ID. Retreive the meeting ID using the `Create a meeting` API. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `params LivestreamStartLivestreamingAMeetingParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `Name param.Field[string]` Body param - `VideoConfig param.Field[LivestreamStartLivestreamingAMeetingParamsVideoConfig]` Body param - `Height int64` Height of the livestreaming video in pixels - `Width int64` Width of the livestreaming video in pixels ### Returns - `type LivestreamStartLivestreamingAMeetingResponse struct{…}` - `Data LivestreamStartLivestreamingAMeetingResponseData` - `ID string` The livestream ID. - `IngestServer string` The server URL to which the RTMP encoder sends the video and audio data. - `PlaybackURL string` The web address that viewers can use to watch the livestream. - `Status LivestreamStartLivestreamingAMeetingResponseDataStatus` - `const LivestreamStartLivestreamingAMeetingResponseDataStatusLive LivestreamStartLivestreamingAMeetingResponseDataStatus = "LIVE"` - `const LivestreamStartLivestreamingAMeetingResponseDataStatusIdle LivestreamStartLivestreamingAMeetingResponseDataStatus = "IDLE"` - `const LivestreamStartLivestreamingAMeetingResponseDataStatusErrored LivestreamStartLivestreamingAMeetingResponseDataStatus = "ERRORED"` - `const LivestreamStartLivestreamingAMeetingResponseDataStatusInvoked LivestreamStartLivestreamingAMeetingResponseDataStatus = "INVOKED"` - `StreamKey string` Unique key for accessing each livestream. - `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.Livestreams.StartLivestreamingAMeeting( context.TODO(), "app_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", realtime_kit.LivestreamStartLivestreamingAMeetingParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), Name: cloudflare.F("prdmmp-xhycsl"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "7088bba8-f522-49a8-b59b-3cd0e946bbb0", "ingest_server": "rtmps://live.cloudflare.com:443/live/", "playback_url": "https://customer-s8oj0c1n5ek8ah1e.cloudflarestream.com/7de6a3fec0f9c05bf1df140950d3a237/manifest/video.m3u8", "status": "INVOKED", "stream_key": "f26566285faca6fbe2e79a73a66rsrrsrrsr3cde23a2bb7dbc6c2c1761b98f4e4" }, "success": true } ``` ## Fetch complete analytics data for your livestreams `client.RealtimeKit.Livestreams.GetLivestreamAnalyticsComplete(ctx, appID, params) (*LivestreamGetLivestreamAnalyticsCompleteResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/analytics/livestreams/overall` Returns livestream analytics for the specified time range. ### Parameters - `appID string` The app identifier tag. - `params LivestreamGetLivestreamAnalyticsCompleteParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `EndTime param.Field[Time]` Query param: Specify the end time range in ISO format to access the livestream analytics. - `StartTime param.Field[Time]` Query param: Specify the start time range in ISO format to access the livestream analytics. ### Returns - `type LivestreamGetLivestreamAnalyticsCompleteResponse struct{…}` - `Data LivestreamGetLivestreamAnalyticsCompleteResponseData` - `Count int64` Count of total livestreams. - `TotalIngestSeconds int64` Total time duration for which the input was given or the meeting was streamed. - `TotalViewerSeconds int64` Total view time for which the viewers watched the stream. - `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.Livestreams.GetLivestreamAnalyticsComplete( context.TODO(), "app_id", realtime_kit.LivestreamGetLivestreamAnalyticsCompleteParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "count": 0, "total_ingest_seconds": 0, "total_viewer_seconds": 0 }, "success": true } ``` ## Fetch day-wise session and recording analytics data for an App `client.RealtimeKit.Livestreams.GetOrgAnalytics(ctx, appID, params) (*LivestreamGetOrgAnalyticsResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/analytics/daywise` Returns day-wise session and recording analytics data of an App for the specified time range start_date to end_date. If start_date and end_date are not provided, the default time range is set from 30 days ago to the current date. ### Parameters - `appID string` The app identifier tag. - `params LivestreamGetOrgAnalyticsParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `EndDate param.Field[string]` Query param: end date in YYYY-MM-DD format - `StartDate param.Field[string]` Query param: start date in YYYY-MM-DD format ### Returns - `type LivestreamGetOrgAnalyticsResponse struct{…}` - `Data LivestreamGetOrgAnalyticsResponseData` - `RecordingStats LivestreamGetOrgAnalyticsResponseDataRecordingStats` Recording statistics of an App during the range specified - `DayStats []LivestreamGetOrgAnalyticsResponseDataRecordingStatsDayStat` Day wise recording stats - `Day string` - `TotalRecordingMinutes int64` Total recording minutes for a specific day - `TotalRecordings int64` Total number of recordings for a specific day - `RecordingCount int64` Total number of recordings during the range specified - `RecordingMinutesConsumed float64` Total recording minutes during the range specified - `SessionStats LivestreamGetOrgAnalyticsResponseDataSessionStats` Session statistics of an App during the range specified - `DayStats []LivestreamGetOrgAnalyticsResponseDataSessionStatsDayStat` Day wise session stats - `Day string` - `TotalSessionMinutes float64` Total session minutes for a specific day - `TotalSessions int64` Total number of sessions for a specific day - `SessionsCount int64` Total number of sessions during the range specified - `SessionsMinutesConsumed float64` Total session minutes during the range specified - `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.Livestreams.GetOrgAnalytics( context.TODO(), "app_id", realtime_kit.LivestreamGetOrgAnalyticsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "recording_stats": { "day_stats": [ { "day": "day", "total_recording_minutes": 0, "total_recordings": 0 } ], "recording_count": 0, "recording_minutes_consumed": 0 }, "session_stats": { "day_stats": [ { "day": "day", "total_session_minutes": 0, "total_sessions": 0 } ], "sessions_count": 0, "sessions_minutes_consumed": 0 } }, "success": true } ``` ## Fetch active livestreams for a meeting `client.RealtimeKit.Livestreams.GetMeetingActiveLivestreams(ctx, appID, meetingID, query) (*LivestreamGetMeetingActiveLivestreamsResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/meetings/{meeting_id}/active-livestream` Returns details of all active livestreams for the given meeting ID. ### Parameters - `appID string` The app identifier tag. - `meetingID string` - `query LivestreamGetMeetingActiveLivestreamsParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type LivestreamGetMeetingActiveLivestreamsResponse struct{…}` - `Data LivestreamGetMeetingActiveLivestreamsResponseData` - `ID string` The livestream ID. - `CreatedAt Time` Timestamp the object was created at. The time is returned in ISO format. - `Disabled string` Specifies if the livestream was disabled. - `IngestServer string` The server URL to which the RTMP encoder sends the video and audio data. - `MeetingID string` - `Name string` Name of the livestream. - `PlaybackURL string` The web address that viewers can use to watch the livestream. - `Status LivestreamGetMeetingActiveLivestreamsResponseDataStatus` - `const LivestreamGetMeetingActiveLivestreamsResponseDataStatusLive LivestreamGetMeetingActiveLivestreamsResponseDataStatus = "LIVE"` - `const LivestreamGetMeetingActiveLivestreamsResponseDataStatusIdle LivestreamGetMeetingActiveLivestreamsResponseDataStatus = "IDLE"` - `const LivestreamGetMeetingActiveLivestreamsResponseDataStatusErrored LivestreamGetMeetingActiveLivestreamsResponseDataStatus = "ERRORED"` - `const LivestreamGetMeetingActiveLivestreamsResponseDataStatusInvoked LivestreamGetMeetingActiveLivestreamsResponseDataStatus = "INVOKED"` - `StreamKey string` Unique key for accessing each livestream. - `UpdatedAt Time` Timestamp the object was updated at. The time is returned in ISO format. - `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.Livestreams.GetMeetingActiveLivestreams( context.TODO(), "app_id", "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", realtime_kit.LivestreamGetMeetingActiveLivestreamsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "id", "created_at": "2019-12-27T18:11:19.117Z", "disabled": "disabled", "ingest_server": "ingest_server", "meeting_id": "meeting_id", "name": "name", "playback_url": "playback_url", "status": "LIVE", "stream_key": "stream_key", "updated_at": "2019-12-27T18:11:19.117Z" }, "success": true } ``` ## Fetch livestream session details using livestream session ID `client.RealtimeKit.Livestreams.GetLivestreamSessionDetailsForSessionID(ctx, appID, livestreamSessionID, query) (*LivestreamGetLivestreamSessionDetailsForSessionIDResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/livestreams/sessions/{livestream-session-id}` Returns livestream session details for the given livestream session ID. Retrieve the `livestream_session_id`using the `Fetch livestream session details using a session ID` API. ### Parameters - `appID string` The app identifier tag. - `livestreamSessionID string` - `query LivestreamGetLivestreamSessionDetailsForSessionIDParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type LivestreamGetLivestreamSessionDetailsForSessionIDResponse struct{…}` - `Data LivestreamGetLivestreamSessionDetailsForSessionIDResponseData` - `ID string` The livestream ID. - `CreatedAt Time` Timestamp the object was created at. The time is returned in ISO format. - `ErrMessage string` The server URL to which the RTMP encoder sends the video and audio data. - `IngestSeconds int64` Name of the livestream. - `LivestreamID string` - `StartedTime string` Unique key for accessing each livestream. - `StoppedTime string` The web address that viewers can use to watch the livestream. - `UpdatedAt string` Timestamp the object was updated at. The time is returned in ISO format. - `ViewerSeconds int64` Specifies if the livestream was disabled. - `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.Livestreams.GetLivestreamSessionDetailsForSessionID( context.TODO(), "app_id", "livestream-session-id", realtime_kit.LivestreamGetLivestreamSessionDetailsForSessionIDParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "id": "id", "created_at": "2019-12-27T18:11:19.117Z", "err_message": "err_message", "ingest_seconds": 0, "livestream_id": "livestream_id", "started_time": "started_time", "stopped_time": "stopped_time", "updated_at": "updated_at", "viewer_seconds": 0 }, "success": true } ``` ## Fetch active livestream session details `client.RealtimeKit.Livestreams.GetActiveLivestreamsForLivestreamID(ctx, appID, livestreamID, query) (*LivestreamGetActiveLivestreamsForLivestreamIDResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/livestreams/{livestream_id}/active-livestream-session` Returns details of all active livestreams for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API. ### Parameters - `appID string` The app identifier tag. - `livestreamID string` - `query LivestreamGetActiveLivestreamsForLivestreamIDParams` - `AccountID param.Field[string]` The account identifier tag. ### Returns - `type LivestreamGetActiveLivestreamsForLivestreamIDResponse struct{…}` - `Data LivestreamGetActiveLivestreamsForLivestreamIDResponseData` - `Livestream LivestreamGetActiveLivestreamsForLivestreamIDResponseDataLivestream` - `ID string` - `CreatedAt Time` Timestamp the object was created at. The time is returned in ISO format. - `Disabled string` Specifies if the livestream was disabled. - `IngestServer string` The server URL to which the RTMP encoder sends the video and audio data. - `MeetingID string` ID of the meeting. - `Name string` Name of the livestream. - `PlaybackURL string` The web address that viewers can use to watch the livestream. - `Status LivestreamGetActiveLivestreamsForLivestreamIDResponseDataLivestreamStatus` - `const LivestreamGetActiveLivestreamsForLivestreamIDResponseDataLivestreamStatusLive LivestreamGetActiveLivestreamsForLivestreamIDResponseDataLivestreamStatus = "LIVE"` - `const LivestreamGetActiveLivestreamsForLivestreamIDResponseDataLivestreamStatusIdle LivestreamGetActiveLivestreamsForLivestreamIDResponseDataLivestreamStatus = "IDLE"` - `const LivestreamGetActiveLivestreamsForLivestreamIDResponseDataLivestreamStatusErrored LivestreamGetActiveLivestreamsForLivestreamIDResponseDataLivestreamStatus = "ERRORED"` - `const LivestreamGetActiveLivestreamsForLivestreamIDResponseDataLivestreamStatusInvoked LivestreamGetActiveLivestreamsForLivestreamIDResponseDataLivestreamStatus = "INVOKED"` - `StreamKey string` Unique key for accessing each livestream. - `UpdatedAt Time` Timestamp the object was updated at. The time is returned in ISO format. - `Session LivestreamGetActiveLivestreamsForLivestreamIDResponseDataSession` - `ID string` - `CreatedAt Time` Timestamp the object was created at. The time is returned in ISO format. - `ErrMessage string` - `IngestSeconds string` The time duration for which the input was given or the meeting was streamed. - `InvokedTime Time` Timestamp the object was invoked. The time is returned in ISO format. - `LivestreamID string` - `StartedTime Time` Timestamp the object was started. The time is returned in ISO format. - `StoppedTime Time` Timestamp the object was stopped. The time is returned in ISO format. - `UpdatedAt Time` Timestamp the object was updated at. The time is returned in ISO format. - `ViewerSeconds string` The total view time for which the viewers watched the stream. - `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.Livestreams.GetActiveLivestreamsForLivestreamID( context.TODO(), "app_id", "livestream_id", realtime_kit.LivestreamGetActiveLivestreamsForLivestreamIDParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "livestream": { "id": "id", "created_at": "2019-12-27T18:11:19.117Z", "disabled": "disabled", "ingest_server": "ingest_server", "meeting_id": "meeting_id", "name": "name", "playback_url": "playback_url", "status": "LIVE", "stream_key": "stream_key", "updated_at": "2019-12-27T18:11:19.117Z" }, "session": { "id": "id", "created_at": "2019-12-27T18:11:19.117Z", "err_message": "err_message", "ingest_seconds": "ingest_seconds", "invoked_time": "2019-12-27T18:11:19.117Z", "livestream_id": "livestream_id", "started_time": "2019-12-27T18:11:19.117Z", "stopped_time": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "viewer_seconds": "viewer_seconds" } }, "success": true } ``` ## Fetch livestream details using livestream ID `client.RealtimeKit.Livestreams.GetLivestreamSessionForLivestreamID(ctx, appID, livestreamID, params) (*LivestreamGetLivestreamSessionForLivestreamIDResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/livestreams/{livestream_id}` Returns details of a livestream with sessions for the given livestream ID. Retreive the livestream ID using the `Start livestreaming a meeting` API. ### Parameters - `appID string` The app identifier tag. - `livestreamID string` - `params LivestreamGetLivestreamSessionForLivestreamIDParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `PageNo param.Field[int64]` Query param: The page number from which you want your page search results to be displayed. - `PerPage param.Field[int64]` Query param: Number of results per page. ### Returns - `type LivestreamGetLivestreamSessionForLivestreamIDResponse struct{…}` - `Data LivestreamGetLivestreamSessionForLivestreamIDResponseData` - `Livestream LivestreamGetLivestreamSessionForLivestreamIDResponseDataLivestream` - `ID string` ID of the livestream. - `CreatedAt string` Timestamp the object was created at. The time is returned in ISO format. - `Disabled string` Specifies if the livestream was disabled. - `IngestServer string` The server URL to which the RTMP encoder sends the video and audio data. - `MeetingID string` The ID of the meeting. - `Name string` Name of the livestream. - `PlaybackURL string` The web address that viewers can use to watch the livestream. - `Status LivestreamGetLivestreamSessionForLivestreamIDResponseDataLivestreamStatus` - `const LivestreamGetLivestreamSessionForLivestreamIDResponseDataLivestreamStatusLive LivestreamGetLivestreamSessionForLivestreamIDResponseDataLivestreamStatus = "LIVE"` - `const LivestreamGetLivestreamSessionForLivestreamIDResponseDataLivestreamStatusIdle LivestreamGetLivestreamSessionForLivestreamIDResponseDataLivestreamStatus = "IDLE"` - `const LivestreamGetLivestreamSessionForLivestreamIDResponseDataLivestreamStatusErrored LivestreamGetLivestreamSessionForLivestreamIDResponseDataLivestreamStatus = "ERRORED"` - `const LivestreamGetLivestreamSessionForLivestreamIDResponseDataLivestreamStatusInvoked LivestreamGetLivestreamSessionForLivestreamIDResponseDataLivestreamStatus = "INVOKED"` - `StreamKey string` Unique key for accessing each livestream. - `UpdatedAt string` Timestamp the object was updated at. The time is returned in ISO format. - `Paging LivestreamGetLivestreamSessionForLivestreamIDResponseDataPaging` - `EndOffset int64` - `StartOffset int64` - `TotalCount int64` - `Session LivestreamGetLivestreamSessionForLivestreamIDResponseDataSession` - `ID string` ID of the session. - `CreatedAt Time` Timestamp the object was created at. The time is returned in ISO format. - `ErrMessage string` - `IngestSeconds float64` The time duration for which the input was given or the meeting was streamed. - `InvokedTime Time` Timestamp the object was invoked. The time is returned in ISO format. - `LivestreamID string` - `StartedTime Time` Timestamp the object was started. The time is returned in ISO format. - `StoppedTime Time` Timestamp the object was stopped. The time is returned in ISO format. - `UpdatedAt Time` Timestamp the object was updated at. The time is returned in ISO format. - `ViewerSeconds float64` The total view time for which the viewers watched the stream. - `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.Livestreams.GetLivestreamSessionForLivestreamID( context.TODO(), "app_id", "livestream_id", realtime_kit.LivestreamGetLivestreamSessionForLivestreamIDParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "livestream": { "id": "id", "created_at": "created_at", "disabled": "disabled", "ingest_server": "ingest_server", "meeting_id": "meeting_id", "name": "name", "playback_url": "playback_url", "status": "LIVE", "stream_key": "stream_key", "updated_at": "updated_at" }, "paging": { "end_offset": 1, "start_offset": 1, "total_count": 1 }, "session": { "id": "id", "created_at": "2019-12-27T18:11:19.117Z", "err_message": "err_message", "ingest_seconds": 0, "invoked_time": "2019-12-27T18:11:19.117Z", "livestream_id": "livestream_id", "started_time": "2019-12-27T18:11:19.117Z", "stopped_time": "2019-12-27T18:11:19.117Z", "updated_at": "2019-12-27T18:11:19.117Z", "viewer_seconds": 0 } }, "success": true } ``` # Analytics ## Fetch day-wise session and recording analytics data for an App `client.RealtimeKit.Analytics.GetOrgAnalytics(ctx, appID, params) (*AnalyticsGetOrgAnalyticsResponse, error)` **get** `/accounts/{account_id}/realtime/kit/{app_id}/analytics/daywise` Returns day-wise session and recording analytics data of an App for the specified time range start_date to end_date. If start_date and end_date are not provided, the default time range is set from 30 days ago to the current date. ### Parameters - `appID string` The app identifier tag. - `params AnalyticsGetOrgAnalyticsParams` - `AccountID param.Field[string]` Path param: The account identifier tag. - `EndDate param.Field[string]` Query param: end date in YYYY-MM-DD format - `StartDate param.Field[string]` Query param: start date in YYYY-MM-DD format ### Returns - `type AnalyticsGetOrgAnalyticsResponse struct{…}` - `Data AnalyticsGetOrgAnalyticsResponseData` - `RecordingStats AnalyticsGetOrgAnalyticsResponseDataRecordingStats` Recording statistics of an App during the range specified - `DayStats []AnalyticsGetOrgAnalyticsResponseDataRecordingStatsDayStat` Day wise recording stats - `Day string` - `TotalRecordingMinutes int64` Total recording minutes for a specific day - `TotalRecordings int64` Total number of recordings for a specific day - `RecordingCount int64` Total number of recordings during the range specified - `RecordingMinutesConsumed float64` Total recording minutes during the range specified - `SessionStats AnalyticsGetOrgAnalyticsResponseDataSessionStats` Session statistics of an App during the range specified - `DayStats []AnalyticsGetOrgAnalyticsResponseDataSessionStatsDayStat` Day wise session stats - `Day string` - `TotalSessionMinutes float64` Total session minutes for a specific day - `TotalSessions int64` Total number of sessions for a specific day - `SessionsCount int64` Total number of sessions during the range specified - `SessionsMinutesConsumed float64` Total session minutes during the range specified - `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.Analytics.GetOrgAnalytics( context.TODO(), "app_id", realtime_kit.AnalyticsGetOrgAnalyticsParams{ AccountID: cloudflare.F("023e105f4ecef8ad9ca31a8372d0c353"), }, ) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Data) } ``` #### Response ```json { "data": { "recording_stats": { "day_stats": [ { "day": "day", "total_recording_minutes": 0, "total_recordings": 0 } ], "recording_count": 0, "recording_minutes_consumed": 0 }, "session_stats": { "day_stats": [ { "day": "day", "total_session_minutes": 0, "total_sessions": 0 } ], "sessions_count": 0, "sessions_minutes_consumed": 0 } }, "success": true } ```