The download_url returns "File does not exist" error, with valid S2S Oauth app access_token

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:

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.’)

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

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:

Let me know if this helps!
Cheers,
Elisa

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?

@elisa.zoom
How about this replying?

Sorry for the reply without mention to you

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

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

@elisa.zoom
The response is below.

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

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

Can you try calling the endpoint Get a recording by call ID 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

@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:

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

FYI
Both of download urls are same.

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

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

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