From 2d8f7ae8dcf23618ae7556482b39074e337b4a1c Mon Sep 17 00:00:00 2001 From: Justin Donnell Date: Fri, 14 Mar 2025 09:46:41 -0400 Subject: [PATCH 1/2] Support Custom Hosts During Meeting Creation Enhanced the createMeeting function in Zoom.php to allow specifying a different Zoom user as the meeting host. Previously, the function defaulted to using the API caller's account as the host. Now, if a paid Zoom account has multiple users, you can pass a specific user ID to designate them as the host. Defaults to the current user if none is provided. --- src/Zoom.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Zoom.php b/src/Zoom.php index aea7266..a18f19b 100644 --- a/src/Zoom.php +++ b/src/Zoom.php @@ -60,8 +60,10 @@ protected function getAccessToken() // create meeting public function createMeeting(array $data) { + $user = (isset($data['user'])) ? $data['user'] : 'me'; + try { - $response = $this->client->request('POST', 'users/me/meetings', [ + $response = $this->client->request('POST', 'users/' . $user . '/meetings', [ 'json' => $data, ]); $res = json_decode($response->getBody(), true); From 29459cd60b35dbae9db278b84a9758d11211ef2c Mon Sep 17 00:00:00 2001 From: Justin Donnell Date: Fri, 14 Mar 2025 09:54:38 -0400 Subject: [PATCH 2/2] Update README to Include Custom User Parameter for createMeeting Updated README to clarify how to pass a custom user ID when creating a meeting with createMeeting. This ensures users understand how to designate a different host instead of defaulting to the API caller's account. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a1f2688..3324b2d 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,7 @@ At present we cover the following modules "duration" => 60, // in minutes "timezone" => 'Asia/Dhaka', // set your timezone "password" => 'set your password', + "user" => 'user@example.com', // if a paid Zoom account has multiple users, you can pass a specific user ID to designate them as the host "start_time" => 'set your start time', // set your start time "template_id" => 'set your template id', // set your template id Ex: "Dv4YdINdTk+Z5RToadh5ug==" from https://marketplace.zoom.us/docs/api-reference/zoom-api/meetings/meetingtemplates "pre_schedule" => false, // set true if you want to create a pre-scheduled meeting