Zoho Meeting Api Error-PHP

Zoho Meeting Api Error-PHP

Hello Zoho, I am developing one php script for creating zoho meetings with zoho meetings api but I am getting 400 Response Code Again and again And I am getting nothing So I know the error please Reach me out for fixing this error.
This is My PHP Code :-
<?php

// Zoho Meeting API endpoint
$api_url = 'https://meeting.zoho.com/api/v2/{zsoid}/sessions.json'; // Replace {zsoid} with your actual Zoho Meeting ID

// Zoho Meeting authentication token
$auth_token = '1000.fb201bb53f08d8c39e1b50b96782362a.0f43d8767ce1d48f6a429d5dd4920bde'; // Replace with your Zoho OAuth token

// Meeting details
$topic = "PHP File";
$agenda = "For Zoho Meetings";
$presenter = 235109000000002005; // Zoho user ID of the presenter
$startTime = "Jun 19, 2024 11:00 PM";
$duration_minutes = 60; // Duration of the meeting in minutes
$timezone = "Asia/Kolkata"; // Timezone of the meeting (Portugal timezone)
$participants = array(
    array(
        "email" => "dishirajput7@email.com"
    )
);

// Prepare data for API request
$data = array(
    "session" => array(
        "topic" => $topic,
        "agenda" => $agenda,
        "presenter" => $presenter,
        "startTime" => $startTime,
        "duration" => $duration_minutes * 60 * 1000, // Convert minutes to milliseconds
        "timezone" => $timezone,
        "participants" => $participants
    )
);

// Convert data to JSON format
$post_data = json_encode($data);

// Prepare cURL request
$ch = curl_init($api_url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json;charset=UTF-8',
    'Authorization: Zoho-oauthtoken ' . $auth_token
));

// Execute the request
$response = curl_exec($ch);

// Check for errors
// Check for errors
if(curl_errno($ch)) {
    echo 'Error: ' . curl_error($ch);
} else {
    // Decode the response
    $result = json_decode($response, true);
   
    // Check if the meeting session was created successfully
    if(isset($result['session']['sessionKey'])) {
        echo 'Meeting session created successfully. Session Key: ' . $result['session']['sessionKey'];
    } elseif(isset($result['error']['message'])) {
        echo 'Failed to create meeting session. Error: ' . $result['error']['message'];
    } else {
        echo 'Failed to create meeting session. Unknown error occurred.';
    }
}


// Close cURL session
curl_close($ch);
?>


      • Sticky Posts

      • A new UI for distraction-free engagement in online meetings and webinars that scale up for 3000 attendees

        Hello all, We're excited to share our new, refined UI for online meetings.  Here's how the new UI will improve your experience during online meetings: We've re-designed Zoho Meeting's online meeting UI to enable users to fully engage in conversations
      • New and Improved UI for Online Meetings in Zoho Meeting

        Hello there, We hope you're enjoying our video conferencing feature for your online meetings. This month, we are glad to present our revamped UI for online meetings. We have made some useful changes to make features contextual and easy to access. In addition to this, we have also added some interesting features and enhancements to make your online meetings smooth and hassle-free. Let's take a look at these changes. Better visibility and access to main features The main menu has been moved to the
      • Improved host controls and other enhancements

        Hello there, We hope you're staying safe and healthy. As we continue building Zoho Meeting into a complete, feature-rich web conferencing solution, we're making big and small feature updates and enhancements every month.    Here are a few of our latest updates:   Common updates for meetings and webinars Invalidating the keys of past meetings and webinars: This is an important security update. We're in the process of invalidating the keys of all of our users' past meetings and webinars. This prevents
      • Latest updates in Zoho Meeting | Create departments, Share PDF files

        Hello all,   You can now create departments to group team members within your organization. This will make it easier for you to organize department-level meetings and invite members. In webinars, use the Share material feature to share PDF files directly
      • Create Instant Polls, Broadcast Messages, and Enable Co-organizers to Launch Webinars

        Hello, Following our previous updates with the iOS webinar app, Raise Hand, Allow to talk, and Give control in Mac OS, we have added some new features and enhancements to Zoho Meeting's webinar module that let you create instant polls, communicate with attendees through messages, and have better control over launching webinars. Let's take a look at what's new. Features Co-organizers can now launch webinars Co-organizers, who are members of your organization, can now start webinars just like the organizer. This