Open AronNovak opened 2 years ago
@Skullbock Ready for review.
<?php
require 'vendor/autoload.php';
// @see https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app/
$account_id = '...';
$apiKey = "...";
$apiSecret = "...";
// Valid for 1 hour.
$oauth_token = \Weble\Zoom\OAuth::generateToken($apiKey, $apiSecret, $account_id);
$config = \Weble\Zoom\Configuration::getDefaultConfiguration()->setAccessToken($oauth_token);
$apiInstance = new \Weble\Zoom\Api\UsersApi(
new \GuzzleHttp\Client(),
$config
);
$users = $apiInstance->users();
print_r($users);
I tested with this and it worked like a charm.
Also as we use it for almost one year in production, we might remove this scary warning that basically makes sure others won't contribute to it :)
Hi Aron, great job! i would love to do a couple of more things (if you can help, glad to have your help!): [ ] Upgrade to min php 7.4 and support 8.0+ [ ] Drop Guzzle dependency, and move to the generic http://httplug.io/ implemenation (which guzzle implements) to allow for different http clients [ ] Use said client to generate the access token instead of raw http
Upgrade to min php 7.4 and support 8.0+
I'd say here it's out of scope, but for sure it's a logical move.
@AronNovak if you can, check #4 with the new requirements and some other stuff :)
2