How to fetch a list of recordings in a Python script with OAuth


Hi there,

I am working with a script that currently uses JWT to fetch Zoom recordings that are stored on the cloud. Since JWT support is being sunsetted, I am looking to replace this workflow with a server-to-server OAuth workflow.

From my understanding of OAuth, it is generally inteded for end-user web applications to give restricted authorization for external services/servers to access user data.

I am wondering what the canonical approach is to using OAuth in my case, in which I simply would like to run a script that fetches a list of my recordings so that I may programmatically download one or some of them?

I will post my attempts and results below if relevant.

Thanks in advance for any advice!

Attempt 1

import requests
from oauthlib.oauth2 import BackendApplicationClient
from requests_oauthlib import OAuth2Session

client_id = 'MY_CLIENT_ID'
client_secret = 'MY_CLIENT_SECRET'

client = BackendApplicationClient(client_id=client_id)
oauth = OAuth2Session(client=client)

URL = ""
token = oauth.fetch_token(token_url=URL, client_id=client_id,

resp = requests.get("",
                        'Authorization': f"Bearer {token['access_token']}"


The result is a 200 status code with a message that says Account does not enabled REST API.. I tried this with both an account-level and user-managed app. I am using a paid company account, and I have checked with our Zoom admin that View and Edit for Server-to-Server Oauth app are both enabled.

Attempt 2

I also tried the below:

import requests
import json

client_id = "MY_CLIENT_ID"
client_secret = "MY_CLIENT_SECRET"

meeting_id = "MEETING_ID"

data = {
    "grant_type": "account_credentials",
    "client_id": client_id,
    "client_secret": client_secret
response ="", data=data)
access_token = response.json()["access_token"]

headers = {
    "Authorization": f"Bearer {access_token}"

url = f"{meeting_id}/report"

response = requests.get(url, headers=headers)

print(json.dumps(response.json(), indent=4))

I get a KeyError for response.json()['access-token'], and when I print response,json() I see {'reason': 'unsupported grant type', 'error': 'unsupported_grant_type'}

If anyone has advice that would be great! Thanks

Hi @ryanaai ,

The Video SDK API endpoints require Video SDK JWT token to use. The instructions are here: Create a Video SDK app

It is okay to use S2S OAuth with Meeting API, but you need to pass account_id to the OAuth token endpoint to retrieve a valid token:[account_id]

Please confirm you have a valid token and then call the Dashboard endpoint again.

Hi @gianni.zoom! I got everything working with your advice and some additional reading :+1:

Thank you!

1 Like

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