“authAccountBridge” => array(
“partnerID” => $partnerID,
“accountID” => $accountID,
“email” => $email,
“password” => $password,
“conferenceID” => $conferenceID,
“pin” => $pin
)
)
);
$error = null;
$requestBody = json_encode($request);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL , $apiURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER , true);
curl_setopt($ch, CURLOPT_HEADER , false);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST , ‘POST’);
curl_setopt($ch, CURLOPT_TIMEOUT , $timeout);
curl_setopt($ch, CURLOPT_POSTFIELDS , $requestBody);
curl_setopt($ch, CURLOPT_HTTPHEADER , array(‘Content-Type: application/json’));
$json = curl_exec($ch);
if ($json === false) {
$error = “cURL error: ” . curl_error($ch);
}
curl_close($ch);
if (is_null($error)) {
$response = json_decode($json);
if (is_null($response)) {
$error = “JSON Error”;
} else if (property_exists($response, “authToken”)) {
$authToken = $response->authToken;
} else {
$error = “Authentication Error.”;
}
}
?>
array(
"authAccountBridge" => array(
"partnerID" => $partnerID,
"accountID" => $accountID,
"email" => $email,
"password" => $password,
"conferenceID" => $conferenceID,
"pin" => $pin
)
)
);
$error = null;
$requestBody = json_encode($request);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL , $apiURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER , true);
curl_setopt($ch, CURLOPT_HEADER , false);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST , 'POST');
curl_setopt($ch, CURLOPT_TIMEOUT , $timeout);
curl_setopt($ch, CURLOPT_POSTFIELDS , $requestBody);
curl_setopt($ch, CURLOPT_HTTPHEADER , array('Content-Type: application/json'));
$json = curl_exec($ch);
if ($json === false) {
$error = "cURL error: " . curl_error($ch);
}
curl_close($ch);
if (is_null($error)) {
$response = json_decode($json);
if (is_null($response)) {
$error = "JSON Error";
} else if (property_exists($response, "authToken")) {
$authToken = $response->authToken;
} else {
$error = "Authentication Error.";
}
}
?>
Test Embedded LCM