0

Send Chat Message

by
Published Jun 6, 2022

Send chat messages on Zoom to either an individual user who is in your contact list or to a of which you are a member.

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
	chatParams: {
13
		at_items: {
14
			at_contact: string
15
			at_type: number
16
			end_position: number
17
			start_position: number
18
		}[]
19
		rich_text: {
20
			start_position: number
21
			end_position: number
22
			format_type: string
23
			format_attr: string
24
		}[]
25
		message: string
26
		file_ids: string[]
27
		reply_main_message_id: string
28
		to_channel: string
29
		to_contact: string
30
	}
31
) {
32
	const client = zoomApi(resource)
33
	const createdMeeting = await client.chat.SendChatMessage(chatParams)
34
	return createdMeeting
35
}
36