How to join as host? so anyone from the participants can start the meeting

Here is the code which we are using to create a metting. But when join as participant it shows message that waiting for host to start the meeting but we wanted anyone can start the meeting.

// Define the API endpoint to create a meeting
$apiEndpoint = 'https://api.zoom.us/v2/users/14V4eKRwQ8ubhKkzgfwetA/meetings';

// Define the meeting data
$meetingData = [
    'topic' => 'Sample Meeting',
    'type' => 2, // 2 for a scheduled meeting
    'start_time' => '2023-09-25T14:00:00Z', // Set your desired start time in UTC
    'duration' => 60, // Meeting duration in minutes
    'settings' => array(
        'join_before_host' => true,
        'use_pmi' =>  false,
        'approval_type' => 2,
        'audio' => 'voip',
        'auto_recording' => 'none',
        'enforce_login' => false
    ),
    'timezone' => 'UTC',
];

$tokenData = getAccessToken();

if (isset($tokenData)) {
    // Use the access token to create a meeting
    $meetingHeaders = [
        'Authorization' => 'Bearer ' . $tokenData,
        'Content-Type' => 'application/json',
    ];

    $meetingClient = new Client();
    $meetingResponse = $meetingClient->post($apiEndpoint, [
        'headers' => $meetingHeaders,
        'json' => $meetingData,
    ]);

    $meetingResult = json_decode($meetingResponse->getBody(), true);
     
    echo '<pre>'; print_r($meetingResult); echo '</pre>';

    if (isset($meetingResult['id'])) {
        echo 'Meeting created successfully. Meeting ID: ' . $meetingResult['id'];
    } else {
        echo 'Error creating meeting: ' . json_encode($meetingResult);
    }
} else {
    echo 'Error obtaining access token: ' . json_encode($tokenData);
}

Hi @numeroplaced
thanks for reaching out to us.
You will have to manually enable a setting in the host’s Zoom account
Go to Personal Tab > Settings > Meetings > Schedule Meeting and enable
Allow participants to join the meeting before the hosts arrives