How to get all in-progress rooms with their participants in one HTTP request?

Viewed 169

For performance reasons, I need to get all rooms together with their participants in only one HTTP request. Is that supported by Twilio REST API Client?

1 Answers

You can use the Twilio Room Resource API to get the list of Rooms based on there status. Below is the Code in C# which returns a list of Room resources created in the given account. The list also includes paging information. Status Can be: in-progress (default) or completed

    // Find your Account Sid and Token at twilio.com/console
    TwilioClient.Init(accountSid, authToken);
    var rooms = RoomResource.Read(
        status: RoomResource.RoomStatusEnum.Completed,
        limit: 20
    );

Let me know if it helps!

Related