Zoom PHP API Client Documentation

Everything you need to know about using the Tectalic Zoom PHP API Client.

Introduction

The Tectalic Zoom REST API Client is a package that provides a convenient and straightforward way to interact with the Zoom API from your PHP application.

You can purchase this package from https://tectalic.com/apis/zoom.

Installation

System Requirements

  • PHP version 7.2.5 or newer (including PHP 8.0 and 8.1)
  • PHP JSON extension installed if using PHP 7.x. As of PHP 8.0, this extension became a core PHP extension so is always enabled.
  • A PSR-18 compatible HTTP client such as ‘Guzzle’ or the ‘Symfony HTTP Client’.

Composer Installation

To install this package into your PHP project, we recommend using Composer.

Please see the detailed instructions on configuring your project to access the Tectalic Composer repository.

You will need to log into the Tectalic account that purchased the Tectalic Zoom REST API Client package to access these instructions.

Once you have followed the above instructions, install the package into your project:

composer require tectalic/zoom

Manual Installation

If you aren’t using Composer in your PHP project, you can choose to Download the latest release and install it into your PHP project manually.

If doing this, you will need to ensure that all dependencies listed in the package’s composer.json file are also installed.

Usage

After installing the Tectalic Zoom REST API Client package into your project, ensure you also have a compatible PSR-18 HTTP client such as ‘Guzzle’ or the Symfony ‘HTTP Client’.

You can use the following code sample and customize it to suit your application.

// Load your project's composer autoloader (if you aren't already doing so).
require_once(__DIR__ . '/vendor/autoload.php');
use Symfony\Component\HttpClient\Psr18Client;
use Tectalic\Zoom\Authentication;
use Tectalic\Zoom\Client;
use Tectalic\Zoom\Manager;
 
// Build a Tectalic Zoom REST API Client globally.
$auth = new Authentication('token');
$httpClient = new Psr18Client();
Manager::build($httpClient, $auth);
 
// or
 
// Build a Tectalic Zoom REST API Client manually.
$auth = new Authentication('token');
$httpClient = new Psr18Client();
$client = new Client($httpClient, $auth, Manager::BASE_URI);

Authentication

To authenticate your API requests, you will need to provide an Authentication ($auth) object when calling Manager::build().

Authentication to the Zoom API is by OAuth 2.0 Bearer Token authentication.

Please see the Zoom API documentation for more details on obtaining your authentication credentials.

In the Usage code above, customize the Authentication constructor to your needs. For example, you may wish to define your credentials in an environment variable and pass it to the constructor.

Client Class

The primary class you will interact with is the Client class (Tectalic\Zoom\Client).

This Client class also contains the helper methods that let you quickly access the 200 API Handlers.

Please see below for a complete list of supported handlers and methods.

Supported API Handlers and Methods

This package supports 373 API Methods, which are grouped into 200 API Handlers.

See the table below for a full list of API Handlers and Methods.

