# Create meeting via API returning error 400

**URL:** <https://devforum.zoom.us/t/create-meeting-via-api-returning-error-400/129615>\
**Category:** Meetings\
**Tags:** api\
**Created:** [March 10, 2025, 2:03pm UTC](https://devforum.zoom.us/t/create-meeting-via-api-returning-error-400/129615 "2025-03-10T14:03:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Investudy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/investudy/32/67832_2.png) [@Investudy](https://devforum.zoom.us/u/Investudy)\
**Post date:** [March 10, 2025, 2:03pm UTC](https://devforum.zoom.us/t/create-meeting-via-api-returning-error-400/129615/1 "2025-03-10T14:03:54Z")

</div>

Hello,

I am trying to create a meeting through API. Yesterday the code worked just fine, but today I get error “Request Body should be a valid JSON object.” I have both master and admin scopes, and oauth2 credentials. Here is my code. Can you look into it, please? Tried converting meeting\_data ro JSON, and it still returned an error 400 about an invalid JSON, even though python converted to JSON just fine and printed it out to terminal.

```auto
logger.info("-----Creating meeting-----")
headers = {"Authorization": f"Bearer {account['access_token']}", "Content-Type": "application/json"}
logger.debug(headers)
        
url = f"{ZOOM_API_BASE}/users/{account['email']}/meetings"
logger.debug(url)
        
try:
    response = requests.post(url, json=meeting_data, headers=headers)
    logger.debug(f"Response status code: {response.status_code}")

    if response.status_code == 201:
        logger.debug(response.json())
        return response.json()
    else:
        logger.error(f"Error when creating a meeting: {response.status_code} - {response.text}")
        return None
except requests.exceptions.RequestException as e:
    logger.error(f"Request failed: {e}")
    return None

```

---

<div class="post-metadata">

**Author:** ![desautelsj](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/desautelsj/32/23584_2.png) [@desautelsj](https://devforum.zoom.us/u/desautelsj)\
**Post date:** [March 10, 2025, 2:24pm UTC](https://devforum.zoom.us/t/create-meeting-via-api-returning-error-400/129615/2 "2025-03-10T14:24:17Z")

</div>

> [@Investudy](#):
>
> “Request Body should be a valid JSON object.”

The error message says that the Request Body contains invalid data. My guess is that there’s a missing comma, missing curly bracket, the data is malformed or something along these lines. If you want us to investigate further, you should share the data in this post.

---

<div class="post-metadata">

**Author:** ![Investudy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/investudy/32/67832_2.png) [@Investudy](https://devforum.zoom.us/u/Investudy)\
**Post date:** [March 10, 2025, 4:38pm UTC](https://devforum.zoom.us/t/create-meeting-via-api-returning-error-400/129615/3 "2025-03-10T16:38:27Z")

</div>

Jericho, thank you for pointing that out. Here is a sample JSON from logs:

```auto
{
    "topic": "Test",
    "start_time": "2025-03-11T11:00:00Z",
    "duration": 30,
    "type": 2,
    "settings": {
        "participant_video": true,
        "waiting_room": false,
        "auto_recording": "cloud",
        "meeting_authentication": false,
        "end_meeting_when_no_participant": true,
        "join_before_host": true,
        "mute_upon_entry": true,
        "screen_sharing": true,
        "participant_screen_share": true
    }
}

```

Already checked with JSONPathFinder and json.dumps() - found no errors, maybe you’ll have some ideas. Appreciate any help you can offer.

---

<div class="post-metadata">

**Author:** ![alexm](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/alexm/32/67701_2.png) [@alexm](https://devforum.zoom.us/u/alexm)\
**Post date:** [March 10, 2025, 4:56pm UTC](https://devforum.zoom.us/t/create-meeting-via-api-returning-error-400/129615/4 "2025-03-10T16:56:05Z")

</div>

Hi @Investudy; the parameter `end_meeting_when_no_participant` does not exist, to my knowledge.

---

<div class="post-metadata">

**Author:** ![desautelsj](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/desautelsj/32/23584_2.png) [@desautelsj](https://devforum.zoom.us/u/desautelsj)\
**Post date:** [March 10, 2025, 5:18pm UTC](https://devforum.zoom.us/t/create-meeting-via-api-returning-error-400/129615/5 "2025-03-10T17:18:24Z")

</div>

I am able to reproduce the error when I use the data you just shared and I confirm that it’s well-formed, no missing commas, brackets, etc. This leads me to think that the problem is not with the format of your JSON but rather with the actual content.

I started removing the settings nodes one by one: I removed `participant_video` same result, I removed `waiting_room` same result, and so on until I removed `screen_sharing` and my call was successful.

I double checked the documentation for creating a new meeting ([here](https://developers.zoom.us/docs/api/meetings/#tag/meetings/POST/users/%7BuserId%7D/meetings)), more specifically the “meeting settings” and I don’t see an entry for `screen_sharing`. This leads me to conclude that the Zoom API is rejecting your JSON because it contains an unknown node. I must admit that it would have been helpful if the error message was more to the point.

---

<div class="post-metadata">

**Author:** ![Investudy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/investudy/32/67832_2.png) [@Investudy](https://devforum.zoom.us/u/Investudy)\
**Post date:** [March 10, 2025, 5:35pm UTC](https://devforum.zoom.us/t/create-meeting-via-api-returning-error-400/129615/6 "2025-03-10T17:35:06Z")

</div>

Thank you for your time. I did as you told. Removed all extra data and added “host\_video”. My JSON now is as follows:

```auto
{
    "topic": "Test",
    "start_time": "2025-03-11T11:00:00Z",
    "duration": 30,
    "type": 2,
    "settings": {
        "host_video": false,
        "participant_video": true,
        "waiting_room": false,
        "auto_recording": "cloud",
        "meeting_authentication": false,
        "join_before_host": true,
        "mute_upon_entry": true
    }
}

```

Double checked all parameters with the documentation, everything should be valid, but I still get error:

> Error when creating a meeting: 400 - \<?xml version="1.0" encoding="UTF-8" standalone="yes"?\>`300`Request Body should be a valid JSON object.

Yes, a more specific error message would be helpful. If developers at Zoom could add it in the future releases, I’m sure I wouldn’t be the only one thankful ☺

---

<div class="post-metadata">

**Author:** ![desautelsj](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/desautelsj/32/23584_2.png) [@desautelsj](https://devforum.zoom.us/u/desautelsj)\
**Post date:** [March 10, 2025, 6:47pm UTC](https://devforum.zoom.us/t/create-meeting-via-api-returning-error-400/129615/7 "2025-03-10T18:47:34Z")

</div>

> [@Investudy](#):
>
> Double checked all parameters with the documentation, everything should be valid, but I still get error:

I am able to create a meeting with the JSON data you just shared. As you can see below the HTTP POST with your JSON results in a HTTP 201 response.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/2/4/24dbca31dc0e840b67872ba58c14d4d162f298fd.png)

If you continue to get an error, there must be something else in your code.
