PHP code example of espresso-dev / zoom-php

1. Go to this page and download the library: Download espresso-dev/zoom-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

espresso-dev / zoom-php example snippets


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>';

new Zoom([
    'appId' => 'YOUR_APP_ID',
    'appSecret' => 'YOUR_APP_SECRET',
    'redirectUri' => 'YOUR_APP_REDIRECT_URI'
]);

new Zoom('ACCESS_TOKEN');

getLoginUrl(
    'state'
);

$ composer