Right now I’m using this on localhost (my laptop). Not sure if it’s important.
I found a similar problem here: https://devforum.zoom.us/t/help-with-api-create-meeting-with-php/5189/5
I implemented the solution on that page, so now my cURL code looks like this:
$headers = array(
"authorization: Bearer {$params['access_token']}",
"content-type: application/json"
);
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.zoom.us/v2/users",
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode(array(
'action' => 'create',
'user_info' => array(
'email' => 'earthboar@gmail.com',
'type' => '1',
'first_name' => 'Gregory',
'last_name' => 'George'
)
)),
)
);
CURL_SETOPT($curl,CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($curl);
curl_close($curl);
This results in :
stdClass Object
(
[code] => 200
[message] => Invalid api key or secret.
)
Is an “api key or secret” different from the client_id and client_secret? Do I need to include an api_key & api_secret in addition to the access_token?