Preview Live Sessions Peers 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/participants/:roomId

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/participants/:roomId

Get Preview Peers 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 the peers associated with your room.
  • roomId - Add your RoomId to the query params to fetch all the peers associated with your room.
Request
GET • /live-sessions/participants/:roomId
const response = await axios.get(
  'https://api.huddle01.com/api/v2/sdk/live-sessions/participants/YOUR_ROOM_ID',
  {
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': {{API_KEY}},
    },
  }
);
Response

Upon success, the API will return a response with an array of participants and count of particpants with the following fields:

  • peerId - The unique identifier for every peer.
  • joinTime - The timestamp at which they joined the call
  • metadata - The metadata of the peer fetched from access token
  • count - The total count of participants in response

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

Response
{
  "count": 5,
  "participants": [
    {
      "peerId": "peerId-4cRF64LOB6dWF_d0qEzQs",
      "joinTime": 1724857378134,
      "metadata": {
        "displayName": "akmo3.eth",
        ...
      }
    }
    ...
  ]
}
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.