1
votes

I have many completed Twilio video group rooms, each of which has all of its tracks recorded. Information about the recordings can be easily accessed using Twilio's video REST API, and includes such information as the recording URL, type (audio/video) and participant SID, which is Twilio's unique identifier for the room participant who contributed that recording. Participants each also have a 'friendly' name associated with them - that is set when the user joins the room, by means of the 'grant' token generation process. Problem is, I can't find any way to access the participants' friendly names using the Twilio API, although their SIDs are easily accessible.

An example of fetching full recording details using Twilio's PHP helper library would be this: (where $client is a Twilio video rest api client object)

$recording = $client->video->recordings('RTe8c5c08c664a314d38f30f9b62554189')->fetch();

and I can then get $recording->url, $recording->duration and so on.

Unfortunately the 'participants' equivalent, from which I'd hope to be able to get their name, doesn't work - this triggers an exception:

$participant = $client->video->participants('PAa091d58706d582f2f4db4d9426c1c073 ')->fetch();

It would be possible to work around this by finding out the participant SID while the room is in progress, and storing it in my own application along with the friendly name for future reference. I guess I'm just looking for a lazier way to do it :-) and given that Twilio stores the friendly names of the rooms, it seems likely that they would store the participant information somewhere as well. Has anyone else solved this problem already? Thanks!

1

1 Answers

0
votes

Twilio developer evangelist here.

The Video API lists only two resources that you can access via the REST API: Rooms and Recordings. As far as I know, there isn't a Participant resource. I will check with the team though. As you say, the workaround for now is to discover the participant SID during the call and store it yourself. If you do want this in the future, I recommend raising a ticket with Twilio support and describing your use case.