Zoom Api - 我无法更新会议

Zoom Api - I can't update a meeting

我正在尝试使用 Zoom API but I can't get it to work. I'm trying to do a PATCH request using eleague oauth2 client 更新会议,如下所示:

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 \League\OAuth2\Client\Provider\GenericProvider([
    '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);

我得到一个空的回复,我不确定缺少什么。谁能帮帮我?

问题是 getParsedResponse 方法出于某种原因没有返回任何消息。但脚本正在运行,它正在按照预期的方式更新会议。

如果我使用方法 getResponse 得到响应,我可以看到状态码 204,这意味着一切正常。

基本上 api 给出的响应是空白的,或者只是会议更新,而不是 json 格式。因此,如果您想检查其是否正常工作,请转到缩放会议面板并使用 api 和 运行 打开您正在更新的会议 api 并检查会议是否已在缩放会议中更新面板。