缩放API请求以创建会议



Im向ZOOM的EU api发送cURL请求以创建会议。我的请求根本没有得到API的任何响应,甚至是错误或拒绝。我错过了什么?

我在Zoom的市场上创建了一个JWT应用程序,从中我获得了一个API密钥和一个API秘密。我正在使用ZoomAPIWrapper中的一个函数来生成身份验证令牌:

private function generate_JWT()
{
$token = [
'iss' => $this->api_key,
'exp' => time() + 60,
];
$header = [
'typ' => 'JWT',
'alg' => 'HS256',
];
$to_sign = self::url_safe_B64_encode(json_encode($header)) . '.' . self::url_safe_B64_encode(json_encode($token));
$signature = hash_hmac('SHA256', $to_sign, $this->api_secret, true);
return $to_sign . '.' . self::url_safe_B64_encode($signature);
}

URL是https://eu01api-www4local.zoom.us/users/me/meetings

标题为:

Array
(
[0] => Authorization: Bearer XXXXXAUTH_KEY_HEREXXXXX
[1] => Content-Type: application/json
[2] => Accept: application/json
)

我的请求主体是JSON:

{
"topic": "My workshop",
"type": 2,
"start_time": "2021-01-06T09:15:00Z",
"duration": 375,
"schedule for": "person@example.com",
"timezone": "GMT",
"agenda": "My workshop agenda",
"settings": {
"host_video": false,
"participant_video": false,
"mute_upon_entry": true,
"approval_type": 0,
"alternative_hosts": "",
"close_registration": true,
"waiting_room": true,
"registrants_email_notification": true,
"contact_name": "Official name",
"contact_email": "official.email@example.com",
"show_share_button": false,
"allow_multiple_devices": true,
"encryption_type": "enhanced_encryption"
}
}

我提交了以上所有内容:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
$result = curl_exec($ch);

Zoom文档声明:

To support GDPR requirements of EU customers, you may use 
https://eu01api-www4local.zoom.us 
as the base URL for all API requests associated with EU accounts.

除了您还必须将/v2/添加到该url的末尾才能使其工作之外。

我觉得没有早点收到它很傻,但我也觉得如果你发布了一个特定的URL供特定用户使用,你应该发布整个内容。。。

最新更新