PHP code example of abdulbaset / zoom-integration

1. Go to this page and download the library: Download abdulbaset/zoom-integration 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/ */

    

abdulbaset / zoom-integration example snippets


use Abdulbaset\ZoomIntegration\ZoomIntegrationService;

// Initialize the ZoomIntegrationService
$zoomService = new ZoomIntegrationService($accountId, $clientId, $clientSecret);

// Get User Information
$user = $zoomService->getUser();

// Update User
$updateData = [
    'first_name' => 'John',
    'last_name' => 'Doe',
    'email' => '[email protected]',
];
$updatedUser = $zoomService->updateUser($userId, $updateData);

// Create User
$userData = [
    'first_name' => 'Jane',
    'last_name' => 'Doe',
    'email' => '[email protected]',
    'type' => 1, // Pro user
];
$createdUser = $zoomService->createUser($userData);

// List Users
$listUsers = $zoomService->listUsers();

// Delete User
$deletedUser = $zoomService->deleteUser($userId);

// Create a Meeting
$meetingData = [
    'topic' => 'Test Meeting',
    'type' => 2,
    'start_time' => '2024-11-03T10:00:00Z',
    'duration' => 30,
    'timezone' => 'UTC',
    'agenda' => 'Discuss project updates',
];
$createdMeeting = $zoomService->createMeeting($meetingData);

// Get Meeting Details
$meetingId = $createdMeeting['response']['id'] ?? null;
if ($meetingId) {
    $meetingDetails = $zoomService->getMeeting($meetingId);

    // Update Meeting
    $updateData = [
        'topic' => 'Updated Meeting Topic',
        'agenda' => 'Updated agenda for the meeting',
    ];
    $updatedMeeting = $zoomService->updateMeeting($meetingId, $updateData);

    // Delete Meeting
    $deletedMeeting = $zoomService->deleteMeeting($meetingId);
}

// List all Meetings
$listMeetings = $zoomService->listMeetings();

// Get Scopes
$scopes = $zoomService->getScopes();