Live Platform API v1
Live Platform API
Live Platform API
Version 1

Copy cloud recording

Copy link

Copies a recording file of a live event to your AWS S3 storage. When you call this API, the file you would like to transfer will be copied to an AWS S3 storage you provide which must be in the same AWS region as your Sendbird application.

Only the files that are in Completed status can be copied to your storage. You can check the file status on Live events on Sendbird Dashboard. To learn more about file status, refer to Record a live event.

Note: When a recording file is uploaded to the storage you specified, the total size of the file will be automatically split into 5MB per request for optimal data transfer. Charges incur per number of requests against the specified storage as listed on the Requests & data retrievals section.


Using AWS Storage

Copy link

Before calling the following API to copy a live event recording to your AWS storage, you need to create IAM policies in your AWS account to access the storage by setting s3:PutObject and s3:ListBucket as shown below. If you specify a storage without attaching the two permissions, an error will return.

To securely copy the file to the S3 storage, it is recommended that the AWS account only allows these two permissions. For a detailed guide, visit the Creating IAM policies (console) page.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::{bucket_name}/*",
                "arn:aws:s3:::{bucket_name}",
            ]
        }
    ]
}

HTTP request

Copy link
POST https://api-{application_id}.calls.sendbird.com/v1/cloud-recordings/{recording_id}/copy

Parameters

Copy link

The following table lists the parameters that this action supports.

Parameters
RequiredTypeDescription

access_key

string

Specifies the access key of the AWS account to which you would like to copy the cloud recording file.

secret_key

string

Specifies the secret key of the AWS account to which you would like to copy the cloud recording file.

Secret key will be masked and won't be exposed or logged to secure user credentials.

bucket

string

Specifies the name of the bucket to which you would like to copy the cloud recording file.

region

string

Specifies the AWS region that the bucket is located. The value must match the region of the Sendbird application the recording file is in. Acceptable values are: ap-northeast-1, ap-northeast-2, ap-southeast-1, eu-central-1, us-west-2, and us-east-1.

To check the application's region, go to Organization settings > Application on your dashboard.

OptionalTypeDescription

recording_file_directory

string

Specifies the directory of the bucket.

{
    "access_key": "my_access_key",
    "secret_key": "my_secret_key",
    "bucket": "my-bucket",
    "region": "us-west-2",
    "recording_file_directory": "test/"
}

Response

Copy link

If successful, this action returns information of a recording file that has been copied to your AWS storage in the response body.

{
    "recording_id": "f56ee376-b6ee-4ea4-a523-f3ba87653a3e",
    "bucket": "my-bucket",
    "key": "test/230209_041500_f56ee376-b6ee-4ea4-a523-f3ba87653a3e.mp4"
}

List of response properties

Copy link
Property nameTypeDescription

recording_id

string

The unique ID of the cloud recording file.

bucket

string

The name of the bucket to which the cloud recording file has been copied.

key

string

The file directory, timestamp in %y%m%d_%H%M%S format, and the name of the cloud recording file that has been copied.