List recordings of a session

This code snippet shows how to list all recordings of a session using the Meetings API.

See the API Reference for more information.

Example Request

Where needed, replace the following variables in the sample code with your own values:

KeyDescription
JWT

Used to authenticate your request. See Authentication for more information, including how to generate a JWT.

VONAGE_APPLICATION_ID

The Vonage Application ID.

VONAGE_APPLICATION_PRIVATE_KEY_PATH

Private key path.

SESSION_ID

Corresponds to the underlying Video API session id.

Write the code

Add the following to list-recordings.sh:

curl -X GET "https://api-eu.vonage.com/meetings/sessions/"$SESSION_ID"/recordings" \
  -H "Authorization: Bearer $JWT"

View full source

Run your code

Save this file to your machine and run it:

sh list-recordings.sh

Prerequisites

npm install @vonage/server-sdk

Create a file named request.js and add the following code:

const { Auth } = require('@vonage/auth');
const { Meetings } = require('@vonage/meetings');

const credentials = new Auth({
  privateKey: VONAGE_APPLICATION_PRIVATE_KEY_PATH,
  applicationId: VONAGE_APPLICATION_ID,
});

const meetingsClient = new Meetings(credentials);

View full source

Write the code

Add the following to request.js:

const run = async () => {
  try{
    for await (const recording of meetingsClient.getSessionRecordings(SESSION_ID)) {
      console.log(recording);
    }
  } catch (error) {
    console.error(error);
  }
};

run();

View full source

Run your code

Save this file to your machine and run it:

node request.js

Prerequisites

pip install vonage

Create a file named request.py and add the following code:


import vonage

client = vonage.Client(
    application_id=VONAGE_APPLICATION_ID,
    private_key=VONAGE_PRIVATE_KEY,

View full source

Write the code

Add the following to request.py:

View full source

Run your code

Save this file to your machine and run it:

python request.py

Prerequisites

gem install vonage

Create a file named list-recordings.rb and add the following code:

client = Vonage::Client.new(
  application_id: VONAGE_APPLICATION_ID,
  private_key: File.read(VONAGE_APPLICATION_PRIVATE_KEY_PATH)
)

View full source

Write the code

Add the following to list-recordings.rb:

recordings = client.meetings.sessions.list_recordings(session_id: SESSION_ID)

View full source

Run your code

Save this file to your machine and run it:

ruby list-recordings.rb

Example Response


{
   "_embedded": {
      "recordings": [
         {
            "id": "9f6fe8ae-3458-4a72-b532-8276d5533e97",
            "session_id": "2_MX40NjMwODczMn5-MTU3NTgyODEwNzQ2MH5OZDJrVmdBRUNDbG5MUzNqNX20yQ1Z-fg",
            "started_at": "2023-06-06T07:15:13.974Z",
            "ended_at": "2023-06-06T08:15:13.974Z",
            "status": "stopped",
            "_links": {
               "url": {
                  "href": "https://prod-meetings-recordings.s3.amazonaws.com/123/9f6fe8ae-3458-4a72-b532-8276d5533e97/archive.mp4"
               }
            }
         }
      ]
   }
}