0

Add Webinar Registrant

by
Published Jun 6, 2022

Registers a participant for a webinar. [See the docs here](https://marketplace.zoom.us/docs/api-reference/zoom-api/webinars/webinarregistrantcreate).

Script zoom Verified

The script

Submitted by hugo697 Bun
Verified 398 days ago
1
import zoomApi 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(
11
	resource: Zoom,
12
	webinarId: string,
13
	registrant: {
14
		id?: string
15
		email: string
16
		first_name: string
17
		last_name?: string
18
		address?: string
19
		city?: string
20
		country?: string
21
		zip?: string
22
		state?: string
23
		phone?: string
24
		industry?: string
25
		org?: string
26
		job_title?: string
27
		purchasing_time_frame?: string
28
		role_in_purchase_process?: string
29
		no_of_employees?: string
30
		comments?: string
31
		custom_questions?: {
32
			title: string
33
			value?: string
34
		}[]
35
		status?: 'approved' | 'pending' | 'denied'
36
		create_time?: string
37
		join_url?: string
38
	}
39
) {
40
	try {
41
		const client = zoomApi(resource)
42
		const meeting = await client.webinars.AddWebinarRegistrant(webinarId, registrant)
43
		return meeting
44
	} catch (error) {
45
		console.log(error)
46
	}
47
}
48