# The download\_url returns "File does not exist" error, with valid S2S Oauth app access\_token

**URL:** <https://devforum.zoom.us/t/the-download-url-returns-file-does-not-exist-error-with-valid-s2s-oauth-app-access-token/114101>\
**Category:** API and Webhooks\
**Tags:** phone, webhooks\
**Created:** [July 22, 2024, 3:01am UTC](https://devforum.zoom.us/t/the-download-url-returns-file-does-not-exist-error-with-valid-s2s-oauth-app-access-token/114101 "2024-07-22T03:01:00Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![kota.matsumoto](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/kota.matsumoto/32/52533_2.png) [@kota.matsumoto](https://devforum.zoom.us/u/kota.matsumoto)\
**Post date:** [July 22, 2024, 3:01am UTC](https://devforum.zoom.us/t/the-download-url-returns-file-does-not-exist-error-with-valid-s2s-oauth-app-access-token/114101/1 "2024-07-22T03:01:00Z")

</div>

## **API Endpoint(s) and/or Zoom API Event(s)**

_Link the API endpoint(s) and/orZoom API Event(s) you’re working with to help give context._

phone.recording\_completed

### **Description**

The app caught the webhook request, and the S2S access token was generated successfully.I tried to request the download\_url within the webhook payload, but the response always returns “File does not exist”.I tried both methods below:Authorization token pattern:

```javascript
const response = await axios.get(url, {
  responseType: 'arraybuffer',
  headers: {
    'Authorization': `Bearer ${accessToken}`,
  },
});

```

Query parameter pattern:  
(This pattern returns ‘Invalid access token, this access token is not supported as query parameter string.’)

```javascript
const urlWithAccessToken = `${url}?access_token=${accessToken}`;
const response = await axios.get(urlWithAccessToken, {
  responseType: 'arraybuffer'
});

```

### The S2S App has scopes below

Phone  
View all users’ phone information  
phone:read:list\_call\_recordings:admin View call recordings  
phone:read:call\_recording:admin View a call recording

* * *

Recording  
View all user recordings  
cloud\_recording:read:recording:admin View a recording  
cloud\_recording:read:archive\_files:admin Read archiving recordings

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [July 24, 2024, 2:38pm UTC](https://devforum.zoom.us/t/the-download-url-returns-file-does-not-exist-error-with-valid-s2s-oauth-app-access-token/114101/2 "2024-07-24T14:38:38Z")

</div>

Hi @kota.matsumoto  
Thanks for reaching out to us!  
If you are still facing this issue, please check out this Blog post that I have about Downloading recordings using webhooks:

> **[Zoom Meeting API querying tips - Download recordings using webhooks](https://developers.zoom.us/blog/meeting-api-querying-tips-part4/)**
>
> Join Developer Advocate Elisa Levet in this blog post series as she takes a deep dive into the world of the Zoom REST API.

Let me know if this helps!  
Cheers,  
Elisa

---

<div class="post-metadata">

**Author:** ![kota.matsumoto](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/kota.matsumoto/32/52533_2.png) [@kota.matsumoto](https://devforum.zoom.us/u/kota.matsumoto)\
**Post date:** [July 25, 2024, 2:28am UTC](https://devforum.zoom.us/t/the-download-url-returns-file-does-not-exist-error-with-valid-s2s-oauth-app-access-token/114101/3 "2024-07-25T02:28:42Z")

</div>

Thank you for your reply.  
The URL you provided appears to be discussing webhooks for Zoom Meetings, not Zoom Phone webhooks.  
While the bottom of the blog mentions that the download\_token can be used similarly for Zoom Phone webhooks, when I look at the documentation linked, I don’t see the download\_token in the payload.  
How can we implement this for Zoom Phone webhooks?

---

<div class="post-metadata">

**Author:** ![kota.matsumoto](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/kota.matsumoto/32/52533_2.png) [@kota.matsumoto](https://devforum.zoom.us/u/kota.matsumoto)\
**Post date:** [July 30, 2024, 12:33am UTC](https://devforum.zoom.us/t/the-download-url-returns-file-does-not-exist-error-with-valid-s2s-oauth-app-access-token/114101/4 "2024-07-30T00:33:56Z")

</div>

@elisa.zoom  
How about this replying?

Sorry for the reply without mention to you

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [July 30, 2024, 7:34pm UTC](https://devforum.zoom.us/t/the-download-url-returns-file-does-not-exist-error-with-valid-s2s-oauth-app-access-token/114101/5 "2024-07-30T19:34:23Z")

</div>

Hey @kota.matsumoto  
Please pass the access token generated with the S2S oauth token in your authorization header

```auto
> curl --location --request GET '{download_url}' \
> --header 'Content-Type: application/json' \
> --header 'Authorization: Bearer {download_token}' \
> --output '/path/to/download.file'

```

---

<div class="post-metadata">

**Author:** ![kota.matsumoto](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/kota.matsumoto/32/52533_2.png) [@kota.matsumoto](https://devforum.zoom.us/u/kota.matsumoto)\
**Post date:** [July 31, 2024, 1:40am UTC](https://devforum.zoom.us/t/the-download-url-returns-file-does-not-exist-error-with-valid-s2s-oauth-app-access-token/114101/6 "2024-07-31T01:40:37Z")

</div>

@elisa.zoom  
The response is below.

```auto
{"code":404,"message":"File does not exist."}

```

But I can play and download the recorded audio ( found out same call\_id ) on Zoom console.

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 2, 2024, 5:11pm UTC](https://devforum.zoom.us/t/the-download-url-returns-file-does-not-exist-error-with-valid-s2s-oauth-app-access-token/114101/7 "2024-08-02T17:11:52Z")

</div>

Can you try calling the endpoint [Get a recording by call ID](https://developers.zoom.us/docs/api/rest/reference/phone/methods/#operation/getPhoneRecordingsByCallIdOrCallLogId) and use the download URL provided in the response body to get the recording please?  
I think it could be an issue with the specific download URL you are using. Let me know if you can get the recording this way  
@kota.matsumoto

---

<div class="post-metadata">

**Author:** ![kota.matsumoto](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/kota.matsumoto/32/52533_2.png) [@kota.matsumoto](https://devforum.zoom.us/u/kota.matsumoto)\
**Post date:** [August 5, 2024, 1:24am UTC](https://devforum.zoom.us/t/the-download-url-returns-file-does-not-exist-error-with-valid-s2s-oauth-app-access-token/114101/8 "2024-08-05T01:24:54Z")

</div>

@elisa.zoom  
I tried executing the following steps again, but the same error occurred:

1. Execute the request for “Get a recording by call ID”
2. Execute a GET request to the `downloadURL` contained within

For both steps 1 and 2, I sent an S2S Authorization token with the following scopes as a Bearer token:

- phone:read:list\_users:admin
- phone:read:user:admin
- phone:read:list\_call\_recordings:admin
- phone:read:call\_recording:admin
- phone:read:recording\_transcript:admin
- cloud\_recording:read:recording:admin
- cloud\_recording:read:archive\_files:admin

Step 1 returned values successfully, but step 2 returned:

```auto
{
  "code": 404,
  "message": "File does not exist."
}

```

FYI  
Both of download urls are same.

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 5, 2024, 3:13pm UTC](https://devforum.zoom.us/t/the-download-url-returns-file-does-not-exist-error-with-valid-s2s-oauth-app-access-token/114101/9 "2024-08-05T15:13:23Z")

</div>

Interesting @kota.matsumoto  
Let me send you a DM and make sure to follow up there

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [August 13, 2024, 1:36pm UTC](https://devforum.zoom.us/t/the-download-url-returns-file-does-not-exist-error-with-valid-s2s-oauth-app-access-token/114101/10 "2024-08-13T13:36:27Z")

</div>

To update this thread, the developer didn’t have the right phone management settings enabled in his account, so make sure to enable the right permissions and settings for the user who is making the API request

---

<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 14, 2024, 1:36pm UTC](https://devforum.zoom.us/t/the-download-url-returns-file-does-not-exist-error-with-valid-s2s-oauth-app-access-token/114101/11 "2024-08-14T13:36:34Z")

</div>

Closed on August 14, 2024, 1:36pm UTC

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