-1

I am a php developer and I am using tokbox for sessions. I need to store session on Amazon S3 server. Using the tokbox archive feature I am saving my sessions on S3 server. I have used Archive mode as Always i.e when session is started it driectly archives particular session.

I need to get the archive id of the stored session. How can I fetch it?

Kalamarico
  • 5,466
  • 22
  • 53
  • 70
Shivani
  • 1
  • 2

1 Answers1

0

You can take a look at:

https://github.com/opentok/OpenTok-PHP-SDK/blob/master/README.md

but, if I understand what you ask, when you call startArchive, just store the result, and query the field id:

$archive = $opentok->startArchive($sessionId, $archiveOptions);
$archiveId = $archive->id;
  • Thank you @Francisco for your reply. The above method is called for manual session archive. I am using automatic session archive, because of which I can't use startArchive function and fetch archive id. – Shivani Nov 14 '17 at 06:19
  • Then, you can query this URL: https://api.opentok.com/v2/project//archive?sessionId= and you will get a list of archives for that session, with all the information you need. See https://tokbox.com/developer/guides/archiving/, "Automatically archived sessions". – Francisco Javier Cano Sandoval Nov 14 '17 at 09:16