Thanks Joshua. The code is the php library taken directly from the zoom website with slight modification, making believe it is likely something on my end, but I’m just not sure what it could be. Here’s what I have. The last line I’ve tried parsing/decoding it in different ways:
class ZoomAPI{
/*The API Key, Secret, & URL will be used in every function.*/
private $api_key = ‘xxx’;
private $api_secret = ‘xxx’;
private $api_url = ‘https://api.zoom.us/v1/’;
/*Function to send HTTP POST Requests*/
/*Used by every function below to make HTTP POST call*/
function sendRequest($calledFunction, $data){
/*Creates the endpoint URL*/
$request_url = $this->api_url.$calledFunction;
/*Adds the Key, Secret, & Datatype to the passed array*/
$data[‘api_key’] = $this->api_key;
$data[‘api_secret’] = $this->api_secret;
$data[‘data_type’] = ‘XML’;
$postFields = http_build_query($data);
/*Check to see queried fields*/
/*Used for troubleshooting/debugging*/
/*Preparing Query…*/
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_URL, $request_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
/*Check for any errors*/
$errorMessage = curl_exec($ch);
curl_close($ch);
/*Will print back the response from the call*/
/*Used for troubleshooting/debugging */
//var_dump($data);
echo “<pre>”; var_dump($response); exit();
echo “<hr><hr>”;
if(!$response){
return false;
}
/*Return the data in JSON format*/
return json_encode($response);
}
/*Functions for management of users*/
function createAUser($params){
$createAUserArray = array();
$createAUserArray[‘email’] = $params[‘email’];
$createAUserArray[‘type’] = $params[‘type’];
$createAUserArray[‘first_name’] = $params[‘first_name’];
createAUserArray['last\_name'] = _POST[‘last_name’];
return $this->sendRequest(‘user/create’, $createAUserArray);
}
}
*****
$zoomCreateUser=new ZoomAPI();
$r = $zoomCreateUser->createAUser(
array(
“email”=>“x@domain.com”,
“type”=>“1”,
“first_name”=>“Dan”,
“last_name”=>“Smith”,
)
);
$resp=json_decode(html_entity_decode($r),true);