Get Rooms

getRooms() method will return all the rooms created from a given API_KEY.

import { API } from '@huddle01/server-sdk/api';
 
const rooms = async () => {
  const api = new API({
    apiKey: process.env.API_KEY!,
  });
 
  const rooms = await api.getRooms();
 
  console.log(rooms?.data);
 
  return rooms?.data;
};

Returns

getRooms() method returns an array of rooms with following fields.

NameTypeDescription
nextCursornumberThe cursor to fetch the next page of rooms.
prevCursornumberThe cursor to fetch the previous page of rooms.
countnumberThe total number of rooms.
roomsrooms[]An array of rooms
roomIdstringThe unique identifier of the room.
meetingUrlstringThe meeting URL of the room.
startTimenumberThe start time of the room in timestamp epoch format.
expiryTimenumberThe expiry time of the room in timestamp epoch format.
roomType'VIDEO' | 'AUDIO'The type of the room. It can be either VIDEO or AUDIO.
  {
      "nextCursor": 1,
      "prevCursor": 0,
      "count": 1,
      "rooms": [
        {
            "roomId": "dummy-room-id",
            "meetingUrl": "https://app.huddle01.com/dummy-room-id",
            "startTime": null, // start time in timestamp epoch format
            "expiryTime": null, // expiry time in timestamp epoch format
            "roomType": "VIDEO" // VIDEO or AUDIO
        }
      ]
  }
Audio/Video Infrastructure designed for the developers to empower them ship simple yet powerful Audio/Video Apps.
support
company
Copyright © 2024 Graphene 01, Inc. All Rights Reserved.