recordings

package
v2.0.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2026 License: MPL-2.0 Imports: 6 Imported by: 1

README

Recordings

The Recordings module provides functionality for interacting with the Webex Recordings API. This module allows you to list, retrieve, download, and delete meeting recordings — including direct download of audio (MP3), video (MP4), and transcript files.

Overview

Recordings are meeting content captured during a Webex meeting. When the recording function is paused during a meeting, the pause is not included in the recording. If recording is stopped and restarted, multiple recordings are created but consolidated and made available together.

This module allows you to:

  1. List recordings (with filters for meeting, host, date range, format, etc.)
  2. Get recording details (including temporary direct download links)
  3. Download audio (MP3), video (MP4), or transcript files
  4. Delete recordings

Installation

This module is part of the Webex Go SDK. To use it, import the SDK and the recordings module:

import (
    "github.com/WebexCommunity/webex-go-sdk/v2"
    "github.com/WebexCommunity/webex-go-sdk/v2/recordings"
)

Usage

Initializing the Client
// Create a new Webex client with your access token
client, err := webexsdk.NewClient("your-access-token", nil)
if err != nil {
    log.Fatalf("Failed to create client: %v", err)
}

// Create the Recordings client
recordingsClient := recordings.New(client, nil)
Listing Recordings

List recordings with optional filters:

page, err := recordingsClient.List(&recordings.ListOptions{
    MeetingID: "meeting-id",         // Optional: filter by meeting instance
    HostEmail: "host@example.com",   // Optional: filter by host
    SiteURL:   "cisco.webex.com",    // Optional: filter by site
    From:      "2026-01-01T00:00:00Z",
    To:        "2026-02-01T00:00:00Z",
    Format:    "MP4",                // Optional: "MP4" or "ARF"
    Status:    "available",          // Optional: recording status
    Max:       10,
})
if err != nil {
    log.Printf("Failed to list recordings: %v", err)
} else {
    for _, r := range page.Items {
        fmt.Printf("%s — %s (%d seconds, %.1f MB)\n",
            r.Topic, r.Format, r.DurationSeconds, float64(r.SizeBytes)/1e6)
    }
}
Getting Recording Details

Get a single recording with temporary direct download links:

recording, err := recordingsClient.Get("recording-id")
if err != nil {
    log.Fatalf("Failed to get recording: %v", err)
}

fmt.Printf("Topic: %s\n", recording.Topic)
fmt.Printf("Duration: %d seconds\n", recording.DurationSeconds)
fmt.Printf("Size: %d bytes\n", recording.SizeBytes)
fmt.Printf("Format: %s\n", recording.Format)

// Temporary direct download links (expire after ~3 hours)
if recording.TemporaryDirectDownloadLinks != nil {
    fmt.Printf("Audio:      %s\n", recording.TemporaryDirectDownloadLinks.AudioDownloadLink)
    fmt.Printf("Video:      %s\n", recording.TemporaryDirectDownloadLinks.RecordingDownloadLink)
    fmt.Printf("Transcript: %s\n", recording.TemporaryDirectDownloadLinks.TranscriptDownloadLink)
    fmt.Printf("Expires:    %s\n", recording.TemporaryDirectDownloadLinks.Expiration)
}
Downloading Audio (MP3)

Download just the audio track of a recording:

audio, err := recordingsClient.DownloadAudio("recording-id")
if err != nil {
    log.Fatalf("Failed to download audio: %v", err)
}

fmt.Printf("Content-Type: %s\n", audio.ContentType) // "audio/mpeg"
fmt.Printf("Size: %d bytes\n", len(audio.Data))

// Save to file
os.WriteFile("meeting-audio.mp3", audio.Data, 0644)

Or just get the download URL to stream externally:

audioURL, recording, err := recordingsClient.GetAudioDownloadLink("recording-id")
if err != nil {
    log.Fatalf("Failed to get audio link: %v", err)
}
fmt.Printf("Stream from: %s\n", audioURL)
fmt.Printf("Expires: %s\n", recording.TemporaryDirectDownloadLinks.Expiration)
Downloading Video (MP4)
video, err := recordingsClient.DownloadRecording("recording-id")
if err != nil {
    log.Fatalf("Failed to download recording: %v", err)
}

