# Defining from with requests to API using JWT not behaving as expected

**URL:** <https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770>\
**Category:** API and Webhooks\
**Created:** [March 16, 2020, 9:47pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770 "2020-03-16T21:47:23Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![lane](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/lane/32/30641_2.png) [@lane](https://devforum.zoom.us/u/lane)\
**Post date:** [March 16, 2020, 9:47pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/1 "2020-03-16T21:47:23Z")

</div>

**Description**  
When I send a request to the API to list all cloud recordings going back six months I only return the last 30 days.

**Error**  
There is no error message. I have chosen dates at arbitrary points between six months ago and today. I always return 30 days ago.

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

**Which Endpoint/s?**  
[https://api.zoom.us/v2/users/{userId}/recordings](https://api.zoom.us/v2/users/%7BuserId%7D/recordings)

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

1. Request URL / Headers (with credentials) / ?from=2020-01-01
2. See results do not align with expressed timeline requested  
 ![Screen Shot 2020-03-16 at 5.46.54 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/0/0a3a8b0aaef4a16e52868b7e2f9775730631ebe4.png)

---

<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:** [March 16, 2020, 10:19pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/2 "2020-03-16T22:19:47Z")

</div>

Hey @lane, thanks for posting and using Zoom!

Please set a `to` value and see if that fixes it.

from: 2020-01-01  
to: 2020-03-16

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![lane](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/lane/32/30641_2.png) [@lane](https://devforum.zoom.us/u/lane)\
**Post date:** [March 17, 2020, 12:16am UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/3 "2020-03-17T00:16:52Z")

</div>

Tried that. Same issue.

---

<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:** [March 17, 2020, 4:33pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/4 "2020-03-17T16:33:24Z")

</div>

Hey @lane,

Are you using the next page token to query for the next page of results?

If you have more than 30 recordings, you will need to use pagination.

Or you could try increasing the page\_size value.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![lane](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/lane/32/30641_2.png) [@lane](https://devforum.zoom.us/u/lane)\
**Post date:** [March 18, 2020, 3:20pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/5 "2020-03-18T15:20:57Z")

</div>

I set page size to 300 and returned no more than 30 per page.

---

<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:** [March 18, 2020, 11:57pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/6 "2020-03-18T23:57:38Z")

</div>

Hey @lane,

Can you schedule a Zoom meeting with me so I can further assist.

Thanks,  
Tommy

---

<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:** [March 19, 2020, 4:35pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/9 "2020-03-19T16:35:10Z")

</div>

Hey @lane,

It appears that endpoint only returns data in one month increments.

In order to return all the data from the past 6 months you will need to make the requests in the following ways:

[https://api.zoom.us/v2/users/{userId}/recordings?to=2020-03-19&from=2020-02-19](https://api.zoom.us/v2/users/%7BuserId%7D/recordings?to=2020-03-19&from=2020-02-19)

[https://api.zoom.us/v2/users/{userId}/recordings?to=2020-02-19&from=2020-01-19](https://api.zoom.us/v2/users/%7BuserId%7D/recordings?to=2020-02-19&from=2020-01-19)

[https://api.zoom.us/v2/users/{userId}/recordings?to=2020-01-19&from=2019-12-19](https://api.zoom.us/v2/users/%7BuserId%7D/recordings?to=2020-01-19&from=2019-12-19)

And so on…

Let me know if that works!

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![lane](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/lane/32/30641_2.png) [@lane](https://devforum.zoom.us/u/lane)\
**Post date:** [March 19, 2020, 8:45pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/10 "2020-03-19T20:45:50Z")

</div>

Tommy,

I was able to make that convention work for me. The new issue is that the download links don’t work from the command line with/without the JWT being passed, or a browser I am not logged into. They do work when pasted into a browser that I am logged into.

I get a Download has been disabled by the administrator (200) error.

Looking to iterate through all my previous recordings and make a backup. Don’t have that functionality in the web interface nor third party apps that I could find.

Any way to disable this security function on my recordings so I can download the videos without troubleshooting the JWT authentication further?

---

<div class="post-metadata">

**Author:** ![lane](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/lane/32/30641_2.png) [@lane](https://devforum.zoom.us/u/lane)\
**Post date:** [March 19, 2020, 8:49pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/11 "2020-03-19T20:49:46Z")

</div>

If I send headers to authenticate as follows:  
headers = {  
‘Authorization’:  
‘Bearer My\_JWT\_token’,  
‘content-type’:  
‘application/json’,  
‘User-Agent’:  
‘Mozilla/5.0 (Macintosh; Intel Mac OS X 10\_14\_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36’  
}

Then I get the following error:  
{“status”:false,“errorCode”:401,“errorMessage”:“java.lang.NullPointerException”,“result”:null}

---

<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:** [March 19, 2020, 8:59pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/12 "2020-03-19T20:59:00Z")

</div>

Hey @lane,

Please make sure this setting is turned on in your [Zoom Admin Settings](https://zoom.us/account/setting?tab=recording):

 ![Screen Shot 2020-03-19 at 2.58.43 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/2X/8/8e72f74b20c06c9570f6a6422a7b599458b49115.png)

Can you also try not using a header, and add the following query param to the download\_url:

`?access_token=JWT_TOKEN_HERE`

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![lane](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/lane/32/30641_2.png) [@lane](https://devforum.zoom.us/u/lane)\
**Post date:** [March 19, 2020, 10:19pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/13 "2020-03-19T22:19:17Z")

</div>

> [@tommy](#):
>
> access\_token

Tried that. Same error returns:

{“status”:false,“errorCode”:401,“errorMessage”:“java.lang.NullPointerException”,“result”:null}

---

<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:** [March 20, 2020, 12:02am UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/14 "2020-03-20T00:02:36Z")

</div>

Hey @lane,

Will help you debug during our meeting on Monday.

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![EVant](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/evant/32/3511_2.png) [@EVant](https://devforum.zoom.us/u/EVant)\
**Post date:** [March 23, 2020, 7:55pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/15 "2020-03-23T19:55:07Z")

</div>

I’m having the same problem  
providing a 6 month period but it change it to a one day period…

There is no way to have a larger period ?

---

<div class="post-metadata">

**Author:** ![lane](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/lane/32/30641_2.png) [@lane](https://devforum.zoom.us/u/lane)\
**Post date:** [March 23, 2020, 8:23pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/16 "2020-03-23T20:23:59Z")

</div>

Thanks Tommy for the help today!

Sharing the script we wrote for batch downloading Zoom recordings as open source (GPL3) so others can use it.

> **[lanec/zoom-batch-downloader](https://github.com/lanec/zoom-batch-downloader)**
>
> Download all your zoom cloud recordings. Contribute to lanec/zoom-batch-downloader development by creating an account on GitHub.

---

<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:** [March 23, 2020, 9:09pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/17 "2020-03-23T21:09:49Z")

</div>

Hey @EVant,

Please see my post here:

> [@Defining from with requests to API using JWT not behaving as expected](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/9):
>
> Hey @lane, It appears that endpoint only returns data in one month increments. In order to return all the data from the past 6 months you will need to make the requests in the following ways: [https://api.zoom.us/v2/users/{userId}/recordings?to=2020-03-19&from=2020-02-19](https://api.zoom.us/v2/users/%7BuserId%7D/recordings?to=2020-03-19&from=2020-02-19)[https://api.zoom.us/v2/users/{userId}/recordings?to=2020-02-19&from=2020-01-19](https://api.zoom.us/v2/users/%7BuserId%7D/recordings?to=2020-02-19&from=2020-01-19)[https://api.zoom.us/v2/users/{userId}/recordings?to=2020-01-19&from=2019-12-19](https://api.zoom.us/v2/users/%7BuserId%7D/recordings?to=2020-01-19&from=2019-12-19) And so on… Let me know if that works! Thanks, Tommy

Thanks,  
Tommy

---

<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:** [March 23, 2020, 9:11pm UTC](https://devforum.zoom.us/t/defining-from-with-requests-to-api-using-jwt-not-behaving-as-expected/8770/18 "2020-03-23T21:11:35Z")

</div>

You are welcome @lane!

For others reference, the JWT Token needed to be in the url as a query param (&access\_token=JWT\_TOKEN), without setting an authorization bearer header.

Thank you for sharing the zoom batch downloader! 🙂

-Tommy
