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

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

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

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

Tried that. Same issue.

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

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

Hey @lane,

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

Thanks,
Tommy

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/{userId}/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

And so onā€¦

Let me know if that works!

Thanks,
Tommy

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?

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}

Hey @lane,

Please make sure this setting is turned on in your Zoom Admin Settings:

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

Tried that. Same error returns:

{ā€œstatusā€:false,ā€œerrorCodeā€:401,ā€œerrorMessageā€:ā€œjava.lang.NullPointerExceptionā€,ā€œresultā€:null}

Hey @lane,

Will help you debug during our meeting on Monday.

Thanks,
Tommy

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 ?

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.

1 Like

Hey @EVant,

Please see my post here:

Thanks,
Tommy

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! :slight_smile:

-Tommy