From 9d944aed64bc8ce66dba52739f115cea1b47cdbb Mon Sep 17 00:00:00 2001 From: Laavanja Date: Tue, 1 Jul 2025 16:57:53 +0530 Subject: [PATCH 01/11] README.md --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c5d01bc..a43f61b 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ ## Overview [Zoom](https://www.zoom.com/) is a widely-used video conferencing service provided by Zoom Video Communications, enabling users to host and attend virtual meetings, webinars, and collaborate online. -The `ballerinax/zoom.meetings` package offers APIs to connect and interact with Zoom API endpoints, specifically based on Zoom API v2 (https://developers.zoom.us/docs/api/meetings/). +The `ballerinax/zoom.meetings` package offers APIs to connect and interact with Zoom API endpoints, specifically based on [Zoom API v2](https://developers.zoom.us/docs/api/meetings/). ## Setup guide @@ -37,22 +37,22 @@ To use the Zoom meetings connector, you must have access to the Zoom API through 2. **Set Redirect URI**: Add your application's redirect URI - 3. **Add Scopes**: Make sure your Zoom app has the necessary scopes for the Scheduler API: - * Add `scheduler:read`, `scheduler:write` and `user:read` in the scope + 3. **Add scopes**: Make sure your Zoom app has the necessary scopes for the meetings API: + * Add `meetings:read`, `meetings:write` and `user:read` in the scope ![App Scopes](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.meetings/refs/heads/main/docs/setup/resources/app-scopes.png) -### Step 3: Activate the App +### Step 3: Activate the app 1. Complete all necessary information fields. 2. Once, the necessary fields are correctly filled, app will be activated. -### Step 4: Get User Authorization +### Step 4: Get user authorization 1. **Direct users to authorization URL** (replace `YOUR_CLIENT_ID` and `YOUR_REDIRECT_URI`): ``` - https://zoom.us/oauth/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=scheduler:read scheduler:write user:read + https://zoom.us/oauth/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=meetings:read meetings:write user:read ``` 2. **User authorizes the app** and gets redirected to your callback URL with an authorization code @@ -72,7 +72,7 @@ To use the Zoom meetings connector, you must have access to the Zoom API through * `AUTHORIZATION_CODE` with the code received from the callback * `YOUR_REDIRECT_URI` with your configured redirect URI -### Step 5: Verify Your Setup +### Step 5: Verify your setup ```curl curl -X GET "https://api.zoom.us/v2/users/me" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" @@ -99,7 +99,7 @@ To use the `Zoom` connector in your Ballerina application, update the `.bal` fil ```bash refreshToken = "" refreshUrl = "" - userId="" + userId = "" clientId = "" clientSecret = "" ``` From f7b02cb325f5c2b54139793d319d120cd36c8784 Mon Sep 17 00:00:00 2001 From: Laavanja Date: Tue, 1 Jul 2025 16:58:12 +0530 Subject: [PATCH 02/11] README.md --- ballerina/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ballerina/README.md b/ballerina/README.md index f476c9b..b5cd4e7 100644 --- a/ballerina/README.md +++ b/ballerina/README.md @@ -1,7 +1,7 @@ ## Overview [Zoom](https://www.zoom.com/) is a widely-used video conferencing service provided by Zoom Video Communications, enabling users to host and attend virtual meetings, webinars, and collaborate online. -The `ballerinax/zoom.meetings` package offers APIs to connect and interact with Zoom API endpoints, specifically based on Zoom API v2 (https://developers.zoom.us/docs/api/meetings/). +The `ballerinax/zoom.meetings` package offers APIs to connect and interact with Zoom API endpoints, specifically based on [Zoom API v2](https://developers.zoom.us/docs/api/meetings/). ## Setup guide @@ -31,22 +31,22 @@ To use the Zoom meetings connector, you must have access to the Zoom API through 2. **Set Redirect URI**: Add your application's redirect URI - 3. **Add Scopes**: Make sure your Zoom app has the necessary scopes for the Scheduler API: - * Add `scheduler:read`, `scheduler:write` and `user:read` in the scope + 3. **Add scopes**: Make sure your Zoom app has the necessary scopes for the Meetings API: + * Add `meetings:read`, `meetings:write` and `user:read` in the scope ![App Scopes](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.meetings/refs/heads/main/docs/setup/resources/app-scopes.png) -### Step 3: Activate the App +### Step 3: Activate the app 1. Complete all necessary information fields. 2. Once, the necessary fields are correctly filled, app will be activated. -### Step 4: Get User Authorization +### Step 4: Get user authorization 1. **Direct users to authorization URL** (replace `YOUR_CLIENT_ID` and `YOUR_REDIRECT_URI`): ``` - https://zoom.us/oauth/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=scheduler:read scheduler:write user:read + https://zoom.us/oauth/authorize?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=meetings:read meetings:write user:read ``` 2. **User authorizes the app** and gets redirected to your callback URL with an authorization code @@ -66,7 +66,7 @@ To use the Zoom meetings connector, you must have access to the Zoom API through * `AUTHORIZATION_CODE` with the code received from the callback * `YOUR_REDIRECT_URI` with your configured redirect URI -### Step 5: Verify Your Setup +### Step 5: Verify your setup ```curl curl -X GET "https://api.zoom.us/v2/users/me" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" @@ -93,7 +93,7 @@ To use the `Zoom` connector in your Ballerina application, update the `.bal` fil ```bash refreshToken = "" refreshUrl = "" - userId="" + userId = "" clientId = "" clientSecret = "" ``` From 43b30a669599b5d05bf3b512f1ff37fb8713ff02 Mon Sep 17 00:00:00 2001 From: Laavanja Date: Tue, 1 Jul 2025 16:58:51 +0530 Subject: [PATCH 03/11] README.md --- ballerina/tests/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ballerina/tests/README.md b/ballerina/tests/README.md index fe52253..7dbeeab 100644 --- a/ballerina/tests/README.md +++ b/ballerina/tests/README.md @@ -1,4 +1,4 @@ -# Running Tests +# Running tests ## Prerequisites You need a Access token from Zoom developer account. @@ -11,7 +11,7 @@ curl -X GET "https://api.zoom.us/v2/users/me" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" ``` -# Running Tests +# Running tests There are two test environments for running the Zoom connector tests. The default test environment is the mock server for Zoom API. The other test environment is the actual Zoom API. @@ -19,16 +19,16 @@ You can run the tests in either of these environments and each has its own compa Test Groups | Environment -------------|--------------------------------------------------- - mock_tests | Mock server for Zoom API (Defualt Environment) + mock_tests | Mock server for Zoom API (Default Environment) live_tests | Zoom API -## Running Tests in the Mock Server +## Running tests in the mock server To execute the tests on the mock server, ensure that the `IS_LIVE_SERVER` environment variable is either set to `false` or unset before initiating the tests. This environment variable can be configured within the `Config.toml` file located in the tests directory or specified as an environmental variable. -#### Using a Config.toml File +#### Using a Config.toml file Create a `Config.toml` file in the tests directory and the following content: @@ -36,7 +36,7 @@ Create a `Config.toml` file in the tests directory and the following content: isLiveServer = false ``` -#### Using Environment Variables +#### Using environment variables Alternatively, you can set your authentication credentials as environment variables: If you are using linux or mac, you can use following method: @@ -53,7 +53,7 @@ Then, run the following command to run the tests: ./gradlew clean test ``` -## Running Tests Against Zoom Live API +## Running tests against Zoom Live API #### Using a Config.toml File @@ -68,7 +68,7 @@ Create a `Config.toml` file in the tests directory and add your authentication c userId = "user_id_from_step5" ``` -#### Using Environment Variables +#### Using environment variables Alternatively, you can set your authentication credentials as environment variables: If you are using linux or mac, you can use following method: From 0ec7e4f8b46ea7af62c84537c59e4a83ad86b434 Mon Sep 17 00:00:00 2001 From: Laavanja Date: Tue, 1 Jul 2025 16:59:24 +0530 Subject: [PATCH 04/11] tests.bal --- ballerina/tests/tests.bal | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ballerina/tests/tests.bal b/ballerina/tests/tests.bal index a064bb3..d11f5e4 100644 --- a/ballerina/tests/tests.bal +++ b/ballerina/tests/tests.bal @@ -43,7 +43,7 @@ ConnectionConfig config = isLiveServer final Client zoomClient = check new Client(config, serviceUrl); -int meetingId = 87163296266; +int meetingId = 81835795193; @test:Config { groups: ["live_tests", "mock_tests"] @@ -86,7 +86,7 @@ function testGetMeeting() returns error? { dependsOn: [testCreateMeeting] } function testUpdateMeeting() returns error? { - error? response = zoomClient->/meetings/[meetingId].patch( + check zoomClient->/meetings/[meetingId].patch( payload = { topic: "Updated New Meeting", startTime: "2025-09-01T15:05:00Z" @@ -101,7 +101,7 @@ function testUpdateMeeting() returns error? { dependsOn: [testCreateMeeting, testUpdateMeeting, testGetMeeting, testGetMeetingInvitation] } function testDeleteMeeting() returns error? { - error? response = zoomClient->/meetings/[meetingId].delete(); + check zoomClient->/meetings/[meetingId].delete(); } @test:Config { @@ -110,6 +110,7 @@ function testDeleteMeeting() returns error? { } function testGetMeetingInvitation() returns error? { MeetingInvitation response = check zoomClient->/meetings/[meetingId]/invitation(); + test:assertTrue(response.invitation != "", msg = "Invitation should not be empty"); } @test:Config { From a223cc3eb470d994dae24f3bbb8809ec2bd4a7c8 Mon Sep 17 00:00:00 2001 From: Laavanja Date: Tue, 1 Jul 2025 16:59:39 +0530 Subject: [PATCH 05/11] README.md --- examples/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/README.md b/examples/README.md index f1b7ec6..c97151e 100644 --- a/examples/README.md +++ b/examples/README.md @@ -16,7 +16,7 @@ The `ballerinax/zoom.meetings` connector provides practical examples illustratin ```bash refreshToken = "" refreshUrl = "" - userId="" + userId = "" clientId = "" clientSecret = "" ``` From 6fb83d5c4bae242349d26f21429f74c61b805bb3 Mon Sep 17 00:00:00 2001 From: Laavanja Date: Tue, 1 Jul 2025 17:00:00 +0530 Subject: [PATCH 06/11] create new meeting --- examples/create-new-meeting/create-new-meeting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/create-new-meeting/create-new-meeting.md b/examples/create-new-meeting/create-new-meeting.md index bc364b7..f274dc4 100644 --- a/examples/create-new-meeting/create-new-meeting.md +++ b/examples/create-new-meeting/create-new-meeting.md @@ -1,4 +1,4 @@ -# Zoom Meetings - Create a Meeting +# Zoom Meetings - Create a meeting This example demonstrates how the **Zoom Meetings API** can be used to **create a Zoom meeting** programmatically. This is helpful for automating internal scheduling, setting up webinars, or integrating with external systems such as CRMs or helpdesks. @@ -15,7 +15,7 @@ Create a `Config.toml` file in the example's root directory and, provide your Zo ```bash refreshToken = "" refreshUrl = "" -userId="" +userId = "" clientId = "" clientSecret = "" ``` From 552fb2ed4754a10ad1f90dd95e5aaa7182241bbb Mon Sep 17 00:00:00 2001 From: Laavanja Date: Tue, 1 Jul 2025 17:00:26 +0530 Subject: [PATCH 07/11] list all meetings --- examples/list-all-meetings/list-all-meetings.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/list-all-meetings/list-all-meetings.md b/examples/list-all-meetings/list-all-meetings.md index fced7e9..bf13cf2 100644 --- a/examples/list-all-meetings/list-all-meetings.md +++ b/examples/list-all-meetings/list-all-meetings.md @@ -1,4 +1,4 @@ -# Zoom Meetings - List all Meetings +# Zoom Meetings - List all meetings This example demonstrates how to **retrieve and list all Zoom meetings** for a given user using the Zoom Meetings API. This is useful for displaying scheduled meetings, integrating with dashboards, or building internal tools for scheduling visibility. @@ -15,7 +15,7 @@ Create a `Config.toml` file in the example's root directory and, provide your Zo ```bash refreshToken = "" refreshUrl = "" -userId="" +userId = "" clientId = "" clientSecret = "" ``` From 6455dbf9d114bdc872e1a7ab9239ff13aa9cf3dc Mon Sep 17 00:00:00 2001 From: Laavanja Date: Tue, 1 Jul 2025 17:00:52 +0530 Subject: [PATCH 08/11] main.bal --- examples/list-all-meetings/main.bal | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/examples/list-all-meetings/main.bal b/examples/list-all-meetings/main.bal index 4329dc2..017cd55 100644 --- a/examples/list-all-meetings/main.bal +++ b/examples/list-all-meetings/main.bal @@ -46,6 +46,21 @@ public function main() returns error? { io:println("-------------------------------"); } } + meetings:InlineResponse20028Meetings firstMeeting = meetings[0]; + int meetingId = firstMeeting.id; + error? updateResult = zoomClient->/meetings/[meetingId].patch( + payload = { + topic: "Updated Topic via Test Ballerina", + startTime: "2025-09-01T15:05:00Z" + } + ); + if updateResult is error { + io:println("Failed to update meeting: ", updateResult.message()); + } else { + io:println("Meeting ", meetingId, " successfully updated."); + } + meetings:InlineResponse20013 updatedMeeting = check zoomClient->/meetings/[meetingId](); + io:println("Updated Topic: ", updatedMeeting.topic); } From 05471fcb31ca38a21e27757c96b23cf403cc628d Mon Sep 17 00:00:00 2001 From: Laavanja Date: Wed, 2 Jul 2025 11:25:06 +0530 Subject: [PATCH 09/11] README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a43f61b..b69d3d2 100644 --- a/README.md +++ b/README.md @@ -29,15 +29,15 @@ To use the Zoom meetings connector, you must have access to the Zoom API through ### Step 2: Configure OAuth settings - 1. **Note down your credentials**: + 1. **Note down your credentials:** * Client ID * Client Secret ![App Credentials](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.meetings/refs/heads/main/docs/setup/resources/app-credentials.png) - 2. **Set Redirect URI**: Add your application's redirect URI + 2. **Set Redirect URI:** Add your application's redirect URI - 3. **Add scopes**: Make sure your Zoom app has the necessary scopes for the meetings API: + 3. **Add scopes:** Make sure your Zoom app has the necessary scopes for the meetings API: * Add `meetings:read`, `meetings:write` and `user:read` in the scope ![App Scopes](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.meetings/refs/heads/main/docs/setup/resources/app-scopes.png) @@ -57,7 +57,7 @@ To use the Zoom meetings connector, you must have access to the Zoom API through 2. **User authorizes the app** and gets redirected to your callback URL with an authorization code - 3. **Exchange authorization code for tokens**: + 3. **Exchange authorization code for tokens:** ```curl curl -X POST https://zoom.us/oauth/token \ -H "Authorization: Basic $(echo -n 'CLIENT_ID:CLIENT_SECRET' | base64)" \ From bb347c71ebb0fc711d508f5fadcf2536afd50710 Mon Sep 17 00:00:00 2001 From: Laavanja Date: Wed, 2 Jul 2025 11:25:25 +0530 Subject: [PATCH 10/11] README.md --- ballerina/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ballerina/README.md b/ballerina/README.md index b5cd4e7..cc710b8 100644 --- a/ballerina/README.md +++ b/ballerina/README.md @@ -23,15 +23,15 @@ To use the Zoom meetings connector, you must have access to the Zoom API through ### Step 2: Configure OAuth settings - 1. **Note down your credentials**: + 1. **Note down your credentials:** * Client ID * Client Secret ![App Credentials](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.meetings/refs/heads/main/docs/setup/resources/app-credentials.png) - 2. **Set Redirect URI**: Add your application's redirect URI + 2. **Set Redirect URI:** Add your application's redirect URI - 3. **Add scopes**: Make sure your Zoom app has the necessary scopes for the Meetings API: + 3. **Add scopes:** Make sure your Zoom app has the necessary scopes for the Meetings API: * Add `meetings:read`, `meetings:write` and `user:read` in the scope ![App Scopes](https://raw.githubusercontent.com/ballerina-platform/module-ballerinax-zoom.meetings/refs/heads/main/docs/setup/resources/app-scopes.png) @@ -51,7 +51,7 @@ To use the Zoom meetings connector, you must have access to the Zoom API through 2. **User authorizes the app** and gets redirected to your callback URL with an authorization code - 3. **Exchange authorization code for tokens**: + 3. **Exchange authorization code for tokens:** ```curl curl -X POST https://zoom.us/oauth/token \ -H "Authorization: Basic $(echo -n 'CLIENT_ID:CLIENT_SECRET' | base64)" \ From c53b8b876abea5da5cf4946e150ff3a32f63d2df Mon Sep 17 00:00:00 2001 From: Laavanja Date: Wed, 2 Jul 2025 12:14:54 +0530 Subject: [PATCH 11/11] main.bal --- examples/list-all-meetings/main.bal | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/examples/list-all-meetings/main.bal b/examples/list-all-meetings/main.bal index 017cd55..67433a1 100644 --- a/examples/list-all-meetings/main.bal +++ b/examples/list-all-meetings/main.bal @@ -48,17 +48,12 @@ public function main() returns error? { } meetings:InlineResponse20028Meetings firstMeeting = meetings[0]; int meetingId = firstMeeting.id; - error? updateResult = zoomClient->/meetings/[meetingId].patch( - payload = { - topic: "Updated Topic via Test Ballerina", + check zoomClient->/meetings/[meetingId].patch({ + topic: "Updated Internship Topic via Test Ballerina", startTime: "2025-09-01T15:05:00Z" } ); - if updateResult is error { - io:println("Failed to update meeting: ", updateResult.message()); - } else { - io:println("Meeting ", meetingId, " successfully updated."); - } + io:println("Meeting ", meetingId, " successfully updated."); meetings:InlineResponse20013 updatedMeeting = check zoomClient->/meetings/[meetingId](); io:println("Updated Topic: ", updatedMeeting.topic); }