Live Sessions API

The Live Sessions API provides the ability to fetch live rooms in which people are currently present. In order to use the API, you will need to obtain an API key by connecting to your wallet.

Endpoint

GET

https://api.huddle01.com/api/v2/sdk/live-sessions

Whatever sessions are created using Create Room API and are joined by users, will be listed in the Live Sessions API. The API will return the list of all the rooms which are currently live and the number of users present in each room.

GET
/live-sessions

Get All Live Sessions API

The API supports a GET request with the following required parameters:

  • x-api-key - Add your API Key to the headers to fetch all rooms associated with your API Key.
Request
GET • /live-sessions
const response = await axios.get(
  'https://api.huddle01.com/api/v2/sdk/live-sessions',
  {},
  {
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': {{API_KEY}},
    },
  }
);
Response

Upon success, the API will return a response with an array of rooms with the following fields:

  • roomId - The roomId of the room.
  • startTime - The start time of session in Epoch
  • liveStreamCount - The count of live streams associated with this session
  • recordingCount - The count of recordings associated with this session

In case of an error, the API will return an error message with a corresponding status code.

Response
{
  "liveSessions": [
    {
      "roomId": "mjc-vksd-ktu",
      "startTime": 1724825547555,
      "livestreamCount": 1,
      "recordingCount": 1
    },
    {
      "roomId": "gar-ouoz-szl",
      "startTime": 1724180396850,
      "livestreamCount": 0,
      "recordingCount": 0
    }
  ]
}

Endpoint

GET

https://api.huddle01.com/api/v2/sdk/live-sessions/:roomId

💡

If the room isn't live, the API will throw a 404 NOT FOUND error.

Whatever sessions are created using Create Room API and are joined by users, will be listed in the Live Sessions API. The API will return the list of all the rooms which are currently live and the number of users present in each room.

GET
/live-sessions/:roomId

Get Single Live Sessions API

The API supports a GET request with the following required parameters:

  • x-api-key - Add your API Key to the headers to fetch all rooms associated with your API Key.
  • YOUR_ROOM_ID - Add the roomId in path params to fetch the details of a single active room.
Request
GET • /live-sessions/:roomId
const response = await axios.get(
  'https://api.huddle01.com/api/v2/sdk/live-sessions/YOUR_ROOM_ID',
  {
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': {{API_KEY}},
    },
  }
);
Response

Upon success, the API will return a response with the following fields:

  • roomId - The roomId of the room.
  • startTime - The start time of session in epoch
  • liveStreamCount - The count of live streams associated with this session
  • recordingCount - The count of recordings associated with this session
  • currentPeerCount - The count of peers currently inside session
Response
{
  "liveSessions": [
    {
        "roomid": "gar-ouoz-szl",
        "starttime": 1724825547555,
        "currentPeerCount": 412,
        "livestreamCount": 1,
        "recordingCount": 1
    }
  ]
}
Audio/Video Infrastructure designed for developers to empower them to ship simple yet powerful Audio/Video Apps.
support
company
Copyright © 2024 Graphene 01, Inc. All Rights Reserved.