# Trying to create webinar with jwt auth. Keep getting 400 error

**URL:** <https://devforum.zoom.us/t/trying-to-create-webinar-with-jwt-auth-keep-getting-400-error/37736>\
**Category:** API and Webhooks\
**Created:** [December 5, 2020, 3:41pm UTC](https://devforum.zoom.us/t/trying-to-create-webinar-with-jwt-auth-keep-getting-400-error/37736 "2020-12-05T15:41:02Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![4strax](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/4strax/32/22019_2.png) [@4strax](https://devforum.zoom.us/u/4strax)\
**Post date:** [December 5, 2020, 3:41pm UTC](https://devforum.zoom.us/t/trying-to-create-webinar-with-jwt-auth-keep-getting-400-error/37736/1 "2020-12-05T15:41:02Z")

</div>

**Description**  
Keep getting 400 error when calling create webinar api

**Error**

 400 Bad Request 
# 400 Bad Request
 
* * *
zoom 

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
JWT

**Which Endpoint/s?**  
[https://eu01api-www4local.zoom.us/users/me/webinars](https://eu01api-www4local.zoom.us/users/me/webinars)

I get nice 201 when sending body as test request but 400 when sending from my application.

{  
“topic”: “TEST WEBI”,  
“type”: 5,  
“start\_time”: “”,  
“duration”: 30,  
“timezone”: “EUROPE/AMSTERDAM”,  
“password”: “”,  
“agenda”: “TEST\_WEBI”,  
“settings”: {  
“host\_video”: “true”,  
“panelists\_video”: “false”,  
“practice\_session”: “false”,  
“hd\_video”: “false”,  
“approval\_type”: 2,  
“registration\_type”: 1,  
“audio”: “both”,  
“auto\_recording”: “cloud”,  
“enforce\_login”: “false”,  
“close\_registration”: “false”,  
“show\_share\_button”: “false”,  
“allow\_multiple\_devices”: “false”,  
“registrants\_email\_notification”: “false”  
}  
}

---

<div class="post-metadata">

**Author:** ![will.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/will.zoom/32/14417_2.png) [@will.zoom](https://devforum.zoom.us/u/will.zoom)\
**Post date:** [December 7, 2020, 6:50pm UTC](https://devforum.zoom.us/t/trying-to-create-webinar-with-jwt-auth-keep-getting-400-error/37736/2 "2020-12-07T18:50:19Z")

</div>

Hey @4strax,

When I test with this request body, I am able to create a webinar successfully.

Can you double check that your JSON is valid and using standard `"` and not curly `“`?

Let me know if this helps,  
Will

---

<div class="post-metadata">

**Author:** ![4strax](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/4strax/32/22019_2.png) [@4strax](https://devforum.zoom.us/u/4strax)\
**Post date:** [December 7, 2020, 7:39pm UTC](https://devforum.zoom.us/t/trying-to-create-webinar-with-jwt-auth-keep-getting-400-error/37736/3 "2020-12-07T19:39:50Z")

</div>

Hi Will.

I keep getting a 404. Trying something different. When i schedule the webinar in my zoom account, can i put the start webinar url in an iframe of my web application?

Kind regards/Met vriendelijke groet,

Mike Wouters

4strax

---

<div class="post-metadata">

**Author:** ![4strax](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/4strax/32/22019_2.png) [@4strax](https://devforum.zoom.us/u/4strax)\
**Post date:** [December 8, 2020, 3:18pm UTC](https://devforum.zoom.us/t/trying-to-create-webinar-with-jwt-auth-keep-getting-400-error/37736/4 "2020-12-08T15:18:59Z")

</div>

Met vriendelijke groet,

Mike Wouters

4strax

---

<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 9, 2020, 6:30pm UTC](https://devforum.zoom.us/t/trying-to-create-webinar-with-jwt-auth-keep-getting-400-error/37736/5 "2020-12-09T18:30:35Z")

</div>

Hey @4strax,

Thank you for the update. Looking at the endpoint that you’re using, it looks to be custom. Please try using the default API endpoint and let me know if the issue persists.

Endpoint: [https://api.zoom.us/v2/users/me/webinars](https://api.zoom.us/v2/users/me/webinars)

If that doesn’t work for you, does changing `me` to your userID produce different results?

I hope that helps!

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![4strax](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/4strax/32/22019_2.png) [@4strax](https://devforum.zoom.us/u/4strax)\
**Post date:** [December 9, 2020, 8:35pm UTC](https://devforum.zoom.us/t/trying-to-create-webinar-with-jwt-auth-keep-getting-400-error/37736/6 "2020-12-09T20:35:06Z")

</div>

here is my code:

BEGIN

– content

l\_content\_length := nvl(dbms\_lob.getlength(p\_request\_body),0);

– first delete old headers

apex\_web\_service.g\_request\_headers.delete();

apex\_web\_service.g\_request\_headers(1).name := ‘Authorization :’;

apex\_web\_service.g\_request\_headers(1).value := 'Bearer '|| l\_jwt\_token;

apex\_web\_service.g\_request\_headers(2).name := ‘Accept :’;

apex\_web\_service.g\_request\_headers(2).value := ‘application/json’;

apex\_web\_service.g\_request\_headers(3).name := ‘Content-Type :’;

apex\_web\_service.g\_request\_headers(3).value := ‘application/json’;

apex\_web\_service.g\_request\_headers(4).name := ‘Content-Length :’;

apex\_web\_service.g\_request\_headers(4).value := l\_content\_length;

l\_result := apex\_web\_service.make\_rest\_request(

p\_url =\> ‘[https://api.zoom.us/v2/users/t5xPJNKxTfOCm9Z5xhfEJg/webinars](https://api.zoom.us/v2/users/t5xPJNKxTfOCm9Z5xhfEJg/webinars)’,

p\_http\_method =\> ‘POST’,

p\_body =\> to\_clob(’{

“topic”: “TST PK ZOOM”,

“type”: 5,

“start\_time”: “”,

“duration”: 30,

“timezone”: “EUROPE/AMSTERDAM”,

“password”: “”,

“agenda”: “TST PK ZOOM”,

“settings”: {

“host\_video”: “true”,

“panelists\_video”: “false”,

“practice\_session”: “false”,

“hd\_video”: “false”,

“approval\_type”: 2,

“registration\_type”: 1,

“audio”: “both”,

“auto\_recording”: “cloud”,

“enforce\_login”: “false”,

“close\_registration”: “false”,

“show\_share\_button”: “false”,

“allow\_multiple\_devices”: “false”,

“registrants\_email\_notification”: “false”

}

}’),

p\_wallet\_path =\> l\_wallet\_location,

p\_wallet\_pwd =\> l\_wallet\_password

);

l\_status\_code := apex\_web\_service.g\_status\_code;

– return

RETURN l\_result;

EXCEPTION

when others

then

dbms\_output.put\_line(‘Others send request’||sqlerrm||’ ‘||l\_status\_code||’ result '||l\_result);

END;

This is what i get back:

status code 401

result {“code”:124,“message”:“Invalid access token.”}

i’ve tried with a new jwt token, with [https://api.zoom.us/v2/users/me/webinars](https://api.zoom.us/v2/users/me/webinars) and with the european endpoint. Same result.

Kind regards/Met vriendelijke groet,

Mike Wouters

4strax

---

<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 10, 2020, 9:54pm UTC](https://devforum.zoom.us/t/trying-to-create-webinar-with-jwt-auth-keep-getting-400-error/37736/7 "2020-12-10T21:54:40Z")

</div>

Hey @4strax,

Thank you for providing additional information. Given that your test requests work as expected, it seems that the way the application is formatting the request could be contributing to the issue. For example, looking at historical posts in the forum, I was able to find a similar issue where the solution was to ensure that the request body is properly generated.

> [@400 error when trying to create a meeting through /users/me/meetings](https://devforum.zoom.us/t/400-error-when-trying-to-create-a-meeting-through-users-me-meetings/36751):
>
> Description I am trying to create a meeting using OAuth access token through the API. I know I am using the correct access token because I use the same access token in postman before and after to successfully create a meeting. I stripped down the code to just include an empty body, and the same inputs work when I use postman, so I’m not sure what the problem is. client ID: mVkU5LfRqS3xL5ouSO0Kg Error All I get is a 400 error with ‘Bad Request’ Which App Type (OAuth / Chatbot / JWT / Webhoo…

I hope that helps!

Thanks,  
Max

---

<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:** [January 10, 2021, 7:54am UTC](https://devforum.zoom.us/t/trying-to-create-webinar-with-jwt-auth-keep-getting-400-error/37736/8 "2021-01-10T07:54:53Z")

</div>

Closed on January 10, 2021, 7:54am UTC

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