API Handler Class and Method Name Description API Verb and URL
Accounts::accounts() List sub accounts GET /accounts
Accounts::create() Create a sub account POST /accounts
Accounts::account() Get sub account details GET /accounts/{accountId}
Accounts::disassociate() Disassociate a sub account DELETE /accounts/{accountId}
AccountsBilling::accountBilling() Get billing information GET /accounts/{accountId}/billing
AccountsBilling::billingUpdate() Update billing information PATCH /accounts/{accountId}/billing
AccountsBillingInvoices::billing() List billing invoices GET /accounts/{accountId}/billing/invoices
AccountsBillingInvoices::getAccountBilling() Get invoice details GET /accounts/{accountId}/billing/invoices/{invoiceId}
AccountsLockSettings::list() Get locked settings GET /accounts/{accountId}/lock_settings
AccountsLockSettings::updateAccount() Update locked settings PATCH /accounts/{accountId}/lock_settings
AccountsManagedDomains::accountManagedDomain() Get managed domains GET /accounts/{accountId}/managed_domains
AccountsOptions::optionsUpdate() Update options PATCH /accounts/{accountId}/options
AccountsOwner::updateAccount() Update the account owner PUT /accounts/{accountId}/owner
AccountsPhoneSettings::updatePhone() Update BYOC settings PATCH /accounts/{accountId}/phone/settings
AccountsPhoneSetup::setUp() Set up a Zoom Phone account POST /accounts/{accountId}/phone/setup
AccountsPhoneSipTrunkTrunks::postPhoneSiptrunk() Assign SIP trunks POST /accounts/{accountId}/phone/sip_trunk/trunks
AccountsPhoneSipTrunkTrunks::updatePhoneSiptrunk() Update SIP trunk details PATCH /accounts/{accountId}/phone/sip_trunk/trunks/{sipTrunkId}
AccountsPlans::accountPlans() Get plan Information GET /accounts/{accountId}/plans
AccountsPlans::planCreate() Subscribe plans POST /accounts/{accountId}/plans
AccountsPlansAddons::planAddonUpdate() Update an additional plan PUT /accounts/{accountId}/plans/addons
AccountsPlansAddons::planAddonCreate() Subscribe additional plan POST /accounts/{accountId}/plans/addons
AccountsPlansAddonsStatus::planAddonCancel() Cancel additional plans PATCH /accounts/{accountId}/plans/addons/status
AccountsPlansBase::planBaseUpdate() Update a base plan PUT /accounts/{accountId}/plans/base
AccountsPlansBaseStatus::planBaseDelete() Cancel a base plan PATCH /accounts/{accountId}/plans/base/status
AccountsPlansUsage::getPlan() Get plan usage GET /accounts/{accountId}/plans/usage
AccountsRecordings::getAccountCloud() List recordings of an account GET /accounts/{accountId}/recordings
AccountsSettings::accountSettings() Get settings GET /accounts/{accountId}/settings
AccountsSettings::settingsUpdate() Update settings PATCH /accounts/{accountId}/settings
AccountsSettingsVirtualBackgrounds::uploadVb() Upload virtual background files POST /accounts/{accountId}/settings/virtual_backgrounds
AccountsSettingsVirtualBackgrounds::delVb() Delete virtual background files DELETE /accounts/{accountId}/settings/virtual_backgrounds
AccountsSipTrunkCalloutCountries::listInternal() List internal call-out countries GET /accounts/{accountId}/sip_trunk/callout_countries
AccountsSipTrunkCalloutCountries::add() Add internal call-out countries POST /accounts/{accountId}/sip_trunk/callout_countries
AccountsSipTrunkCalloutCountries::deleteInternalCallOutCountry() Delete internal call-out country DELETE /accounts/{accountId}/sip_trunk/callout_countries/{countryId}
AccountsSipTrunkInternalNumbers::list() List internal numbers GET /accounts/{accountId}/sip_trunk/internal_numbers
AccountsSipTrunkInternalNumbers::add() Add internal numbers POST /accounts/{accountId}/sip_trunk/internal_numbers
AccountsSipTrunkInternalNumbers::delete() Delete an internal number DELETE /accounts/{accountId}/sip_trunk/internal_numbers/{numberId}
AccountsSipTrunkNumbers::assignSipTrunk() Assign numbers POST /accounts/{accountId}/sip_trunk/numbers
AccountsSipTrunkNumbers::deleteAllSip() Delete all numbers DELETE /accounts/{accountId}/sip_trunk/numbers
AccountsSipTrunkSettings::assignSipconfig() Assign SIP trunk configuration PATCH /accounts/{accountId}/sip_trunk/settings
AccountsSipTrunkTrunks::listSiptrunks() List SIP trunks GET /accounts/{accountId}/sip_trunk/trunks
AccountsSipTrunkTrunks::assignSiptrunks() Assign SIP trunks POST /accounts/{accountId}/sip_trunk/trunks
AccountsSipTrunkTrunks::deleteSiptrunk() Delete a SIP trunk DELETE /accounts/{accountId}/sip_trunk/trunks/{trunkId}
AccountsTrustedDomains::accountTrustedDomain() Get trusted domains GET /accounts/{accountId}/trusted_domains
AccountsUsersAccount::switchUser() Switch a user’s account PUT /accounts/{accountId}/users/{userId}/account
ApiDownloadBillingInvoices::invoicePdf() Download an invoice file GET /api/download/billing/invoices/{invoiceId}
ArchiveFiles::listArchivedFiles() List archived files GET /archive_files
ChatChannels::getUserLevel() Get a channel GET /chat/channels/{channelId}
ChatChannels::deleteUserLevel() Delete a channel DELETE /chat/channels/{channelId}
ChatChannels::updateUserLevel() Update a channel PATCH /chat/channels/{channelId}
ChatChannelsMembers::removeAuserLevelChannel() Remove a member DELETE /chat/channels/{channelId}/members/{memberId}
ChatChannelsMembersMe::join() Join a channel POST /chat/channels/{channelId}/members/me
ChatChannelsMembersMe::leave() Leave a channel DELETE /chat/channels/{channelId}/members/me
ChatUsersChannels::list() List user’s channels GET /chat/users/{userId}/channels
ChatUsersChannels::create() Create a channel POST /chat/users/{userId}/channels
ChatUsersChannels::get() Get a channel GET /chat/users/{userId}/channels/{channelId}
ChatUsersChannels::delete() Delete a channel DELETE /chat/users/{userId}/channels/{channelId}
ChatUsersChannels::update() Update a channel PATCH /chat/users/{userId}/channels/{channelId}
ChatUsersChannelsMembers::listChannel() List channel members GET /chat/users/{userId}/channels/{channelId}/members
ChatUsersChannelsMembers::inviteChannel() Invite channel members POST /chat/users/{userId}/channels/{channelId}/members
ChatUsersChannelsMembers::removeAchannel() Remove a member DELETE /chat/users/{userId}/channels/{channelId}/members/{memberId}
ChatUsersMeContacts::list() List user’s contacts GET /chat/users/me/contacts
ChatUsersMeContacts::getUser() Get user’s contact details GET /chat/users/me/contacts/{contactId}
ChatUsersMessages::getChat() List user’s chat messages GET /chat/users/{userId}/messages
ChatUsersMessages::sendaChat() Send a chat message POST /chat/users/{userId}/messages
ChatUsersMessages::edit() Update a message PUT /chat/users/{userId}/messages/{messageId}
ChatUsersMessages::deleteChat() Delete a message DELETE /chat/users/{userId}/messages/{messageId}
Contacts::searchCompany() Search company contacts GET /contacts
Groups::groups() List groups GET /groups
Groups::create() Create a group POST /groups
Groups::group() Get a group GET /groups/{groupId}
Groups::delete() Delete a group DELETE /groups/{groupId}
Groups::update() Update a group PATCH /groups/{groupId}
GroupsLockSettings::list() Get locked settings GET /groups/{groupId}/lock_settings
GroupsLockSettings::lockedSettings() Update locked settings PATCH /groups/{groupId}/lock_settings
GroupsMembers::groupMembers() List group members GET /groups/{groupId}/members
GroupsMembers::membersCreate() Add group members POST /groups/{groupId}/members
GroupsMembers::membersDelete() Delete a group member DELETE /groups/{groupId}/members/{memberId}
GroupsMembers::updateAgroup() Update a group member PATCH /groups/{groupId}/members/{memberId}
GroupsSettings::list() Get a group’s settings GET /groups/{groupId}/settings
GroupsSettings::updateGroup() Update a group’s settings PATCH /groups/{groupId}/settings
GroupsSettingsVirtualBackgrounds::uploadGroupVb() Upload virtual background files POST /groups/{groupId}/settings/virtual_backgrounds
GroupsSettingsVirtualBackgrounds::delGroupVb() Delete virtual background files DELETE /groups/{groupId}/settings/virtual_backgrounds
H323Devices::list() List H.323/SIP devices GET /h323/devices
H323Devices::create() Create a H.323/SIP device POST /h323/devices
H323Devices::delete() Delete a H.323/SIP device DELETE /h323/devices/{deviceId}
H323Devices::update() Update a H.323/SIP device PATCH /h323/devices/{deviceId}
ImChatMessages::sendchatbot() Send chatbot messages POST /im/chat/messages
ImChatMessages::editChatbot() Edit a chatbot message PUT /im/chat/messages/{message_id}
ImChatMessages::deleteAchatbot() Delete a chatbot message DELETE /im/chat/messages/{message_id}
ImChatSessions::imChatSessions() Get IM chat sessions GET /im/chat/sessions
ImChatSessions::chatMessages() Get IM chat messages GET /im/chat/sessions/{sessionId}
ImGroups::imGroups() List IM directory groups GET /im/groups
ImGroups::groupCreate() Create an IM directory group POST /im/groups
ImGroups::imGroup() Retrieve an IM directory group GET /im/groups/{groupId}
ImGroups::groupDelete() Delete an IM directory group DELETE /im/groups/{groupId}
ImGroups::groupUpdate() Update an IM directory group PATCH /im/groups/{groupId}
ImGroupsMembers::group() List IM directory group members GET /im/groups/{groupId}/members
ImGroupsMembers::groupMembersCreate() Add IM directory group members POST /im/groups/{groupId}/members
ImGroupsMembers::groupMembersDelete() Delete an IM directory group member DELETE /im/groups/{groupId}/members/{memberId}
ImUsersChatMessages::listimmessages() Get user’s IM messages GET /im/users/{userId}/chat/messages
ImUsersMeChatMessages::sendimmessages() Send IM messages POST /im/users/me/chat/messages
LiveMeetingsEvents::inMeetingRecordingControl() Use in-Meeting recording controls PATCH /live_meetings/{meetingId}/events
Meetings::meeting() Get a meeting GET /meetings/{meetingId}
Meetings::delete() Delete a meeting DELETE /meetings/{meetingId}
Meetings::update() Update a meeting PATCH /meetings/{meetingId}
MeetingsBatchPolls::create() Perform batch poll creation POST /meetings/{meetingId}/batch_polls
MeetingsInvitation::meetingInvitation() Get meeting invitation GET /meetings/{meetingId}/invitation
MeetingsLivestream::list() Get live stream details GET /meetings/{meetingId}/livestream
MeetingsLivestream::liveStreamUpdate() Update a live stream PATCH /meetings/{meetingId}/livestream
MeetingsLivestreamStatus::liveStreamStatusUpdate() Update Live Stream Status PATCH /meetings/{meetingId}/livestream/status
MeetingsPolls::meetingPolls() List meeting polls GET /meetings/{meetingId}/polls
MeetingsPolls::pollCreate() Create a meeting poll POST /meetings/{meetingId}/polls
MeetingsPolls::pollGet() Get a meeting poll GET /meetings/{meetingId}/polls/{pollId}
MeetingsPolls::pollUpdate() Update a meeting poll PUT /meetings/{meetingId}/polls/{pollId}
MeetingsPolls::pollDelete() Delete a meeting poll DELETE /meetings/{meetingId}/polls/{pollId}
MeetingsRecordings::get() Get meeting recordings GET /meetings/{meetingId}/recordings
MeetingsRecordings::delete() Delete meeting recordings DELETE /meetings/{meetingId}/recordings
MeetingsRecordings::deleteOne() Delete a meeting recording file DELETE /meetings/{meetingId}/recordings/{recordingId}
MeetingsRecordingsRegistrants::recording() List recording registrants GET /meetings/{meetingId}/recordings/registrants
MeetingsRecordingsRegistrants::recordingRegistrantCreate() Create a recording registrant POST /meetings/{meetingId}/recordings/registrants
MeetingsRecordingsRegistrantsQuestions::registrantsQuestionsGet() Get registration questions GET /meetings/{meetingId}/recordings/registrants/questions
MeetingsRecordingsRegistrantsQuestions::registrantQuestionUpdate() Update registration questions PATCH /meetings/{meetingId}/recordings/registrants/questions
MeetingsRecordingsRegistrantsStatus::recordingRegistrant() Update registrant’s status PUT /meetings/{meetingId}/recordings/registrants/status
MeetingsRecordingsSettings::settingUpdate() Get meeting recording settings GET /meetings/{meetingId}/recordings/settings
MeetingsRecordingsSettings::settingsUpdate() Update meeting recording settings PATCH /meetings/{meetingId}/recordings/settings
MeetingsRecordingsStatus::statusUpdate() Recover meeting recordings PUT /meetings/{meetingId}/recordings/status
MeetingsRecordingsStatus::statusUpdateOne() Recover a single recording PUT /meetings/{meetingId}/recordings/{recordingId}/status
MeetingsRegistrants::meetingRegistrants() List meeting registrants GET /meetings/{meetingId}/registrants
MeetingsRegistrants::registrantCreate() Add meeting registrant POST /meetings/{meetingId}/registrants
MeetingsRegistrants::registrantdelete() Delete a meeting registrant DELETE /meetings/{meetingId}/registrants/{registrantId}
MeetingsRegistrantsQuestions::registrantsQuestionsGet() List registration questions GET /meetings/{meetingId}/registrants/questions
MeetingsRegistrantsQuestions::registrantQuestionUpdate() Update registration questions PATCH /meetings/{meetingId}/registrants/questions
MeetingsRegistrantsStatus::registrant() Update registrant’s status PUT /meetings/{meetingId}/registrants/status
MeetingsStatus::meetingStatus() Update meeting status PUT /meetings/{meetingId}/status
MetricsClientFeedback::dashboardClient() List Zoom meetings client feedback GET /metrics/client/feedback
MetricsClientFeedback::dashboardClientFeedbackDetail() Get zoom meetings client feedback GET /metrics/client/feedback/{feedbackId}
MetricsClientSatisfaction::listMeeting() List client meeting satisfaction GET /metrics/client/satisfaction
MetricsCrc::dashboard() Get CRC port usage GET /metrics/crc
MetricsIm::dashboard() Get IM metrics GET /metrics/im
MetricsIssuesZoomrooms::dashboardIssueZoomRoom() Get top 25 Zoom Rooms with issues GET /metrics/issues/zoomrooms
MetricsIssuesZoomrooms::dashboardIssueDetailZoomRoom() Get issues of Zoom Rooms GET /metrics/issues/zoomrooms/{zoomroomId}
MetricsMeetings::dashboard() List meetings GET /metrics/meetings
MetricsMeetings::dashboardMeetingDetail() Get meeting details GET /metrics/meetings/{meetingId}
MetricsMeetingsParticipants::dashboardMeeting() List meeting participants GET /metrics/meetings/{meetingId}/participants
MetricsMeetingsParticipantsQos::dashboardMeetingParticipants() List meeting participants QoS GET /metrics/meetings/{meetingId}/participants/qos
MetricsMeetingsParticipantsQos::dashboardMeetingParticipant() Get meeting participant QoS GET /metrics/meetings/{meetingId}/participants/{participantId}/qos
MetricsMeetingsParticipantsSatisfaction::feedback() Get post meeting feedback GET /metrics/meetings/{meetingId}/participants/satisfaction
MetricsMeetingsParticipantsSharing::dashboardMeetingParticipantShare() Get sharing/recording details GET /metrics/meetings/{meetingId}/participants/sharing
MetricsWebinars::dashboard() List webinars GET /metrics/webinars
MetricsWebinars::dashboardWebinarDetail() Get webinar details GET /metrics/webinars/{webinarId}
MetricsWebinarsParticipants::dashboardWebinar() Get webinar participants GET /metrics/webinars/{webinarId}/participants
MetricsWebinarsParticipantsQos::dashboardWebinarParticipants() List webinar participant QoS GET /metrics/webinars/{webinarId}/participants/qos
MetricsWebinarsParticipantsQos::dashboardWebinarParticipant() Get webinar participant QoS GET /metrics/webinars/{webinarId}/participants/{participantId}/qos
MetricsWebinarsParticipantsSatisfaction::webinarFeedback() Get post webinar feedback GET /metrics/webinars/{webinarId}/participants/satisfaction
MetricsWebinarsParticipantsSharing::dashboardWebinarParticipantShare() Get sharing/recording details GET /metrics/webinars/{webinarId}/participants/sharing
MetricsZoomrooms::dashboardZoomRooms() List Zoom Rooms GET /metrics/zoomrooms
MetricsZoomrooms::dashboardZoomRoom() Get Zoom Rooms details GET /metrics/zoomrooms/{zoomroomId}
MetricsZoomroomsIssues::dashboardZoomRoom() Get top 25 issues of Zoom Rooms GET /metrics/zoomrooms/issues
PastMeetings::details() Get past meeting details GET /past_meetings/{meetingUUID}
PastMeetingsFiles::listPastMeeting() List past meeting’s files GET /past_meetings/{meetingId}/files
PastMeetingsInstances::pastMeetings() List ended meeting instances GET /past_meetings/{meetingId}/instances
PastMeetingsParticipants::pastMeetingParticipants() Get past meeting participants GET /past_meetings/{meetingUUID}/participants
PastMeetingsPolls::listPastMeeting() List past meeting’s poll results GET /past_meetings/{meetingId}/polls
PastWebinarsAbsentees::webinar() Get webinar absentees GET /past_webinars/{WebinarUUID}/absentees
PastWebinarsFiles::listPastWebinar() List past webinar files GET /past_webinars/{webinarId}/files
PastWebinarsInstances::pastWebinars() List past webinar instances GET /past_webinars/{webinarId}/instances
PastWebinarsParticipants::listWebinar() List webinar participants GET /past_webinars/{webinarId}/participants
PastWebinarsPolls::listPastWebinarPollResults() List past webinar poll results GET /past_webinars/{webinarId}/polls
PastWebinarsQa::listPastWebinar() List Q&A of past webinar GET /past_webinars/{webinarId}/qa
PhoneAutoReceptionists::add() Add an auto receptionist POST /phone/auto_receptionists
PhoneAutoReceptionists::update() Update auto receptionist details PATCH /phone/auto_receptionists/{autoReceptionistId}
PhoneAutoReceptionistsPhoneNumbers::assignPhoneNumbers() Assign phone numbers POST /phone/auto_receptionists/{autoReceptionistId}/phone_numbers
PhoneAutoReceptionistsPhoneNumbers::unassignAllPhoneNums() Unassign all phone numbers DELETE /phone/auto_receptionists/{autoReceptionistId}/phone_numbers
PhoneAutoReceptionistsPhoneNumbers::unassignAphoneNum() Unassign a phone number DELETE /phone/auto_receptionists/{autoReceptionistId}/phone_numbers/{phoneNumberId}
PhoneBlockedList::list() List blocked lists GET /phone/blocked_list
PhoneBlockedList::addAnumberTo() Create a blocked list POST /phone/blocked_list
PhoneBlockedList::getAblockedList() Get blocked list details GET /phone/blocked_list/{blockedListId}
PhoneBlockedList::deleteAblockedList() Delete a blocked list DELETE /phone/blocked_list/{blockedListId}
PhoneBlockedList::update() Update a blocked list PATCH /phone/blocked_list/{blockedListId}
PhoneByocNumbers::addByocnumber() Add BYOC phone numbers POST /phone/byoc_numbers
PhoneCallLogs::account() Get account’s call logs GET /phone/call_logs
PhoneCallQueues::list() List call queues GET /phone/call_queues
PhoneCallQueues::create() Create a call queue POST /phone/call_queues
PhoneCallQueues::getAcallQueue() Get call queue details GET /phone/call_queues/{callQueueId}
PhoneCallQueues::deleteAcallQueue() Delete a call queue DELETE /phone/call_queues/{callQueueId}
PhoneCallQueues::update() Update call queue details PATCH /phone/call_queues/{callQueueId}
PhoneCallQueuesManager::changeCallQueue() Change call queue manager PUT /phone/call_queues/{callQueueId}/manager
PhoneCallQueuesMembers::addMembersTo() Add members to a call queue POST /phone/call_queues/{callQueueId}/members
PhoneCallQueuesMembers::unassignAll() Unassign all members DELETE /phone/call_queues/{callQueueId}/members
PhoneCallQueuesMembers::unassignMemberFrom() Unassign a member DELETE /phone/call_queues/{callQueueId}/members/{memberId}
PhoneCallQueuesPhoneNumbers::assignPhoneTo() Assign numbers to a call queue POST /phone/call_queues/{callQueueId}/phone_numbers
PhoneCallQueuesPhoneNumbers::unassignAphoneNum() Unassign all phone numbers DELETE /phone/call_queues/{callQueueId}/phone_numbers
PhoneCallQueuesPhoneNumbers::unAssignPhoneNum() Unassign a phone number DELETE /phone/call_queues/{callQueueId}/phone_numbers/{phoneNumberId}
PhoneCallQueuesRecordings::list() Get call queue recordings GET /phone/call_queues/{callQueueId}/recordings
PhoneCallingPlans::list() List calling plans GET /phone/calling_plans
PhoneCommonAreaPhones::list() List common area phones GET /phone/common_area_phones
PhoneCommonAreaPhones::add() Add a common area phone POST /phone/common_area_phones
PhoneCommonAreaPhones::getAcommonArea() Get common area phone details GET /phone/common_area_phones/{commonAreaPhoneId}
PhoneCommonAreaPhones::delete() Delete a common area phone DELETE /phone/common_area_phones/{commonAreaPhoneId}
PhoneCommonAreaPhones::update() Update common area phone PATCH /phone/common_area_phones/{commonAreaPhoneId}
PhoneCompanyNumber::changeMain() Change main company number PUT /phone/company_number
PhoneDevices::list() List devices GET /phone/devices
PhoneDevices::add() Add a device POST /phone/devices
PhoneDevices::getAdevice() Get device details GET /phone/devices/{deviceId}
PhoneDevices::deleteAdevice() Delete a device DELETE /phone/devices/{deviceId}
PhoneDevices::updateAdevice() Update a device PATCH /phone/devices/{deviceId}
PhoneMetricsCallLogs::listCallLogs() List call logs GET /phone/metrics/call_logs
PhoneMetricsCallLogs::getCallLogMetricsDetails() Get call details from call log GET /phone/metrics/call_logs/{call_id}
PhoneMetricsCallLogsQos::getCallQoS() Get call QoS GET /phone/metrics/call_logs/{callId}/qos
PhoneNumbers::listAccount() List phone numbers GET /phone/numbers
PhoneNumbers::getPhoneNumberDetails() Get phone number details GET /phone/numbers/{numberId}
PhoneNumbers::updatePhoneNumberDetails() Update phone number details PATCH /phone/numbers/{numberId}
PhoneRecordings::list() Get call recordings GET /phone/recordings
PhoneReportsOperationlogs::list() Get operation logs report GET /phone/reports/operationlogs
PhoneSettingTemplates::list() List setting templates GET /phone/setting_templates
PhoneSettingTemplates::add() Add a setting template POST /phone/setting_templates
PhoneSettingTemplates::get() Get setting template details GET /phone/setting_templates/{templateId}
PhoneSettingTemplates::update() Update a setting template PATCH /phone/setting_templates/{templateId}
PhoneSharedLineGroups::list() List shared line groups GET /phone/shared_line_groups
PhoneSharedLineGroups::createAsharedLineGroup() Create a shared line group POST /phone/shared_line_groups
PhoneSharedLineGroups::getAsharedLineGroup() Get a shared line group GET /phone/shared_line_groups/{sharedLineGroupId}
PhoneSharedLineGroups::deleteAsharedLineGroup() Delete a shared line group DELETE /phone/shared_line_groups/{sharedLineGroupId}
PhoneSharedLineGroups::updateAsharedLineGroup() Update a shared line group PATCH /phone/shared_line_groups/{sharedLineGroupId}
PhoneSharedLineGroupsMembers::addMembersTo() Add members to a shared line group POST /phone/shared_line_groups/{sharedLineGroupId}/members
PhoneSharedLineGroupsMembers::deleteMembersOfSlg() Unassign members of a shared line group DELETE /phone/shared_line_groups/{sharedLineGroupId}/members
PhoneSharedLineGroupsMembers::deleteAmemberSlg() Unassign a member from a shared line group DELETE /phone/shared_line_groups/{sharedLineGroupId}/members/{memberId}
PhoneSharedLineGroupsPhoneNumbers::assignPhoneNumbersSlg() Assign phone numbers POST /phone/shared_line_groups/{sharedLineGroupId}/phone_numbers
PhoneSharedLineGroupsPhoneNumbers::deleteAphoneNumberSlg() Unassign a phone number DELETE /phone/shared_line_groups/{sharedLineGroupId}/phone_numbers/{phoneNumberId}
PhoneSipTrunkTrunks::listByocsiptrunk() List BYOC SIP trunks GET /phone/sip_trunk/trunks
PhoneSites::list() List phone sites GET /phone/sites
PhoneSites::create() Create a phone site POST /phone/sites
PhoneSites::getAsite() Get phone site details GET /phone/sites/{siteId}
PhoneSites::delete() Delete a phone site DELETE /phone/sites/{siteId}
PhoneSites::updateSiteDetails() Update phone site details PATCH /phone/sites/{siteId}
PhoneUsers::list() List phone users GET /phone/users
PhoneUsers::phoneUser() Get user’s profile GET /phone/users/{userId}
PhoneUsers::updateUserProfile() Update user’s profile PATCH /phone/users/{userId}
PhoneUsersCallLogs::user() Get user’s call logs GET /phone/users/{userId}/call_logs
PhoneUsersCallLogs::delete() Delete a user’s call log DELETE /phone/users/{userId}/call_logs/{callLogId}
PhoneUsersCallingPlans::assign() Assign calling plan to a user POST /phone/users/{userId}/calling_plans
PhoneUsersCallingPlans::unassign() Unassign user’s calling plan DELETE /phone/users/{userId}/calling_plans/{type}
PhoneUsersPhoneNumbers::assign() Assign phone number to user POST /phone/users/{userId}/phone_numbers
PhoneUsersPhoneNumbers::unassign() Unassign phone number DELETE /phone/users/{userId}/phone_numbers/{phoneNumberId}
PhoneUsersRecordings::user() Get user’s recordings GET /phone/users/{userId}/recordings
PhoneUsersSettings::user() Get user’s settings GET /phone/users/{userId}/settings
PhoneUsersSettings::addUser() Set up shared access POST /phone/users/{userId}/settings/{settingType}
PhoneUsersSettings::deleteUser() Remove shared access DELETE /phone/users/{userId}/settings/{settingType}
PhoneUsersSettings::updateUser() Update shared access PATCH /phone/users/{userId}/settings/{settingType}
PhoneUsersVoiceMails::user() Get user’s voicemails GET /phone/users/{userId}/voice_mails
PhoneVoiceMails::deleteVoicemail() Delete a voicemail DELETE /phone/voice_mails/{voicemailId}
ReportActivities::signInSignOut() Get sign In / sign out activity report GET /report/activities
ReportCloudRecording::reportCloudRecording() Get cloud recording usage report GET /report/cloud_recording
ReportDaily::reportDaily() Get daily usage report GET /report/daily
ReportMeetings::meetingDetails() Get meeting detail reports GET /report/meetings/{meetingId}
ReportMeetingsParticipants::meeting() Get meeting participant reports GET /report/meetings/{meetingId}/participants
ReportMeetingsPolls::meeting() Get meeting poll reports GET /report/meetings/{meetingId}/polls
ReportOperationlogs::operationLogs() Get operation logs report GET /report/operationlogs
ReportTelephone::reportTelephone() Get telephone reports GET /report/telephone
ReportUsers::reportUsers() Get active/inactive host reports GET /report/users
ReportUsersMeetings::reportMeetings() Get meeting reports GET /report/users/{userId}/meetings
ReportWebinars::webinarDetails() Get webinar detail reports GET /report/webinars/{webinarId}
ReportWebinarsParticipants::webinar() Get webinar participant reports GET /report/webinars/{webinarId}/participants
ReportWebinarsPolls::webinar() Get webinar poll reports GET /report/webinars/{webinarId}/polls
ReportWebinarsQa::webinar() Get webinar Q&A report GET /report/webinars/{webinarId}/qa
Roles::roles() List roles GET /roles
Roles::create() Create a role POST /roles
Roles::getRoleInformation() Get role information GET /roles/{roleId}
Roles::delete() Delete a role DELETE /roles/{roleId}
Roles::update() Update role information PATCH /roles/{roleId}
RolesMembers::roleMembers() List members in a role GET /roles/{roleId}/members
RolesMembers::addRole() Assign a role POST /roles/{roleId}/members
RolesMembers::memberDelete() Unassign a role DELETE /roles/{roleId}/members/{memberId}
Rooms::listZoom() List Zoom Rooms GET /rooms
Rooms::addAroom() Add a Zoom Room POST /rooms
Rooms::getZrprofile() Get Zoom Room profile GET /rooms/{roomId}
Rooms::deleteAzoom() Delete a Zoom Room DELETE /rooms/{roomId}
Rooms::updateRoomProfile() Update a Zoom Room profile PATCH /rooms/{roomId}
RoomsAccountProfile::getZraccountProfile() Get Zoom Room account profile GET /rooms/account_profile
RoomsAccountProfile::updateZraccProfile() Update Zoom Room account profile PATCH /rooms/account_profile
RoomsAccountSettings::list() Get Zoom Room account settings GET /rooms/account_settings
RoomsAccountSettings::updateZoomRoomAccSettings() Update Zoom Room account settings PATCH /rooms/account_settings
RoomsDevices::listZrdevices() List Zoom Room devices GET /rooms/{roomId}/devices
RoomsDevicesAppVersion::changeZoomRooms() Change Zoom Rooms’ app version PUT /rooms/{roomId}/devices/{deviceId}/app_version
RoomsDigitalSignage::listDigitalSignageContent() List digital signage contents GET /rooms/digital_signage
RoomsEvents::manageE911signage() Update E911 digital signage PATCH /rooms/events
RoomsEvents::checkIn() Check-in or check-out of a Zoom Room PATCH /rooms/{id}/events
RoomsLocation::changeZrlocation() Change a Zoom Room’s location PUT /rooms/{roomId}/location
RoomsLocations::listZrlocations() List Zoom Room locations GET /rooms/locations
RoomsLocations::addAzrlocation() Add a location POST /rooms/locations
RoomsLocations::getZrlocationProfile() Get Zoom Room location profile GET /rooms/locations/{locationId}
RoomsLocations::updateZrlocationProfile() Update Zoom Room location profile PATCH /rooms/locations/{locationId}
RoomsLocationsLocation::changeParent() Change the assigned parent location PUT /rooms/locations/{locationId}/location
RoomsLocationsSettings::list() Get location settings GET /rooms/locations/{locationId}/settings
RoomsLocationsSettings::updateZrlocation() Update location settings PATCH /rooms/locations/{locationId}/settings
RoomsLocationsStructure::getZrlocation() Get Zoom Room location structure GET /rooms/locations/structure
RoomsLocationsStructure::updateZoomRoomsLocation() Update Zoom Rooms location structure PATCH /rooms/locations/structure
RoomsSettings::list() Get Zoom Room settings GET /rooms/{roomId}/settings
RoomsSettings::updateZrsettings() Update Zoom Room settings PATCH /rooms/{roomId}/settings
SipPhones::list() List SIP phones GET /sip_phones
SipPhones::createSipphone() Enable SIP phone POST /sip_phones
SipPhones::deleteSipphone() Delete SIP phone DELETE /sip_phones/{phoneId}
SipPhones::updateSipphone() Update SIP phone PATCH /sip_phones/{phoneId}
SipTrunkNumbers::list() List SIP trunk numbers GET /sip_trunk/numbers
TrackingFields::trackingfieldList() List tracking fields GET /tracking_fields
TrackingFields::trackingfieldCreate() Create a tracking field POST /tracking_fields
TrackingFields::trackingfieldGet() Get a tracking field GET /tracking_fields/{fieldId}
TrackingFields::trackingfieldDelete() Delete a tracking field DELETE /tracking_fields/{fieldId}
TrackingFields::trackingfieldUpdate() Update a tracking field PATCH /tracking_fields/{fieldId}
Tsp::tsp() Get account’s TSP information GET /tsp
Tsp::update() Update account’s TSP information PATCH /tsp
Users::users() List users GET /users
Users::create() Create users POST /users
Users::user() Get a user GET /users/{userId}
Users::delete() Delete a user DELETE /users/{userId}
Users::update() Update a user PATCH /users/{userId}
UsersAssistants::userAssistants() List user assistants GET /users/{userId}/assistants
UsersAssistants::assistantCreate() Add assistants POST /users/{userId}/assistants
UsersAssistants::assistantsDelete() Delete user assistants DELETE /users/{userId}/assistants
UsersAssistants::assistantDelete() Delete a user assistant DELETE /users/{userId}/assistants/{assistantId}
UsersEmail::userEmail() Check a user email GET /users/email
UsersEmail::emailUpdate() Update a user’s email PUT /users/{userId}/email
UsersMeZak::userZak() Get user’s ZAK GET /users/me/zak
UsersMeetingTemplates::list() List meeting templates GET /users/{userId}/meeting_templates
UsersMeetings::meetings() List meetings GET /users/{userId}/meetings
UsersMeetings::create() Create a meeting POST /users/{userId}/meetings
UsersPac::userPACs() List a user’s PAC accounts GET /users/{userId}/pac
UsersPassword::userPassword() Update a user’s password PUT /users/{userId}/password
UsersPermissions::userPermission() Get user permissions GET /users/{userId}/permissions
UsersPicture::userPicture() Upload a user’s profile picture POST /users/{userId}/picture
UsersPresenceStatus::update() Update a user’s presence status PUT /users/{userId}/presence_status
UsersRecordings::list() List all recordings GET /users/{userId}/recordings
UsersSchedulers::userSchedulers() List user schedulers GET /users/{userId}/schedulers
UsersSchedulers::schedulersDelete() Delete user schedulers DELETE /users/{userId}/schedulers
UsersSchedulers::schedulerDelete() Delete a scheduler DELETE /users/{userId}/schedulers/{schedulerId}
UsersSettings::userSettings() Get user settings GET /users/{userId}/settings
UsersSettings::settingsUpdate() Update user settings PATCH /users/{userId}/settings
UsersSettingsVirtualBackgrounds::uploadVbuser() Upload virtual background files POST /users/{userId}/settings/virtual_backgrounds
UsersSettingsVirtualBackgrounds::delUserVb() Delete virtual background files DELETE /users/{userId}/settings/virtual_backgrounds
UsersStatus::userStatus() Update user status PUT /users/{userId}/status
UsersToken::userToken() Get a user token GET /users/{userId}/token
UsersToken::ssotokenDelete() Revoke a user’s SSO token DELETE /users/{userId}/token
UsersTsp::userTSPs() List user’s TSP accounts GET /users/{userId}/tsp
UsersTsp::tspcreate() Add a user’s TSP account POST /users/{userId}/tsp
UsersTsp::userTSP() Get a user’s TSP account GET /users/{userId}/tsp/{tspId}
UsersTsp::tspdelete() Delete a user’s TSP account DELETE /users/{userId}/tsp/{tspId}
UsersTsp::tspupdate() Update a TSP account PATCH /users/{userId}/tsp/{tspId}
UsersTspSettings::urlUpdate() Set global dial-in URL for a TSP user PATCH /users/{userId}/tsp/settings
UsersVanityName::userVanityName() Check a user’s PM room GET /users/vanity_name
UsersWebinarTemplates::list() List webinar templates GET /users/{userId}/webinar_templates
UsersWebinars::webinars() List webinars GET /users/{userId}/webinars
UsersWebinars::create() Create a webinar POST /users/{userId}/webinars
Webinars::webinar() Get a webinar GET /webinars/{webinarId}
Webinars::delete() Delete a webinar DELETE /webinars/{webinarId}
Webinars::update() Update a webinar PATCH /webinars/{webinarId}
WebinarsBatchRegistrants::addBatchWebinarRegistrants() Perform batch registration POST /webinars/{webinarId}/batch_registrants
WebinarsPanelists::webinarPanelists() List panelists GET /webinars/{webinarId}/panelists
WebinarsPanelists::panelistCreate() Add panelists POST /webinars/{webinarId}/panelists
WebinarsPanelists::panelistsDelete() Remove panelists DELETE /webinars/{webinarId}/panelists
WebinarsPanelists::panelistDelete() Remove a panelist DELETE /webinars/{webinarId}/panelists/{panelistId}
WebinarsPolls::webinarPolls() List a webinar’s polls GET /webinars/{webinarId}/polls
WebinarsPolls::pollCreate() Create a webinar’s poll POST /webinars/{webinarId}/polls
WebinarsPolls::pollGet() Get a webinar poll GET /webinars/{webinarId}/polls/{pollId}
WebinarsPolls::pollUpdate() Update a webinar poll PUT /webinars/{webinarId}/polls/{pollId}
WebinarsPolls::pollDelete() Delete a webinar poll DELETE /webinars/{webinarId}/polls/{pollId}
WebinarsRegistrants::webinarRegistrants() List webinar registrants GET /webinars/{webinarId}/registrants
WebinarsRegistrants::registrantCreate() Add a webinar registrant POST /webinars/{webinarId}/registrants
WebinarsRegistrants::registrantGet() Get a webinar registrant GET /webinars/{webinarId}/registrants/{registrantId}
WebinarsRegistrants::deleteWebinar() Delete a webinar registrant DELETE /webinars/{webinarId}/registrants/{registrantId}
WebinarsRegistrantsQuestions::registrantsQuestionsGet() List registration questions GET /webinars/{webinarId}/registrants/questions
WebinarsRegistrantsQuestions::registrantQuestionUpdate() Update registration questions PATCH /webinars/{webinarId}/registrants/questions
WebinarsRegistrantsStatus::registrant() Update registrant’s status PUT /webinars/{webinarId}/registrants/status
WebinarsStatus::webinarStatus() Update webinar status PUT /webinars/{webinarId}/status
WebinarsTrackingSources::get() Get webinar tracking sources GET /webinars/{webinarId}/tracking_sources

