0

List Webinar Participants Report

by
Published May 7, 2024

Retrieves detailed report on each webinar attendee. You can get webinar participant reports for the last 6 months. [See the docs here](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/reportWebinarParticipants).

Script zoom Verified

The script

Submitted by hugo697 Bun
Verified 398 days ago
1
import zoomApi, { type WebinarParticipantReportResponse } 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, webinarId: string) {
11
	const client = zoomApi(resource)
12
	let nextPageToken: string | undefined
13
	let allParticipants: WebinarParticipantReportResponse['participants'] = []
14

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

22
	return { participants: allParticipants }
23
}
24