os.WriteFile("meeting-recording.mp4", video.Data, 0644)
Downloading Transcript
transcript, err := recordingsClient.DownloadTranscript("recording-id")
if err != nil {
    log.Fatalf("Failed to download transcript: %v", err)
}

fmt.Println(string(transcript.Data))
Deleting a Recording
err := recordingsClient.Delete("recording-id")
if err != nil {
    log.Printf("Failed to delete recording: %v", err)
}

Data Structures

Recording
type Recording struct {
    ID                           string                  // Unique identifier
    MeetingID                    string                  // Associated meeting instance ID
    ScheduledMeetingID           string                  // Scheduled meeting ID
    MeetingSeriesID              string                  // Meeting series ID
    Topic                        string                  // Meeting topic/title
    CreateTime                   string                  // When the recording was created (ISO 8601)
    TimeRecorded                 string                  // When the recording started (ISO 8601)
    HostEmail                    string                  // Host email address
    SiteURL                      string                  // Webex site URL
    DownloadURL                  string                  // Password-protected download URL
    PlaybackURL                  string                  // Password-protected playback URL
    Password                     string                  // Recording access password
    TemporaryDirectDownloadLinks *TemporaryDownloadLinks  // Time-limited direct download URLs
    Format                       string                  // "MP4" or "ARF"
    DurationSeconds              int                     // Duration in seconds
    SizeBytes                    int64                   // File size in bytes
    ShareToMe                    bool                    // Whether shared with current user
    ServiceType                  string                  // "MeetingCenter", "EventCenter", etc.
    Status                       string                  // "available", "deleted", etc.
}
type TemporaryDownloadLinks struct {
    RecordingDownloadLink  string // Direct video (MP4) download URL
    AudioDownloadLink      string // Direct audio (MP3) download URL
    TranscriptDownloadLink string // Direct transcript download URL
    Expiration             string // When the links expire (ISO 8601, ~3 hours)
}
DownloadedContent
type DownloadedContent struct {
    ContentType        string // MIME type (e.g., "audio/mpeg", "video/mp4")
    ContentDisposition string // Content-Disposition header
    ContentLength      int64  // Size in bytes (-1 if unknown)
    Data               []byte // Raw file content
}
ListOptions
type ListOptions struct {
    MeetingID       string // Filter by meeting instance ID
    MeetingSeriesID string // Filter by meeting series ID
    HostEmail       string // Filter by host email
    SiteURL         string // Filter by Webex site URL
    ServiceType     string // Filter by service type
    From            string // Start date/time filter (ISO 8601)
    To              string // End date/time filter (ISO 8601)
    Max             int    // Maximum number of results
    Status          string // Filter by status ("available", etc.)
    Topic           string // Filter by topic keyword
    Format          string // Filter by format ("MP4", "ARF")
}

Notes

  • Temporary download links are only returned by the Get method (not List). They expire after approximately 3 hours.
  • Audio download provides an MP3 file extracted from the meeting recording.
  • Recording downloads can be large (hundreds of MB for long meetings). Consider streaming via the URL rather than loading into memory for large files.
  • Refer to the Meetings API Scopes for the required authentication scopes.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the recordings API client

func New

func New(webexClient *webexsdk.Client, config *Config) *Client

New creates a new Recordings plugin

func (*Client) Delete

func (c *Client) Delete(recordingID string) error

Delete deletes a recording

func (*Client) DownloadAudio

func (c *Client) DownloadAudio(recordingID string) (*DownloadedContent, error)

DownloadAudio downloads the audio (MP3) content of a recording. This first fetches the temporary download link, then downloads the audio file.

func (*Client) DownloadRecording

func (c *Client) DownloadRecording(recordingID string) (*DownloadedContent, error)

DownloadRecording downloads the video recording (MP4) content. This first fetches the temporary download link, then downloads the recording file.

func (*Client) DownloadTranscript

func (c *Client) DownloadTranscript(recordingID string) (*DownloadedContent, error)