Making a Request

There are two ways to make a request to the nominated API Handler and API Method:

If you built the client to be accessible globally, you can use the relevant API Handler Class directly:

use Tectalic\Zoom\Handlers\Accounts;
 
(new Accounts())->accounts();

Alternatively, you can access all API Handlers from the client class using the Client class:

$client->accounts()->accounts();

Retrieving the Response

Once you have made a request using one of the two methods outlined above, the next step is to access the response.

You can access the response in different ways. Please choose your preferred one.

Model Responses

Model responses are Data Transfer Object (DTO) style PHP classes, with public properties for each API property.

They offer a structured way of retrieving the response from an API request.

All Response Models are an instance of \Spatie\DataTransferObject\DataTransferObject or \Spatie\DataTransferObject\DataTransferObjectCollection.

After performing the request, use the ->toModel() fluent method to the API Method:

use Tectalic\Zoom\Handlers\Accounts;
 
$model = (new Accounts())->accounts()->toModel();

Each API Method’s toModel() call will return the appropriate Model class type for the API Method you have just called.

Associative Array Responses

After performing the request, use the ->toArray() fluent method to the API Method:

use Tectalic\Zoom\Handlers\Accounts;
 
$array = (new Accounts())->accounts()->toArray();

In the resulting associative array, the array keys will match the names of the public properties in the relevant Model class.

PSR 7 Response Objects

If you need to access the raw response or inspect the HTTP headers, use the ->getResponse() fluent method to the API Method. It will return a Psr\Http\Message\ResponseInterface:

use Tectalic\Zoom\Handlers\Accounts;
 
$response = (new Accounts())->accounts()->getResponse();

Errors

When performing requests with Tectalic Zoom REST API Client, specific scenarios will cause a Tectalic\Zoom\Exception\ClientException to be thrown. Please see below for details.

Invalid Usage of the Manager Class

A \LogicException will be thrown if the Manager::build() function is called multiple times, or if Manager::access() is called before calling Manager::build().

Unsuccessful HTTP Response Codes

The Tectalic Zoom REST API Client depends on a PSR-18 compatible HTTP client, and that HTTP client should not throw an exception for unsuccessful HTTP response codes.

An unsuccessful response code is classified as one that is not in the range 200-299 (inclusive). Examples of unsuccessful response codes include:

  • Informational responses (100-199)
  • Redirection responses (300-399)
  • Client error responses (400-499)
  • Server error responses (500-599)

If an unsuccessful response code does occur:

  • your HTTP Client will not throw an Exception.
  • the API Handler’s toModel() method will throw a ClientException.
  • the API Handler’s toArray() method will return the response body and not throw a ClientException.
  • The API Handler’s getResponse() method will return the raw response and not throw a ClientException.

