@@ -66,16 +66,18 @@ async function generateZoomJWTBearerAccessToken (apiKey) {
6666 *
6767 * @param {Date } startTime the start time of the meeting
6868 * @param {Integer } duration the duration of the meeting
69+ * @param {String } timezone the timezone of the meeting
6970 * @returns Zoom API response
7071 */
71- async function createZoomMeeting ( startTime , duration ) {
72+ async function createZoomMeeting ( startTime , duration , timezone ) {
7273 const { accessToken, zoomAccountApiKey } = await generateZoomJWTBearerAccessToken ( )
7374
7475 // POST request details in Zoom API docs:
7576 // https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate
7677 const res = await axios . post ( 'https://api.zoom.us/v2/users/me/meetings' , {
7778 type : 2 ,
7879 start_time : startTime . toISOString ( ) ,
80+ timezone,
7981 duration
8082 } , {
8183 headers : {
@@ -94,11 +96,12 @@ async function createZoomMeeting (startTime, duration) {
9496 *
9597 * @param {Date } startTime the start time of the meeting
9698 * @param {Integer } duration the duration of the meeting
99+ * @param {String } timezone the timezone of the meeting
97100 * @returns The meeting urls for the Zoom meeting
98101 */
99- async function generateZoomMeetingLink ( startTime , duration ) {
102+ async function generateZoomMeetingLink ( startTime , duration , timezone ) {
100103 try {
101- const { meeting, zoomAccountApiKey } = await createZoomMeeting ( startTime , duration )
104+ const { meeting, zoomAccountApiKey } = await createZoomMeeting ( startTime , duration , timezone )
102105
103106 // learn more: https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingcreate#responses
104107 console . log ( meeting . start_url , 'Zoom meeting link for host' )
0 commit comments