# How to create a meeting In Zoom Apps API?

**URL:** <https://devforum.zoom.us/t/how-to-create-a-meeting-in-zoom-apps-api/80403>\
**Category:** Zoom Apps\
**Tags:** api\
**Created:** [December 16, 2022, 6:01pm UTC](https://devforum.zoom.us/t/how-to-create-a-meeting-in-zoom-apps-api/80403 "2022-12-16T18:01:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anirudh\_007](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anirudh_007/32/43743_2.png) [@Anirudh\_007](https://devforum.zoom.us/u/Anirudh_007)\
**Post date:** [December 16, 2022, 6:01pm UTC](https://devforum.zoom.us/t/how-to-create-a-meeting-in-zoom-apps-api/80403/1 "2022-12-16T18:01:43Z")

</div>

## Error in creating meetings with Zoom Apps,

### API:-

Zoom Apps

### Language:-

Python

### Framework:-

Django , Django Rest Framework

### Code:-

1. Views.py

```auto
request_headers = {
        "Authorization":"Bearer "+access,
        "Content-Type":"application/json"
    }
    target_url = BaseUrl + "/users/me/meetings"
    meetingdetails = {"topic": "SF API TESTING",
                  "type": 2,
                  "start_time": "2022-12-24T10:21:57",
                  "duration": 45,
                  "timezone": "Aisa/Calcutta",
                  "agenda": "test",
                  }
    response = requests.post(url=target_url,data=meetingdetails,headers=request_headers)
    response_data = response
    data = {}
    print(f"Meeting Data: {response_data}")
    data['data'] = response_data
    return render(request,'zoom_user_deatils.html',data)

```

1. Urls.py

```auto
path('zoom-Authorize/',views.oauthToken,name="zoomAuthorize"),

```

1. Variables defined in views.py

```auto
 access ---> The access token
 BaseUrl---> "https://api.zoom.us/v2"

```

### Expected Output:-

`/zoom-Authorize/` is the redirect uri for the OAuth(not specified in above code as it is working fine).  
OAuth part is working absolutely fine.  
(checked by getting the meetings list as a success response)

This code should auto create the meeting after the OAuth and return the meeting details to the user (raw response data for test).

### Error Output:-

\<Response [400]\>

---

<div class="post-metadata">

**Author:** ![Anirudh\_007](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anirudh_007/32/43743_2.png) [@Anirudh\_007](https://devforum.zoom.us/u/Anirudh_007)\
**Post date:** [December 17, 2022, 4:19pm UTC](https://devforum.zoom.us/t/how-to-create-a-meeting-in-zoom-apps-api/80403/2 "2022-12-17T16:19:35Z")

</div>

After changing the `return render(...)` to `HttpResponse(response_data)` I was able to get the status code of 300 which is saying that the body should be a vaild JSON object.

Then I converted meetingdetails to JSON by `json.dumps(meetingdetails)`  
Although it returned a JSON object but,

#### Dont pass this json object as `requests.post(url=...,json=...,headers=...)`

This gave me the same error. When I changed the json to data and sent the same JSON object again then I got the sucess.

#### i.e. `requests.post(url=...,data=...,headers=...)`

I hope this may find helpful for others.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [December 19, 2022, 8:57pm UTC](https://devforum.zoom.us/t/how-to-create-a-meeting-in-zoom-apps-api/80403/3 "2022-12-19T20:57:10Z")

</div>

Thanks for sharing your solution here @Anirudh_007!

---

<div class="post-metadata">

**Author:** ![Anirudh\_007](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/anirudh_007/32/43743_2.png) [@Anirudh\_007](https://devforum.zoom.us/u/Anirudh_007)\
**Post date:** [December 20, 2022, 3:53pm UTC](https://devforum.zoom.us/t/how-to-create-a-meeting-in-zoom-apps-api/80403/4 "2022-12-20T15:53:00Z")

</div>

As it is a Bug and I have also posted the temporary solution, So can I expect any incentives for it ?

If not then can you please tell me the criteria of bug finding and reporting

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [December 20, 2022, 8:12pm UTC](https://devforum.zoom.us/t/how-to-create-a-meeting-in-zoom-apps-api/80403/5 "2022-12-20T20:12:43Z")

</div>

@Anirudh_007 My apologies, my understanding was that you were able to use your `requests.post()` function call to send the data in a different manner.

Are you able to share the exact JSON object format that had an issue and one that worked?