DownloadTranscript downloads the transcript file for a recording. This first fetches the temporary download link, then downloads the transcript.

func (*Client) Get

func (c *Client) Get(recordingID string) (*Recording, error)

Get returns details for a single recording, including temporary direct download links for the video, audio, and transcript files.

func (c *Client) GetAudioDownloadLink(recordingID string) (string, *Recording, error)

GetAudioDownloadLink retrieves the temporary direct download link for the audio (MP3) of a recording. The link expires after a short period (check TemporaryDownloadLinks.Expiration). Returns the audio download URL and the full recording object.

func (*Client) List

func (c *Client) List(options *ListOptions) (*RecordingsPage, error)

List returns a list of recordings. Use ListOptions to filter by meetingId, date range, host, etc.

type Config

type Config struct{}

Config holds the configuration for the Recordings plugin

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default configuration

type DownloadedContent

type DownloadedContent struct {
	// ContentType is the MIME type (e.g., "video/mp4", "audio/mpeg").
	ContentType string
	// ContentDisposition is the Content-Disposition header value if present.
	ContentDisposition string
	// ContentLength is the size in bytes (-1 if unknown).
	ContentLength int64
	// Data is the raw file content.
	Data []byte
}

DownloadedContent holds the raw bytes and metadata of a downloaded recording file.

type ListOptions

type ListOptions struct {
	MeetingID       string `url:"meetingId,omitempty"`
	MeetingSeriesID string `url:"meetingSeriesId,omitempty"`
	HostEmail       string `url:"hostEmail,omitempty"`
	SiteURL         string `url:"siteUrl,omitempty"`
	ServiceType     string `url:"serviceType,omitempty"`
	From            string `url:"from,omitempty"`
	To              string `url:"to,omitempty"`
	Max             int    `url:"max,omitempty"`
	Status          string `url:"status,omitempty"`
	Topic           string `url:"topic,omitempty"`
	Format          string `url:"format,omitempty"`
}

ListOptions contains the options for listing recordings

type Recording

type Recording struct {
	ID                           string                  `json:"id,omitempty"`
	MeetingID                    string                  `json:"meetingId,omitempty"`
	ScheduledMeetingID           string                  `json:"scheduledMeetingId,omitempty"`
	MeetingSeriesID              string                  `json:"meetingSeriesId,omitempty"`
	Topic                        string                  `json:"topic,omitempty"`
	CreateTime                   string                  `json:"createTime,omitempty"`
	TimeRecorded                 string                  `json:"timeRecorded,omitempty"`
	HostEmail                    string                  `json:"hostEmail,omitempty"`
	SiteURL                      string                  `json:"siteUrl,omitempty"`
	DownloadURL                  string                  `json:"downloadUrl,omitempty"`
	PlaybackURL                  string                  `json:"playbackUrl,omitempty"`
	Password                     string                  `json:"password,omitempty"`
	TemporaryDirectDownloadLinks *TemporaryDownloadLinks `json:"temporaryDirectDownloadLinks,omitempty"`
	Format                       string                  `json:"format,omitempty"`
	DurationSeconds              int                     `json:"durationSeconds,omitempty"`
	SizeBytes                    int64                   `json:"sizeBytes,omitempty"`
	ShareToMe                    bool                    `json:"shareToMe,omitempty"`
	ServiceType                  string                  `json:"serviceType,omitempty"`
	Status                       string                  `json:"status,omitempty"`
}

Recording represents a Webex meeting recording

type RecordingsPage

type RecordingsPage struct {
	Items []Recording `json:"items"`
	*webexsdk.Page
}

RecordingsPage represents a paginated list of recordings

type TemporaryDownloadLinks struct {
	RecordingDownloadLink  string `json:"recordingDownloadLink,omitempty"`
	AudioDownloadLink      string `json:"audioDownloadLink,omitempty"`
	TranscriptDownloadLink string `json:"transcriptDownloadLink,omitempty"`
	Expiration             string `json:"expiration,omitempty"`
}

TemporaryDownloadLinks contains time-limited direct download URLs for the recording video, audio, and transcript. These links expire after a short period (typically 3 hours) as indicated by the Expiration field.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL