A simple PHP wrapper for the Zoom API
Composer package available.
- PHP 7 or higher
- cURL
- Zoom Developer Account
- Zoom App
To use the Zoom API, you will need to register a Zoom app. Follow the Create an OAuth App guide.
I strongly advice using Composer to keep updates as smooth as possible.
$ composer require espresso-dev/zoom-php
use EspressoDev\Zoom\Zoom;
$zoom = new Zoom([
'appId' => 'YOUR_APP_ID',
'appSecret' => 'YOUR_APP_SECRET',
'redirectUri' => 'YOUR_APP_REDIRECT_URI'
]);
echo "<a href='{$zoom->getLoginUrl()}'>Login with Zoom</a>";
// Get the OAuth callback code
$code = $_GET['code'];
// Get the access token (valid for 1 hour) and refresh token
$token = $zoom->getOAuthToken($code);
echo 'Your token is: ' . $token->access_token;
echo 'Your refresh token is: ' . $token->refresh_token;
// Set user access token
$zoom->setAccessToken($token);
// Get the users scheduled meetins
$meetings = $zoom->getUserMeetings('me', 'scheduled');
echo '<pre>';
print_r($meetings);
echo '<pre>';
All methods return the API data as json_decode()
- so you can directly access the data.
new Zoom(<array>/<string>);
array
if you want to perform oAuth:
new Zoom([
'appId' => 'YOUR_APP_ID',
'appSecret' => 'YOUR_APP_SECRET',
'redirectUri' => 'YOUR_APP_REDIRECT_URI'
]);
string
once you have a token and just want to return read-only data:
new Zoom('ACCESS_TOKEN');
getLoginUrl(<string>)
getLoginUrl(
'state'
);
getOAuthToken($code)
refreshToken($refreshToken)
- Set the access token, for further method calls:
setAccessToken($token)
- Get the access token, if you want to store it for later usage:
getAccessToken()
See Zoom API Documentation for more information about each method.
Authenticated methods
getUserMeetings(<$id>, <$type>, <$page_size>, <$page_number>)
getUserMeetings(<$id>, <$page_size>, <$page_number>)