# Help with basic curl use of API - Create a Meeting

**URL:** <https://devforum.zoom.us/t/help-with-basic-curl-use-of-api-create-a-meeting/7384>\
**Category:** API and Webhooks\
**Created:** [January 8, 2020, 12:14am UTC](https://devforum.zoom.us/t/help-with-basic-curl-use-of-api-create-a-meeting/7384 "2020-01-08T00:14:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![roryj](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@roryj](https://devforum.zoom.us/u/roryj)\
**Post date:** [January 8, 2020, 12:14am UTC](https://devforum.zoom.us/t/help-with-basic-curl-use-of-api-create-a-meeting/7384/1 "2020-01-08T00:14:15Z")

</div>

I am trying to create a new meeting using the API. I have created my JWT API and tested with:

> curl --request GET --url ‘[https://api.zoom.us/v2/users?status=active&page\_size=30&page\_number=1](https://api.zoom.us/v2/users?status=active&page_size=30&page_number=1)’ --header ‘authorization: Bearer blahblahblah’ --header ‘content-type: application/json’  
> and I get the appropriate JSON back.

I am trying to create a meeting:

curl -X POST --url [https://api.zoom.us/v2/users/userideawenthere/meetings](https://api.zoom.us/v2/users/userideawenthere/meetings) --header ‘authorization: Bearer blah blah’ -H “accept:application/json” -d ‘{ “topic”: “test”, “type”: 1 }’

but i keep getting back {“code”:300,“message”:“Unsupported Content Type”}

Call Logs show:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/a/a60d3aba28e30bf3eb82bd5fc0fa9518ed50d7cb.png)

I note there is nothing in the request params. I can get things to appear there if i start messing with the data sent and change my curl to -d ‘“topic”=“test5”’ -d ‘“type”=1’  
(which is clearly not JSON and althought it makes it appear in the call log, still error 300.

Is it possible my API is not authorised to create meetings?  
I’ve read through a lot of comments on this issue, and the topic and type seem to be the minimum required to test it…?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [January 8, 2020, 9:51pm UTC](https://devforum.zoom.us/t/help-with-basic-curl-use-of-api-create-a-meeting/7384/2 "2020-01-08T21:51:44Z")

</div>

Hey @roryj, thanks for posting and using Zoom!

You are super close! When you set `-d` it means `application/x-www-form-urlencoded`, but you are trying to send your request body in JSON.

> <https://stackoverflow.com/questions/7172784/how-do-i-post-json-data-with-curl-from-a-terminal-commandline-to-test-spring-res/7173011#7173011>

Use `--data` instead:

```auto
curl -X POST --url https://api.zoom.us/v2/users/userideawenthere/meetings --header 'authorization: Bearer blah blah' -H "accept:application/json" --data '{ "topic": "test", "type": 1 }'

```

Let me know if that works! 🙂

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![roryj](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@roryj](https://devforum.zoom.us/u/roryj)\
**Post date:** [January 8, 2020, 10:09pm UTC](https://devforum.zoom.us/t/help-with-basic-curl-use-of-api-create-a-meeting/7384/3 "2020-01-08T22:09:06Z")

</div>

Hi tommy - just tried it…

`curl -X POST --url https://api.zoom.us/v2/users/jw9j-nrpTs-qz6LRESw4sA/meetings --header 'authorization: Bearer eyblahbahM8' -H "accept:application/json" --data '{ "topic": "test", "type": 1 }'`  
still get…  
`{"code":300,"message":"Unsupported Content Type"}`

Checked the App call logs…  
Nothing in the request\_params…

```
request_params: [
],
http_status: "415"
```

---

<div class="post-metadata">

**Author:** ![roryj](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@roryj](https://devforum.zoom.us/u/roryj)\
**Post date:** [January 8, 2020, 10:14pm UTC](https://devforum.zoom.us/t/help-with-basic-curl-use-of-api-create-a-meeting/7384/4 "2020-01-08T22:14:45Z")

</div>

Could it be my user id IN the url that is wrong? - I’m using the one obtained from the initial response that worked… e.g…

`curl --request GET --url 'https://api.zoom.us/v2/users?status=active&page_size=30&page_number=1' --header 'authorization: Bearer eyJ..etc..etc..n8' --header 'content-type: application/json'`

{“page\_count”:1,“page\_numb…users”:[{“id”: **“jw9j-nrpTs-qz6LRESw4sA”** ,"fir`

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [January 8, 2020, 10:27pm UTC](https://devforum.zoom.us/t/help-with-basic-curl-use-of-api-create-a-meeting/7384/5 "2020-01-08T22:27:36Z")

</div>

Hey @roryj,

> [@roryj](#):
>
> Nothing in the request\_params…

It would not show up there, it would be in the `request_body` which in the photo you shared is “N/A”.

I just tried with a little different curl structure and it worked. Try this:

```auto
curl --header "Content-Type: application/json" --header "Authorization: Bearer TOKEN" --request POST --data '{"topic":"xyz","type":1}' https://api.zoom.us/v2/users/me/meetings

```

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![roryj](https://avatars.discourse-cdn.com/v4/letter/r/96bed5/32.png) [@roryj](https://devforum.zoom.us/u/roryj)\
**Post date:** [January 8, 2020, 10:48pm UTC](https://devforum.zoom.us/t/help-with-basic-curl-use-of-api-create-a-meeting/7384/6 "2020-01-08T22:48:35Z")

</div>

SUCCESS! Thank you!

So looking through this, I had this wrong…  
`--header "accept:application/json" `  
should have been  
`--header "Content-Type: application/json"`

Also - instead of  
[https://api.zoom.us/v2/users/](https://api.zoom.us/v2/users/) **jw9j-nrpTs-qz6LRESw4sA** /meetings  
I could just use  
[https://api.zoom.us/v2/users/me/meetings](https://api.zoom.us/v2/users/me/meetings)  
(both work - but one is obiously a lot less effort!)

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [January 8, 2020, 10:51pm UTC](https://devforum.zoom.us/t/help-with-basic-curl-use-of-api-create-a-meeting/7384/7 "2020-01-08T22:51:08Z")

</div>

Hey @roryj, happy to hear it works! 🙂

Correct! [Using the me keyword means the user who owns the access\_token / JWT Token is used so you don’t have to specify their userID.](https://marketplace.zoom.us/docs/guides/authorization/oauth/oauth-with-zoom#me-context) However in your use case, if you are creating a meeting for another user on your account, you’d need to specify their user id.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![DeveloperBot](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/developerbot/32/12632_2.png) [@DeveloperBot](https://devforum.zoom.us/u/DeveloperBot)\
**Post date:** [August 21, 2020, 7:10pm UTC](https://devforum.zoom.us/t/help-with-basic-curl-use-of-api-create-a-meeting/7384/9 "2020-08-21T19:10:45Z")

</div>

Closed on August 21, 2020, 7:10pm UTC


