getParticipants()

Get Participants

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

💡

You can retrieve the meetingId by using getRoomMeetings().

Example

import { API } from '@huddle01/server-sdk/api';
 
const participantsList = async () => {
  const api = new API({
    apiKey: process.env.API_KEY!,
  });
 
  const participants = await api.getParticipants({
    meetingId: 'YOUR_MEETING_ID',
  });
 
  return participants?.data;
};

Returns

getParticipants() returns following details.

NameTypeDescription
roomIdstringThe room id of the meeting
hostWalletAddressstring[]list of host wallet addresses
durationnumberThe duration of the meeting in minutes
participants{ displayName: string, walletAddress: string }Participants list with name and wallet address
{
    "data": {
        "roomId": "YOUR_ROOM_ID",
        "hostWalletAddress": [],
        "duration": 23, // this will be in minutes
        "participants": [
            {
                "displayName": "John Doe",
                "walletAddress": "0x1234567890", // if walletAddress is passed while creating token
            }
        ]
    }
}
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.