# 400 Bad response when creating meetings in JWT and Python (requests Module)

**URL:** <https://devforum.zoom.us/t/400-bad-response-when-creating-meetings-in-jwt-and-python-requests-module/62096>\
**Category:** API and Webhooks\
**Created:** [January 1, 2022, 11:14am UTC](https://devforum.zoom.us/t/400-bad-response-when-creating-meetings-in-jwt-and-python-requests-module/62096 "2022-01-01T11:14:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zubairthedeveloper](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/zubairthedeveloper/32/33725_2.png) [@zubairthedeveloper](https://devforum.zoom.us/u/zubairthedeveloper)\
**Post date:** [January 1, 2022, 11:14am UTC](https://devforum.zoom.us/t/400-bad-response-when-creating-meetings-in-jwt-and-python-requests-module/62096/1 "2022-01-01T11:14:04Z")

</div>

## Using this template helps us debug your issues more effectively 🙂

**Description**  
I’m trying to create a meeting using zoom api with python requests module. And this is how my codes looks like:  
my\_headers = {“Authorization”: “Bearer MY\_JWT\_TOKEN”}

query = {

“topic”: “Test 01”,

“type”: 2,

“start\_time”: “2022-01-02T01:00:00Z”,

“duration”: 30,

“schedule\_for”: “[myemail@gmail.com](mailto:myemail@gmail.com)”,

“timezone”: “Europe/Berlin”,

“password”: “12345”,

“agenda”: “This is just for test”,

“settings”: {

```
"host_video": False,

"participant_video": False,

"cn_meeting": False,

"in_meeting": False,

"join_before_host": True,

"mute_upon_entry": True,

"watermark": False,

"use_pmi": False,

"approval_type": 2,

"audio": "both",

"auto_recording": "none",

"alternative_hosts": "",

"global_dial_in_countries": [

  ""

],

"registrants_email_notification": True

```

}

}

response = requests.post(“[https://api.zoom.us/v2/users/me/meetings](https://api.zoom.us/v2/users/me/meetings)”, headers=my\_headers, params=query)

print(response)

**Error**  
I get 400 bad request

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
I’m using JWT, the token which zoom uses (it works when I try to get meetings)

---

<div class="post-metadata">

**Author:** ![donte.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/donte.zoom/32/24412_2.png) [@donte.zoom](https://devforum.zoom.us/u/donte.zoom)\
**Post date:** [January 5, 2022, 2:48pm UTC](https://devforum.zoom.us/t/400-bad-response-when-creating-meetings-in-jwt-and-python-requests-module/62096/2 "2022-01-05T14:48:28Z")

</div>

@zubairthedeveloper,

Thank you for posting in the Developer Forum. Have you tried testing the request out in a tool like Postman first? Postman is super helpful for generating the code necessary to initiate the request. For example, here is a Python- request code snippet generated on success create a meeting request in Postman:

```auto
import requests
import json

url = "https://api.zoom.us/v2/users/YourEmailhere.com/meetings"

payload = json.dumps({
  "topic": "test6",
  "type": "2",
  "settings": {
    "close_registration": False,
    "cn_meeting": False,
    "enforce_login": False,
    "waiting_room": False,
    "focus_mode": True,
    "private_meeting": True
  }
})
headers = {
  'Authorization': 'Bearer Your Token Here',
  'Content-Type': 'application/json',
  'Cookie': '_zm_lang=en-US; _zm_mtk_guid=b2fed383f6f345c78ef07479027467b9; cred=FB94A6B7F6570132770EAB4D65F40FBA'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

Postman Screenshot for reference (PII Omitted):

 ![Screen Shot 2022-01-05 at 9.41.23 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/5/f54df9a749eb1fa80b11bee2f0eb6c053791b87d.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [February 5, 2022, 12:48am UTC](https://devforum.zoom.us/t/400-bad-response-when-creating-meetings-in-jwt-and-python-requests-module/62096/3 "2022-02-05T00:48:40Z")

</div>

Closed on February 5, 2022, 12:48am UTC

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