Below is an example of how you may wish to use a try/catch block when performing a request so that you can detect and handle unexpected errors.

use Tectalic\Zoom\Authentication;
use Tectalic\Zoom\Client;
use Tectalic\Zoom\ClientException;
use Tectalic\Zoom\Manager;
 
// Build a Tectalic Zoom REST API Client globally.
$auth = new Authentication('token');
Manager::build($httpClient, $auth);
$handler = new Accounts();
 
// Perform a request
try {
$model = $handler->accounts()->toModel();
// Do something with the response model...
} catch (ClientException $e) {
// Error response received. Retrieve the HTTP response code and response body.
$responseBody = $handler->toArray();
$rawResponse = $handler->getResponse()->getResponse();
$responseCode = $handler->getResponse()->getStatusCode();
// Handle the error...
}

HTTP Client Exceptions

If your HTTP client of choice throws an exception other than ClientException, the Tectalic Zoom REST API Client Client and its API Handler classes will let these exceptions bubble up.

Consult your HTTP client’s documentation for more details on exception handling.

Tests

The Tectalic Zoom REST API Client package includes several types of automated PHPUnit tests to verify the correct operation:

  • Unit Tests
  • Integration Tests

To run these tests, you will need to have installed the Tectalic Zoom REST API Client package with its dev dependencies (i.e. not using the --no-dev flag when running composer).

