getParticipants()

Get Participants Detail

This method returns a list of participants in a meetings. By passing the sessionId, you can easily access a list of participants who joined the meeting.

💡

You can retrieve the sessionId by using getRoomMeetings().

Example

import { API } from '@huddle01/server-sdk/api';
 
const participantsList = async () => {
  const api = new API({
    apiKey: process.env.API_KEY!,
  });
 
  const participantsRes = await api.getParticipantsDetails({
    sessionId: 'YOUR_SESSION_ID',
  });
 
  return participantsRes;
};

Returns

getParticipants() returns following details.

NameTypeDescription
peerIdstringThe peer id of the user
joinTimenumberTime of joining the call in Epochs
exitTImenumber | undefinedTime of exiting the call in Epochs
metadataunknownMetadata associated with the peer
{
  "participants": [
    {
      "peerId": "peerId--AmxuhmUBW17kP1FGL2mU",
      "joinTime": 1706810039986,
      "exitTime": 1706811249372,
      "metadata": {
          ...
      }
    },
    ...
  ]
}
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.