# Downloading Zoom Recordings as Admin

**URL:** <https://devforum.zoom.us/t/downloading-zoom-recordings-as-admin/106563>\
**Category:** Meetings\
**Created:** [March 26, 2024, 5:53pm UTC](https://devforum.zoom.us/t/downloading-zoom-recordings-as-admin/106563 "2024-03-26T17:53:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavan.n](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/pavan.n/32/49536_2.png) [@pavan.n](https://devforum.zoom.us/u/pavan.n)\
**Post date:** [March 26, 2024, 5:53pm UTC](https://devforum.zoom.us/t/downloading-zoom-recordings-as-admin/106563/1 "2024-03-26T17:53:32Z")

</div>

Hi Team,

I am trying to download some Zoom Cloud recordings with a python script. I am getting bad request error.

Steps I followed:

1. Created a Server to Server App.
2. Got the Client ID and client Secret.
3. I am using these in a python script as below.

```auto
import requests
import json

client_id = "dad87987d98f7a89ds7f89"
client_secret = "kaldjfklads8u8978789df7ads"

meeting_id = "970 3221 052"

data = {
    "grant_type": "account_credentials",
    "client_id": client_id,
    "client_secret": client_secret
}
response = requests.post("https://zoom.us/oauth/token", data=data)
print(response.json())
access_token = response.json()["access_token"]

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

url = f"https://api.zoom.us/v2/metrics/meetings/{meeting_id}/report"

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

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

```

I get {‘reason’: ‘Bad Request’, ‘error’: ‘invalid\_request’} when I print access token.

Please help. Appreciate if you could guide me to an example python script.

Cheers,  
Pavan.

---

<div class="post-metadata">

**Author:** ![MultiplayerSession](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/multiplayersession/32/66446_2.png) [@MultiplayerSession](https://devforum.zoom.us/u/MultiplayerSession)\
**Post date:** [March 26, 2024, 9:31pm UTC](https://devforum.zoom.us/t/downloading-zoom-recordings-as-admin/106563/2 "2024-03-26T21:31:23Z")

</div>

- For Server-to-Server OAuth, in the request body, pass `grant_type=account_credentials&account_id=` (with the account ID value) instead of the client ID and client secret.
- Send the client ID and client secret as Basic authentication.
- Make sure you declare the content type and format your body appropriately (this might be implied by Python, but it’s ambiguous to a casual reviewer): `Content-Type: application/x-www-form-urlencoded; charset=utf-8`

For details, see [Server-to-Server OAuth | To generate an access token](https://developers.zoom.us/docs/internal-apps/s2s-oauth/#generate-access-token).

---

<div class="post-metadata">

**Author:** ![pavan.n](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/pavan.n/32/49536_2.png) [@pavan.n](https://devforum.zoom.us/u/pavan.n)\
**Post date:** [March 28, 2024, 4:38am UTC](https://devforum.zoom.us/t/downloading-zoom-recordings-as-admin/106563/3 "2024-03-28T04:38:46Z")

</div>

Hi Christopher,

Appreciate your help. was able to fix the issue with this input.

However, I have got a new issue. I am getting this error now. When I check the scope in Server-Server, these scopes are not there to enable. What am I missing? My objective is to download recordings as admin. What are the write access scope are required and where are they. Please advice.  
{‘code’: 4711, ‘message’: ‘Invalid access token, does not contain scopes:[user:read:list\_recordings:admin, user:read:list\_recordings].’}

---

<div class="post-metadata">

**Author:** ![MultiplayerSession](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/multiplayersession/32/66446_2.png) [@MultiplayerSession](https://devforum.zoom.us/u/MultiplayerSession)\
**Post date:** [March 28, 2024, 7:42pm UTC](https://devforum.zoom.us/t/downloading-zoom-recordings-as-admin/106563/4 "2024-03-28T19:42:12Z")

</div>

Make sure that the user that owns your application is set to a role that has permission to do the equivalent activities via the Zoom user interface. I’m guessing it’s filed under “Account Management; Recording management”. Then you can add the corresponding scopes.

The application owner needs to maintain these permissions on an ongoing basis. This gives the account owner transparency into what the application can do.

---

<div class="post-metadata">

**Author:** ![pavan.n](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/pavan.n/32/49536_2.png) [@pavan.n](https://devforum.zoom.us/u/pavan.n)\
**Post date:** [March 29, 2024, 9:39am UTC](https://devforum.zoom.us/t/downloading-zoom-recordings-as-admin/106563/5 "2024-03-29T09:39:31Z")

</div>

Hi Christopher,

I have Admin access on the web portal. I am able to see all the recordings and able to download them as well from the portal. However, getting this token error only on API calls.

 ![Screenshot 2024-03-29 at 3.04.46 PM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/e/b/eb9067297fc31f1ed5d5bb07815e404fae243a92.png)
