Skip to content

snehal0904/zoom-php-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zoom-php-client

PHP client to interact with the Zoom API.

We're slowly building out this client as we need the functionality.

This client is built on top of Guzzle, the PHP HTTP Client. Guzzle has a simple way to create API clients by describing the API in a Swagger-like format without the need to implement every method yourself. So adding support for more Zoom APIs is relatively simple. If you want to submit a pull request to add another feature, please do. If you don't know how to do that, ask us and we might be able to add it in for you.

Zoom API Docs

https://support.zoom.us/hc/en-us/sections/200305463-API

Zoom API Authentication

Zoom uses an API key and secret. See Getting Started with REST API - Zoom Support Center for details.

Install

Installation is simple with Composer:

$ composer require silinternational/zoom-php-client

Usage

Example:

<?php

use Zoom\UserClient;

$userClient = new UserClient([
    'api_key' => 'abc',
    'api_secret' => '123',
]);

$user = $userClient->getByEmail([
    'email' => '[email protected]',
    'login_type' => 100,
]);

Side Note: For the list of possible login_type values, see Zoom's API documentation (at the link above).

WARNING: Zoom API SSL Issues

When testing this on my Windows 7 PC using a Git Bash console (from Git 2.5), the following error is returned:

GuzzleHttp\Command\Exception\CommandException: Error executing command: cURL error 60: See http://curl.haxx.se/libcurl/c/libcurl-errors.html

This appears to mean that whatever SSL CA bundle cURL is using on my computer, it does not contain the root CA that Zoom's API uses. To pass parameters to Guzzle related to this, you can do something like the following:

$userClient = $this->getUserClient([
    // ...
    'http_client_options' => [
        'defaults' => [
            'verify' => __DIR__ . '/../../ca-bundle.crt',
        ],
    ],
]);

In this example, I pointed verify at a downloaded copy of the CA bundle that Mozilla provides, as mentioned in the Guzzle documentation about the verify option.

Tests

To run the unit tests for this, copy the /tests/real-test-data.local.php.dist file to /tests/real-test-data.local.php and enter real data to test with.

Guzzle Service Client Notes

About

PHP client library for interacting with the Zoom API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%