Can I download call recordings?

Return to top
Have more questions? Submit a request

4 Comments

  • Christine DeVille

    I discovered if I right click on the recording I can 'save as'. Is there a way to keep this from happening?  We don't recordings to be downloaded.

    0
  • Aliyss Snow

    https://github.com/Aliyss/Zendesk-Calls-Export


    Made this little script in case someone comes searching. For Mass downloading Calls.

    0
  • Moshe

    Just FYI, its easier todo 'inspect element' on the recorder player and just copy paste the URL.

    0
  • Jesse Honigberg

    I struggled with this - if anyone is interested - here is a node script that I used.

    //You will need to have node installed and install fs and request
    //npm fs install
    //npm request install

    const fs = require('fs');
    const request = require('request');

    //replace sitename with your subdomain
    LoopData("https://sitename.zendesk.com/api/v2/ticket_audits.json");

    function LoopData(passedURL) {
    // Include the request library for Node.js
    var request = require('request');
    // Basic Authentication credentials
    var username = 'username/token';
    var password = 'password';
    var authenticationHeader = "Basic " + Buffer.from(username + ":" + password).toString("base64");


    console.log("passedURL (RecdFunction): " + passedURL);

    request(
    {
    url: passedURL,
    headers: { "Authorization": authenticationHeader }
    },
    async function (error, response, body) {

    if (error) {
    // Got an error, reject the promise
    console.log(error);
    }
    else
    {
    //grabs the next URL
    passedURL = JSON.parse(body).before_url;
    cursorAfter = JSON.parse(body).after_cursor;

    //print it out (for debugging)
    console.log("passedURL (ToFunction): " + passedURL);

    let parsedData = JSON.parse(body);
    //print it out (for debugging)
    //console.log(parsedData.audits.length);

    //counter for items downloaded
    let recording_items = 0;

    for (let i = 0; i < parsedData.audits.length; i++)
    {
    let parsedEvents = parsedData.audits[i];
    //check for the event type
    for (let j = 0; j < parsedEvents.events.length; j++)
    {
    if (parsedEvents.events[j].type == "VoiceComment")
    {
    //print it out (for debugging)
    //console.log(parsedEvents.events[j].data.recording_url);

    //set the MP3 name
    let result = 'Ticket_' + parsedData.audits[i].ticket_id + '-Event_' + parsedEvents.events[j].id;
    console.log(result);
    request
    .get(parsedEvents.events[j].data.recording_url + ".mp3")
    .auth('username/token', 'password, false)
    .on('error', function (err) { console.log(err) })
    //download the mp3
    .pipe(fs.createWriteStream(`./output/mp3/${result}.mp3`));
    recording_items++;
    };
    };
    //write out JSON

    };
    fs.writeFile(`./output/page-${cursorAfter}.json`, JSON.stringify(parsedData, null, 4), (err) => {
    if (err) {
    throw err;
    } else {
    console.log(`Page ${cursorAfter} downloaded with ${recording_items} recordings.`)
    }
    });

    //pass it back into the function BUT ASYNC
    await LoopData(String(passedURL));
    };
    });
    };

     

    0

Please sign in to leave a comment.

Powered by Zendesk