# Get all recordings using JWT Token using AJAX request

**URL:** <https://devforum.zoom.us/t/get-all-recordings-using-jwt-token-using-ajax-request/53651>\
**Category:** API and Webhooks\
**Tags:** ciq, dc, ecq, webinar\
**Created:** [July 6, 2021, 5:52am UTC](https://devforum.zoom.us/t/get-all-recordings-using-jwt-token-using-ajax-request/53651 "2021-07-06T05:52:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev.bizdesire](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dev.bizdesire/32/17896_2.png) [@dev.bizdesire](https://devforum.zoom.us/u/dev.bizdesire)\
**Post date:** [July 6, 2021, 5:52am UTC](https://devforum.zoom.us/t/get-all-recordings-using-jwt-token-using-ajax-request/53651/1 "2021-07-06T05:52:46Z")

</div>

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

**Description**  
I am trying to get all zoom recordings using JWT token . I am using AJAX Request

**Error**  
Currrently i am getting : URL has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
Knowing the endpoint/s can help us to identify your issue faster. Please link the ones you need help/have a question with.

**Which Endpoint/s?**  
[https://api.zoom.us/v2/accounts/me/recordings](https://api.zoom.us/v2/accounts/me/recordings)

**How To Reproduce (If applicable)**  
Steps to reproduce the behavior:  
AJAX Request:

$.ajax({  
type: “GET”,  
url: “[https://api.zoom.us/v2/accounts/me/recordings](https://api.zoom.us/v2/accounts/me/recordings)”,  
headers: {  
“Access-Control-Allow-Origin”: ‘\*’,  
‘Authorization’: 'Bearer ’ + token,  
‘content-type’ : ‘application/json’,  
},  
dataType: ‘json’,  
success: function (result, status, xhr) {  
ShowData(result);  
},  
error: function (xhr, status, error) {  
alert(error);  
}  
});

Am i doing something wrong ?

---

<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:** [July 7, 2021, 4:00pm UTC](https://devforum.zoom.us/t/get-all-recordings-using-jwt-token-using-ajax-request/53651/2 "2021-07-07T16:00:34Z")

</div>

Hi @dev.bizdesire,

Are you calling our API from your frontend? If so, a CORS error will be expected. Our APIs must be called from your backend. You can then pass the response to your frontend as needed.

Let me know if this helps to clarify,  
Will

---

<div class="post-metadata">

**Author:** ![dev.bizdesire](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dev.bizdesire/32/17896_2.png) [@dev.bizdesire](https://devforum.zoom.us/u/dev.bizdesire)\
**Post date:** [July 8, 2021, 10:18am UTC](https://devforum.zoom.us/t/get-all-recordings-using-jwt-token-using-ajax-request/53651/3 "2021-07-08T10:18:44Z")

</div>

How can i do it from backend ? Didn’t get your point.

$.ajax({  
type: “GET”,  
url: “[https://api.zoom.us/v2/accounts/me/recordings](https://api.zoom.us/v2/accounts/me/recordings)”,  
headers: {  
“Access-Control-Allow-Origin”: ‘\*’,  
‘Authorization’: 'Bearer ’ + token,  
‘content-type’ : ‘application/json’,  
},  
dataType: ‘json’,  
success: function (result, status, xhr) {  
ShowData(result);  
},  
error: function (xhr, status, error) {  
alert(error);  
}  
});

---

<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:** [July 9, 2021, 4:27pm UTC](https://devforum.zoom.us/t/get-all-recordings-using-jwt-token-using-ajax-request/53651/4 "2021-07-09T16:27:01Z")

</div>

Hi @dev.bizdesire,

You will need to initiate your API request from a backend resource—you won’t be able to call our APIs directly from your browser or frontend.

Here is an example for calling this endpoint in NodeJS (backend JS), using Axios:

```auto
var axios = require('axios');

var config = {
  method: 'get',
  url: 'https://api.zoom.us/v2/users/{userId}/recordings',
  headers: { 
    'Authorization': 'Bearer {token}'
  }
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```

Let me know if this helps—thanks!  
Will

---

<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:** [August 9, 2021, 2:27am UTC](https://devforum.zoom.us/t/get-all-recordings-using-jwt-token-using-ajax-request/53651/5 "2021-08-09T02:27:56Z")

</div>

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