# CORS preflight error

**URL:** <https://devforum.zoom.us/t/cors-preflight-error/936>\
**Category:** Web\
**Created:** [February 1, 2018, 6:50am UTC](https://devforum.zoom.us/t/cors-preflight-error/936 "2018-02-01T06:50:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhruv\_Chopra](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@Dhruv\_Chopra](https://devforum.zoom.us/u/Dhruv_Chopra)\
**Post date:** [February 1, 2018, 6:50am UTC](https://devforum.zoom.us/t/cors-preflight-error/936/1 "2018-02-01T06:50:04Z")

</div>

Hi,

&nbsp; &nbsp; &nbsp;I am trying to send http get request for getusers method of zoomapi through angular js, I have grabbed bearer token by passing api key and secret key through **jwt .io**. In postman same method working fine…But in my code its throwing cors prefight error.&nbsp; My code of http request in java script(angular js) is

return $http({  
&nbsp; &nbsp; &nbsp; method: ‘get’,  
&nbsp; &nbsp; &nbsp;url: ‘[https://api.zoom.us/v2/users](https://api.zoom.us/v2/users)’,  
&nbsp; &nbsp; &nbsp; params: {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;status: ‘active’,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;page\_size: 30,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;page\_number: 1  
&nbsp; &nbsp; &nbsp; },  
&nbsp; &nbsp; &nbsp;headers: {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;‘content-type’: ‘application/json’,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;‘accept’: ‘application/json, application/xml’,  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ‘Access-Control-Allow-Origin’: '[https://www.zoom.us’,&nbsp;](https://www.zoom.us',%C2%A0)  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;‘Authorization’: 'Bearer ‘+ ’ /\*token which i have got from [jwt.io](http://jwt.io)\*/’  
&nbsp; &nbsp; &nbsp; }  
});

&nbsp;In above code have tried by commenting line of&nbsp;Access-Control-Allow-Origin’ or by passing the ‘\*’ for that

but its not working CORS preflight error is coming.The error is

**OPTIONS [https://api.zoom.us/v2/users?status=active&page\_size=30&page\_number=1&[object%20FormData]](https://api.zoom.us/v2/users?status=active&page_size=30&page_number=1&%5Bobject%20FormData%5D) 403 (Forbidden)**

**Failed to load [https://api.zoom.us/v2/users?status=active&page\_size=30&page\_number=1&[object%20FormData]:](https://api.zoom.us/v2/users?status=active&page_size=30&page_number=1&%5Bobject%20FormData%5D:) Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘null’ is therefore not allowed access. The response had HTTP status code 403.**

So is there any way to solve this error…or i am missing something.Because it is working in postman fine.

One more thing i have got some examples of version 1…but i didn’t get&nbsp;any example&nbsp;of version 2…so from where i can get that?

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; **&nbsp; &nbsp; &nbsp;and**

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; I have seen one example of version 1 from this link [https://support.zoom.us/hc/en-us/articles/204873935-Getting-Started-With-JavaScript-API?mobile\_site=true](https://devforum.zoom.us/hc/en-us/articles/204873935-Getting-Started-With-JavaScript-API?mobile_site=true)…&nbsp; &nbsp;

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;In this example zoom. init and zoom.login methods are used by referring zoomus.js(version1) to do further operations.

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;But we are using the first one approach by creating bearer token through [jwt.io](http://jwt.io). and referring that for further request of zoomapi such as create meeting etc. So which one is correct approach ?

&nbsp;

thanks

&nbsp;

---

<div class="post-metadata">

**Author:** ![Shannon\_Bertucci](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@Shannon\_Bertucci](https://devforum.zoom.us/u/Shannon_Bertucci)\
**Post date:** [February 2, 2018, 6:02am UTC](https://devforum.zoom.us/t/cors-preflight-error/936/2 "2018-02-02T06:02:42Z")

</div>

I am getting a similar error. Can anyone point us in the right direction?

---

<div class="post-metadata">

**Author:** ![Dean\_Si](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dean_si/32/764_2.png) [@Dean\_Si](https://devforum.zoom.us/u/Dean_Si)\
**Post date:** [February 9, 2018, 2:17am UTC](https://devforum.zoom.us/t/cors-preflight-error/936/3 "2018-02-09T02:17:54Z")

</div>

Hi Dhruv & Shannon

It does not support cross-origin resource sharing or access via a client-side web application. Refer to&nbsp;[https://zoom.github.io/api/#introduction](https://zoom.github.io/api/#introduction)&nbsp;

So we suggest that you should call REST API through creating HTTP request in your system backend and then respond data to pages

---

<div class="post-metadata">

**Author:** ![ofd.aws96](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ofd.aws96/32/12902_2.png) [@ofd.aws96](https://devforum.zoom.us/u/ofd.aws96)\
**Post date:** [August 2, 2020, 3:03pm UTC](https://devforum.zoom.us/t/cors-preflight-error/936/4 "2020-08-02T15:03:16Z")

</div>

is there any hack to call zoom api from jquery now ?

---

<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:** [August 4, 2020, 4:16pm UTC](https://devforum.zoom.us/t/cors-preflight-error/936/5 "2020-08-04T16:16:03Z")

</div>

Hey @ofd.aws96,

To call the Zoom API you need to use the server side, not the client side.

Thanks,  
Tommy
