Code 300: Request Body should be a valid JSON object while creating meeting link

Format Your New Topic as Follows:

API Endpoint(s) and/or Zoom API Event(s)

Description
I am using OAuth type app and we would like our end users (recruiters) to create zoom meeting link from our website and share it with candidate to schedule an interview.

To do so, I am following below article:

I am stuck while calling below API:

Error?
When I pass token and meeting request details, I am getting error message in post man:
400 Bad Request.
Code: 300
Message: Request Body should be a valid JSON object.

I verified that json is in valid format and below is cURL for reference.

cURL:
curl --location --request POST ‘https://api.zoom.us/v2/users/me/meetings’
–header ‘Authorization: Bearer [REDACTED]’
–header ‘Content-Type: application/json’
–header ‘Cookie: TS018dd1ba=01ade282b0400749d5cd032c22f3659903441491e779049d4d23bd9884a9087dcd4bacdf31e09d3d6287f1cdc3afb1320c463c3e15; __cf_bm=hYSAaaXo0rhbmDyRXOVdNcAbR6wYfoIcF9P7tnhy5Sw-1665276171-0-ASmtPzQm7XC1+PBhAH1DHw3kKdrIfkHMv5RYdNSmU+x/PXMhUmN0SHi4SwB3bAoVC2SS7kcsM67wlQ998qxyxrI=; _zm_mtk_guid=39c5f417ca1a408c87f463d69ddfbd0c; _zm_page_auth=us05_c_5B8fYgDPQmO9SZ6NI55YRw; _zm_ssid=us05_c_dvYkhEV6TkCeWTqyuoJc7A; _zm_visitor_guid=39c5f417ca1a408c87f463d69ddfbd0c; TS01f92dc5=01ade282b0400749d5cd032c22f3659903441491e779049d4d23bd9884a9087dcd4bacdf31e09d3d6287f1cdc3afb1320c463c3e15; cred=EE482C2437DAAB4DB569BA5440CCD06B’
–data-raw ‘{
“agenda”: “Interview scheduled with Candidate”,
“default_password”: false,
“duration”: 30,
“password”: “ddj4S49efe”,
“pre_schedule”: false,
“schedule_for”: “[REDACTED]”,
“settings”: {
“allow_multiple_devices”: false,
“alternative_hosts”: null,
“alternative_hosts_email_notification”: null,
“approval_type”: 0,
“audio”: 0,
“authentication_domains”: null,
“authentication_option”: null,
“auto_recording”: 0,
“calendar_type”: 1,
“close_registration”: false,
“contact_email”: null,
“contact_name”: null,
“email_notification”: false,
“encryption_type”: 0,
“focus_mode”: false,
“global_dial_in_countries”: null,
“host_video”: false,
“in_meeting”: false,
“jbh_time”: 0,
“join_before_host”: true,
“meeting_authentication”: false,
“meeting_invitees”: {
“email”: “[REDACTED]”
},
“mute_upon_entry”: false,
“participant_video”: false,
“private_meeting”: false,
“registrants_confirmation_email”: false,
“registrants_email_notification”: false,
“registration_type”: 0,
“show_share_button”: false,
“use_pmi”: false,
“waiting_room”: false,
“watermark”: false,
“host_save_video_order”: false,
“alternative_host_update_polls”: false
},
“start_time”: “2022-10-09T00:30:25.044Z”,
“template_id”: null,
“timezone”: null,
“topic”: “Interview scheduled”,
“type”: 2
}’

Hi Support team,

Can you please review my post and help me remove roadblock?

Basically, I am getting Request Body should be a valid JSON object error while calling creating meeting link zoom API. I have put details of my request in earlier post.

Please help to resolve this matter ASAP.

Thanks,
Hardik

Hi @hmshah.1984
Thanks for reaching out to the Zoom Developer Forum, I am happy to help here!
I took a look into the request body you are sending, and it looks like you are passing the wrong
ecryption_type, if you look into our Docs, it has to be a string and you are passing an integer.

Also for the meeting_invitees, you should be sending an array of objects, like so:

"meeting_invitees": [
  {
    "email": "jchill@example.com"
  }
],

could you please try making these changes and try again.
Best,
elisa

Thanks!
It got resolved by using example json provided in your documentation.

1 Like

Happy to hear that worked! @hmshah.1984