【发布时间】:2021-04-25 20:36:00
【问题描述】:
我想将 Zoom 与 Codeigniter 连接,但我遇到了问题。
我创建了一个 ZOOM 应用程序(等待 Zoom 批准),我有一个客户端 ID 和 redirect_uri。 我定义了client_id、client_secret和redirect_uri。
$hash = base64_encode($client_id . ':' . $client_secret);
$headers = array(
'Authorization: Basic ' . $hash
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://zoom.us/oauth/authorize?response_type=code&client_id='.$client_id.'&redirect_uri='.$redirect_uri);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
//curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array('data'=>($data))));
$result = curl_exec($ch);
$all=json_decode($result);
print_r($all);
当我执行此代码时,我得到了 stdClass 对象( [status] => [errorCode] => 202 [errorMessage] => 出了点问题。请刷新此页面。[result] =>)。
你能帮帮我吗?谢谢!!
【问题讨论】: