Start recording a conference

    This API lets you start recording an ongoing conference after the conference is initiated. Alternatively, you can record a conference by using the recording capabilities of the Conference XML element.

    API Endpoint

    POST https://api.plivo.com/v1/Account/{auth_id}/Conference/{conference_name}/Record/

    Attributes

    file_format

    The file format for the recording.

    Allowed values: mp3, wav.
    Defaults to mp3.

    transcription_type

    auto: Transcription is completely automated; turnaround time is about 30 minutes.

    Transcription charges and details are available on our pricing page.

    Note:

    Transcription service is available only in English, and limited to calls with a duration greater than 500 milliseconds and less than 4 hours, with a recording file size smaller than 2GB.

    transcription_url Callback-retry configurable

    The URL to which the transcription should be posted.

    Note:

    The transcription information will be sent to this URL via an HTTP POST callback.

    callback_url Callback-retry configurable

    The URL invoked when the recording ends. The parameters to be posted to the URL are documented in the table below.

    callback_method

    The HTTP verb used to invoke the callback_url.

    Defaults to POST.

    List of parameters sent to the callback URL

    These details are posted when the callback URL is invoked after the recording ends.

    api_id

    The API ID that was returned by the conference record API.

    record_url

    The URL where the recorded file can be accessed.

    recording_id

    The recording ID associated with the recording file.

    conference_name

    The name of the conference recorded.

    recording_duration

    The recording duration in seconds.

    recording_duration_ms

    The recording duration in milliseconds.

    recording_start_ms

    The start time of the recording since epoch in milliseconds.

    recording_end_ms

    The end time of the recording since epoch in milliseconds.

    List of parameters sent to the transcription URL

    transcription_charge

    The credit deducted for the transcription.

    transcription

    The transcribed text of the recording.

    duration

    The duration in seconds of the recording.

    call_uuid

    The call UUID of the call that was transcribed.

    transcription_rate

    The rate of the transcription per minute.

    recording_id

    Recording ID of the transcribed recording.

    errorMay be Recording duration too long for transcription or Recording file size too large for transcription. Empty if transcription is successful.
    Note: .mp3 files are smaller in size than .wav files. Consider changing the recording file format to .mp3 if you see this error.

    Returns

    If successful, returns an acknowledgement that conference recording has started along with a URL to access the recording.

    Response

    HTTP Status Code: 202

    {
    "api_id": "2867b6e2-58c3-11e1-86da-adf28403fe48",
    "message": "conference recording started",
    "recording_id": "93bc7c6a-3b2b-11e3",
    "url": "https://media.plivo.com/v1/Account/<Auth_ID>/Recording/93bc7c6a-3b2b-11e3.mp3",
    }
    

    Example Request

    1
    2
    3
    4
    5
    6
    
    import plivo
    
    client = plivo.RestClient('<auth_id>','<auth_token>')
    response = client.conferences.record(
        conference_name='testing', )
    print(response)
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    
    #
    # Example for Conference Record Create
    #
    require 'rubygems'
    require 'plivo'
    
    include Plivo
    include Plivo::Exceptions
    
    api = RestClient.new("<auth_id>","<auth_token>")
    
    begin
      response = api.conferences.record(
        'my conf'
      )
      puts response
    rescue PlivoRESTError => e
      puts 'Exception: ' + e.message
    end
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    
    // Example for Conference Record create
    
    var plivo = require('plivo');
    
    (function main() {
        'use strict';
        
       // If auth id and auth token are not specified, Plivo will fetch them from the environment variables.
        var client = new plivo.Client("<auth_id>","<auth_token>");
        client.conferences.record(
            "My Conf Room", // conference name
        ).then(function (response) {
            console.log(response);
        }, function (err) {
            console.error(err);
        });
    })();
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    
    <?php
    /**
     * Example for Conference record create
     */
    require 'vendor/autoload.php';
    use Plivo\RestClient;
    use Plivo\Exceptions\PlivoRestException;
    $client = new RestClient("<auth_id>","<auth_token>");
    try {
        $response = $client->conferences->startRecording(
            'My conference'
        );
        print_r($response);
    }
    catch (PlivoRestException $ex) {
        print_r($ex);
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    
    package com.plivo.api.samples.conference.record;
    
    import java.io.IOException;
    
    import com.plivo.api.Plivo;
    import com.plivo.api.exceptions.PlivoRestException;
    import com.plivo.api.models.conference.Conference;
    import com.plivo.api.models.conference.ConferenceRecordCreateResponse;
    
    /**
     * Example for Conference Record create
     */
    class RecordCreate {
        public static void main(String [] args) {
            Plivo.init("<auth_id>","<auth_token>");
            try {
                ConferenceRecordCreateResponse response = Conference.recorder("My Conf Room")
                        .record();
    
                System.out.println(response);
            } catch (PlivoRestException | IOException e) {
                e.printStackTrace();
            }
        }
    }
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    
    /**
     * Example for Record Create
     */
    using System;
    using System.Collections.Generic;
    using Plivo;
    using Plivo.Exception;
    
    namespace PlivoExamples
    {
        internal class Program
        {
            public static void Main(string[] args)
            {
                var api = new PlivoApi("<auth_id>","<auth_token>");
                try
                {
                    var response = api.Conference.StartRecording(
                        "conf name"
                    );
                    Console.WriteLine(response);
                }
                catch (PlivoRestException e)
                {
                    Console.WriteLine("Exception: " + e.Message);
                }
            }
        }
    }
    
    1
    2
    3
    4
    
    curl -i --user AUTH_ID:AUTH_TOKEN \
        -H "Content-Type: application/json" \
        -d '{"file_format":"mp3"}' \
        https://api.plivo.com/v1/Account/{auth_id}/Conference/{conference_name}/Record/
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    
    // Example for Conference Record create
    package main
    
    import "fmt"
    import "github.com/plivo/plivo-go"
    
    func main() {
    	client, err := plivo.NewClient("<auth_id>","<auth_token>", &plivo.ClientOptions{})
    	if err != nil {
    			fmt.Print("Error", err.Error())
    			return
    		}
    	response, err := client.Conferences.Record(
    		"My Conf Room",
    		plivo.ConferenceRecordParams{},
    	)
    	if err != nil {
    			fmt.Print("Error", err.Error())
    			return
    		}
    	fmt.Printf("Response: %#v\n", response)
    }