Hi @elisa.zoom ,
I am using Zoom API. Below is my code:
$body = [
// Webinar topic.
"topic" => $fields['topic'],
// Webinar description.
"agenda" => $fields['description'],
// 5 = Webinar; 6 = Recurring webinar with no fixed time;
// 9 = Recurring webinar with a fixed time.
"type" => 5,
// Webinar start time.
"start_time" => $fields['start_time'],
// Webinar duration (minutes). Used for scheduled webinars only.
"duration" => $fields['duration'],
// Webinar passcode.
"password" => rand(111111, 999999),
// Time zone to format start_time.
// For example, "America/Los_Angeles".
"timezone" => $fields['timezone'],
"settings" => [
"host_video" => TRUE,
"panelists_video" => TRUE,
// Registration required + automatically approve.
"approval_type" => 0,
"attendees_and_panelists_reminder_email_notification" => [
"enable" => TRUE,
// Send email reminder 1 hour before webinar.
"type" => 1,
],
"follow_up_absentees_email_notification" => [
"enable" => TRUE,
// Send email 1 day after scheduled end date.
"type" => 1,
],
"follow_up_attendees_email_notification" => [
"enable" => TRUE,
// Send email 1 day after scheduled end date.
"type" => 1,
],
"audio" => "both",
"meeting_authentication" => TRUE,
"allow_multiple_devices" => TRUE,
"panelists_invitation_email_notification" => TRUE,
"question_and_answer" => [
"enable" => TRUE,
"allow_anonymous_questions" => TRUE,
"answer_questions" => "all",
],
// Send email notifications to registrants about approval,
// cancellation, denial of the registration.
"registrants_email_notification" => TRUE,
// Attendees need to register for each session in order to attend.
"registration_type" => 2,
"enable_session_branding" => TRUE,
"practice_session" => TRUE,
"alternative_host_update_polls" => TRUE,
"notify_registrants" => TRUE,
],
// An array of key => value.
"tracking_fields" => $fields['tracking_fields'],
];
try {
$response = $this->apiClient->request('post', 'users/me/webinars', [], $body);
return !is_null($response) ? Json::decode($response->getBody()->getContents()) : NULL;
} catch (\Exception $e) {
$this->logger->error('Error while creating the webinar "%error"', ['%error' => $e->getMessage()]);
return NULL;
}