Unit Tests

These PHPUnit tests are designed to:

  • confirm that each API Method assembles a valid request that matches the Zoom API OpenAPI specification.
  • verify the behaviour of other parts of the package, such as the Client and Manager classes.

The unit tests can be run using the following command, which needs to be run from this package’s root directory.

composer test:unit

Unit tests do not perform any real requests against the Zoom API.

Unit tests are located in the tests/Unit directory.

Integration Tests

Integration tests are located in the tests/Integration directory.

These PHPUnit tests are designed to confirm that each API Method parses a valid response, according to the Zoom API OpenAPI specification. Out of the box the integration tests are designed to work with the Prism Mock Server.

Using Prism as the Target

Make sure Prism is installed. Please see the Prism documentation for details on how to install Prism.

Once Prism is installed, you can run prism and the integration tests side by side in separate terminal windows, or using the following command, which need to be run from this package’s root directory.

echo "> Starting Prism server"
prism mock tests/openapi.json >/dev/null 2>&1 &
PRISM_PID=$!
sleep 2
echo " => Started"
composer test:integration
kill $PRISM_PID

Those commands will start the Prism mock server, then run the integration tests, and then stop the Prism mock server when the tests are completed.

In this case the integration tests do not perform any real requests against the Zoom API.

Using a Different Target

By setting the ZOOM_CLIENT_TEST_BASE_URI environment variable, you can set a different API endpoint target for the integration tests.

For example, instead of using Prism, you can use a different mocking/staging/test server of your choice, or you can use the Zoom API’s live endpoints.

Do not forget to set the appropriate credentials in the ZOOM_CLIENT_TEST_AUTH_TOKEN environment variable.

After your setup is complete simply run the following command.

composer test:integration

We do not recommend running integration tests against the live Zoom API endpoints. This is because the tests will send example data to all endpoints, which can result in new data being created, or existing data being deleted.

Support

If you have any questions or feedback, you can submit a support request to the Tectalic developers by going to https://tectalic.com/support/zoom.

License

This software is copyright (c) Tectalic.

For the full copyright and license information, please view the ‘LICENSE’ file distributed with the source code.

Last updated 27 Oct 2022

Tectalic Zoom PHP API Client