Request Body should be a valid JSON object while creating a webinar

Description
I am trying to create a webinar through API in Json format and i am getting 300 error like Request Body should be a valid JSON object.

Error
Request Body should be a valid JSON object.

Using JWT authenticaion

POST: https://api.zoom.us/v2/users/{myuserid}/webinars

JSON POST data:

[

{

  "topic":"Test Webinar",

  "type":5,

  "start_time":"2020-09-20T06:59:00Z",

  "duration":"60:00",

  "timezone":"America/Los_Angeles",

  "password":"test1234",

  "agenda":"Test Webinar",

  "recurrence":{

     "type":1,

     "repeat_interval":1,

     "end_date_time":"2020-09-20T06:59:00Z"

  },

  "settings":{

     "host_video":"true",

     "panelists_video":"true",

     "practice_session":"true",

     "hd_video":"true",

     "approval_type":0,

     "registration_type":2,

     "audio":"both",

     "auto_recording":"none",

     "enforce_login":"false",

     "close_registration":"true",

     "show_share_button":"true",

     "allow_multiple_devices":"false",

     "email_language":"en-US",

     "panelists_invitation_email_notification":true,

     "registrants_confirmation_email":true,

     "registrants_email_notification":true,

     "attendees_and_panelists_reminder_email_notification":{

        "enable":true,

        "type":1

     },

     "follow_up_attendees_email_notification":{

        "enable":true,

        "type":1

     },

     "follow_up_absentees_email_notification":{

        "enable":true,

        "type":1

     }

  }

}

]

Hey @webinars5,

Thank you for reaching out to the Zoom Developer Forum. It looks like your request body is inside square brackets which would be interpreted as an unnamed array in JSON which is not valid.

Try removing the square brackets from around your request and let me know if that helps.

Thanks,
Max

Hey Max,

Thanks for your reply. I removed the square brackets and tried but still the same issue.
can you please help me to resolve this.

thanks

Hi @webinars5,

Have you tried putting your JSON payload through a validator to ensure you’re not missing anything?:

Thanks,
Will

Hi Will,

yes i have validate using this and showing as Valid json.

Attached screenshot for your reference.

Thanks
Mallesh

Hi @webinars5,

Thank you for confirming. Can you please also confirm that you’re including the Content-Type header with value of application/json along with your request, and that your " are not styled?

Additionally, have you tried sending the request from Postman, cURL, etc., to see if you get different results?

Let me know—thanks!
Will

Hi Will,

Thanks for your reply. I added the Content-Type header with value of application/json and i trying in Postman also but nothing helped me.

Please find the attached screenshots for your reference from postman.

Thanks,
Mallesh

Hi @webinars5,

Can you double check that you’ve selected the following option under Body?
image

Let me know—thanks!
Will

yes Will , Please check with that sample code attached and let me know.

Thanks

I tried everything and did not get any solution.

Any update on this. Please update me what went wrong here.

Hey @webinars5,

I think this is happening because the Create a Webinar API expects the duration field to be an integer but it’s being sent as a string:

image

Please confirm that the data types you’re using match the schema of that API.

Thanks,
Max

Thank you very much Max, It is working now :+1:

Awesome, glad Max could help!

Best,
Will

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.