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
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.
/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.
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}},
},
}
);
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 callmetadata
- The metadata of the peer fetched from access tokencount
- The total count of participants in response
In case of an error, the API will return an error message with a corresponding status code.
{
"count": 5,
"participants": [
{
"peerId": "peerId-4cRF64LOB6dWF_d0qEzQs",
"joinTime": 1724857378134,
"metadata": {
"displayName": "akmo3.eth",
...
}
}
...
]
}