Skip to content
Advertisement

Zoom Api – I can’t update a meeting

I am trying to update a meeting using Zoom API but I can’t get it to work. I’m trying to do a PATCH request using eleague oauth2 client like this:

require '../vendor/autoload.php';
require_once '../config.php';

$id = $_POST['id'];
$topic = $_POST['topic'];
$type = $_POST['type'];
$start_time = $_POST['start_time'];
$duration = $_POST['duration'];
$agenda = $_POST['agenda'];

$params = array(
        'topic' => $topic,
        'type' => $type,
        'start_time' => $start_time,
        'duration' => $duration,
        'agenda' => $agenda,
        'password' => '123456'
);

$provider = new LeagueOAuth2ClientProviderGenericProvider([
    'clientId'                => CONEXAO_API['clientId'],    
    'clientSecret'            => CONEXAO_API['clientSecret'],   
    'redirectUri'             => CONEXAO_API['redirect_url'],
    'urlAuthorize'            => 'https://zoom.us/oauth/authorize',
    'urlAccessToken'          => 'https://zoom.us/oauth/token',
    'urlResourceOwnerDetails' => 'https://api.zoom.us/v2/users/me'
]);

$options['body'] = json_encode( $params );
$options['headers']['Content-Type'] = 'application/json';
$options['headers']['Accept'] = 'application/json';


$request = $provider->getAuthenticatedRequest( 'PATCH', 
        'https://api.zoom.us/v2/meetings/'.$id,
        unserialize($_SESSION['token']), 
        $options
);

$retorno =  $provider->getParsedResponse($request);

var_dump($retorno);

I’m getting an empty response, and I’m not sure what is missing. Can anyone help me?

Advertisement

Answer

basically the response given by the api is blank or just meeting updated which isn’t in json format. So in case you want to check whether its working go to zoom meeting panel and open the meeting which you are updating using api and run the api and check the meeting is updated in zoom meeting panel.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement