Search code examples
node.jsopentok

Download opentok session archives


I'm building a video chat app in nodejs and I would like to implement session archiving as it's available with the Opentok API : https://tokbox.com/developer/guides/archiving/

I'm able to start the archiving but can't find a way to programmatically download the video files to my server using the API. I neither have an Amazon S3 bucket nor an Azure Container.

If anyone knows how to do this, please help


Solution

  • You can call the GET API:

    https://api.opentok.com/v2/project//archive/

    The response will contain a field url, which will be the url from where you can download the archive. As you can see in the docs, if you don't have as S3 bucket nor an Azure Container, the archive will be available for you for 72 hours, from the OpenTok Cloud. With the url, you can just use request module, or whatever other one you want to retrieve the file.