This is the request body — $startDateTime = $startDate.’ '.$startTime; // Given start date and time
$startTimestamp = strtotime($startDateTime); // Convert start date and time to a Unix timestamp
$convertedDateTime = date('Y-m-d H:i:s', $startTimestamp);
$convertedDateTime = str_replace(' ', 'T', $convertedDateTime);
try {
$response = $this->client->request('POST', '/v2/users/me/meetings', [
'headers' => [
'Authorization' => 'Bearer '.$this->get_access_token(),
],
'json' => [
'topic' => $name,
'type' => 2,
'start_time' => $convertedDateTime,
'duration' => $duration, // in mins
'settings' => [
'approval_type' => 1,
'registrants_email_notification' => true,
'meeting_authentication' => true,
'use_pmi' => false,
'registration_type' => 1,
'auto_recording' => $autoRecord == 1 ? 'cloud' : 'none',
// 'alternative_hosts' => $hostEmail,
// 'alternative_hosts_email_notification' => true,
],
],
ANd how to end a meeting that is going on at the end time?