0

List Past Meeting Participants

by
Published Jun 6, 2022

Retrieve information on participants from a past meeting. [See the docs here](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/pastMeetingParticipants).

Script zoom Verified

The script

Submitted by hugo697 Bun
Verified 398 days ago
1
import zoomApi, { type GetMeetingParticipantReportsResponse } from 'zoomapi'
2

3
type Zoom = {
4
	accountId: string
5
	oauthClientId: string
6
	oauthClientSecret: string
7
	webhookSecretToken: string
8
}
9

10
export async function main(resource: Zoom, meetingId: string) {
11
	const client = zoomApi(resource)
12
	let nextPageToken: string | undefined
13
	let allParticipants: GetMeetingParticipantReportsResponse['participants'] = []
14

15
	do {
16
		const params = nextPageToken ? { next_page_token: nextPageToken } : {}
17
		const response = await client.reports.GetMeetingParticipantReports(meetingId, params)
18
		allParticipants = allParticipants.concat(response.participants)
19
		nextPageToken = response.next_page_token
20
	} while (nextPageToken)
21

22
	return { participants: allParticipants }
23
}
24