# ZoomPhone Call Recording Fetching issue

**URL:** <https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607>\
**Category:** Phone\
**Created:** [June 5, 2023, 6:50am UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607 "2023-06-05T06:50:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![phonebridge-integ](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@phonebridge-integ](https://devforum.zoom.us/u/phonebridge-integ)\
**Post date:** [June 5, 2023, 6:50am UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/1 "2023-06-05T06:50:13Z")

</div>

Hi Team,

We are trying to fetch the ZoomPhone call recordings using the Admin’s access token, but we are getting 401.

_The app we have developed is Account Level - OAuth app_  
_We are using the valid access token to fetch the recording (admin users access token)_

Please me know if need to any specific information about the call to debug the case.

---

<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:** [June 5, 2023, 6:42pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/2 "2023-06-05T18:42:42Z")

</div>

Hi @phonebridge-integ  
Thanks for reaching out to us, I am happy to help here!  
Could you please share with me what endpoint are you trying to reach?  
and what error are you getting?

---

<div class="post-metadata">

**Author:** ![phonebridge-integ](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@phonebridge-integ](https://devforum.zoom.us/u/phonebridge-integ)\
**Post date:** [June 6, 2023, 10:40am UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/3 "2023-06-06T10:40:40Z")

</div>

Hello @elisa.zoom

Thanks for the reply. Please find the request details below, and the time of issue occurred was 1685578666834

[https://zoom.us/v2/phone/recording/download/8SH78eMmSciaU0KdsqxSUQ?access\_token=eyJzdiI6IjAwMDAwMSIsImFs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jE2ODUxMzI1NDgsImlhdCI6MTY4NTEyODk0OCwiYWlkIjoiUEJPY1RpZDlUaDZhVkVkblMxMGpvZyJ9.K7Aj-MAzjmosYvHHrB_XWrBWikrM4A9gNmZnyCMa9b8XsjC2V_Or0RqosLJPQpLgNgnP__f_C-qVep93GLLYuA)

---

<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:** [June 6, 2023, 7:47pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/4 "2023-06-06T19:47:10Z")

</div>

Thanks @phonebridge-integ  
Could you please share with me what error are you getting? or what issue are you running into?

---

<div class="post-metadata">

**Author:** ![phonebridge-integ](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@phonebridge-integ](https://devforum.zoom.us/u/phonebridge-integ)\
**Post date:** [September 1, 2023, 5:52am UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/5 "2023-09-01T05:52:26Z")

</div>

Hi Team,

Apologies for the delayed response.

Please find the complete details below,

**Request URL** : [https://zoom.us/v2/phone/recording/download/x-dKp4gTQNKGwYzC9MVD0A?access\_token={{ACCESS\_TOKEN}](https://zoom.us/v2/phone/recording/download/x-dKp4gTQNKGwYzC9MVD0A?access_token=%7B%7BACCESS_TOKEN%7D)}

**HTTP Status Code** : 400

**Response Body** : {“code”:401,“message”:“Invalid access token, this access token is not supported as query parameter string.”}

**FYI** : The access token sent in the request is newly created access token.

---

<div class="post-metadata">

**Author:** ![phonebridge-integ](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@phonebridge-integ](https://devforum.zoom.us/u/phonebridge-integ)\
**Post date:** [September 5, 2023, 11:41am UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/6 "2023-09-05T11:41:41Z")

</div>

Hi Team,

Could we get any updates for the above issue.?

---

<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:** [September 5, 2023, 3:00pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/7 "2023-09-05T15:00:35Z")

</div>

Hi @phonebridge-integ  
Thanks for reaching out to us  
We recently made some changes to the way we handle access\_tokens and those should not be passed down as a query parameter anymore

> [@\[Security Update\] No token values in URL query parameters](https://devforum.zoom.us/t/security-update-no-token-values-in-url-query-parameters/78782):
>
> As a part of our continuing efforts to improve the security of Zoom OAuth App Types using Authorization flow, we are removing the ability to set the access tokens, refresh tokens and revoke tokens in the URL query parameters. This change will take effect on February 2023. It is strongly recommended that you update your API calls to set the token values in the Authorization header and not the HTTP query parameters. Failure to do so will result in rejected API calls and a reduced functionality for…

In your request, try to pass this value in your authorization headers, as Bearer token

---

<div class="post-metadata">

**Author:** ![phonebridge-integ](https://avatars.discourse-cdn.com/v4/letter/p/5fc32e/32.png) [@phonebridge-integ](https://devforum.zoom.us/u/phonebridge-integ)\
**Post date:** [November 14, 2023, 4:25pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/8 "2023-11-14T16:25:58Z")

</div>

Hello @elisa.zoom ,

We have made the required changes at our end. We are passing the token in header and param as well.

Do we need to remove the token from the param itself.?

---

<div class="post-metadata">

**Author:** ![mshanmugam145](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mshanmugam145/32/50255_2.png) [@mshanmugam145](https://devforum.zoom.us/u/mshanmugam145)\
**Post date:** [December 6, 2023, 3:51pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/9 "2023-12-06T15:51:49Z")

</div>

Hi Team,  
I am writing code in nestjs. And for downloading phone call recording I have used res.redirect() with res.header(‘authorization’, ‘bearer token’);  
but getting error  
{  
“code”: 124,  
“message”: “Access token is required.”  
}

---

<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:** [December 7, 2023, 7:24pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/10 "2023-12-07T19:24:49Z")

</div>

hi @mshanmugam145  
How are you generating the access token that you are passing in your request?

---

<div class="post-metadata">

**Author:** ![mshanmugam145](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mshanmugam145/32/50255_2.png) [@mshanmugam145](https://devforum.zoom.us/u/mshanmugam145)\
**Post date:** [December 8, 2023, 4:11am UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/11 "2023-12-08T04:11:04Z")

</div>

I have created server-O-auth app in zoom market place and using this

```auto
type or paste code here
https://zoom.us/oauth/token?grant_type=account_credentials&account_id={account_id}
const headersRequest = { Authorization: `Basic ${basicToken}` };

```

These are the API request I am sending and I am getting access\_token. → This is working fine.

But For downloading zoom call recording -  
When I directly call that download\_url with bearer token → working fine in postman.  
But If I used in our application to download that - please find the below code for ref.

Controller:

```auto
  @Public()
  @Get('phone/recording/:id')
  async redirectToAudioFile(
    @Res() res: express.Response,
    @Req() req: express.Request,
    @Param('id') id: string,
  ) {
    const audioUrl = https://zoom.us/v2/phone/recording/download/{id}
    // here I am using the above generation of token --> working fine. 
    const { access_token } = await this.zoomService.getAuthToken();
    // res.header('Authorization', `Bearer ${access_token}`);
    // res.header({ Authorization: `Bearer ${access_token}` });
    // res.set('Authorization', `Bearer ${access_token}`);
    // res.set({ Authorization: `Bearer ${access_token}` });
    // res.setHeader('Authorization', `Bearer ${access_token}`);
    // console.log(res);
    // req.('Authorization', 'Bearer my_token');
    res.removeHeader('Authorization');
    res.header('Authorization', `Bearer ${access_token}`);
    res.redirect(303, audioUrl);
  }

```

When I hit this request in postman - getting this below error

```auto
{
“code”: 124,
“message”: “Access token is required.”
}

```

---

<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:** [December 8, 2023, 1:46pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/12 "2023-12-08T13:46:30Z")

</div>

Make sure that you are passing the access\_token as a bearer token in your authorization method in postman  
You can refer to this post here:

> [@How to user Server-to-Sever OAuth app with Postman](https://devforum.zoom.us/t/how-to-user-server-to-sever-oauth-app-with-postman/70848):
>
> How to use our Server-to-Server OAuth with Postman? As some of you might be aware of, our JWT app is being deprecated by June 2023 and we encourage you to migrate to the newly introduced [Server-to-Server OAuth App](https://marketplace.zoom.us/docs/guides/build/server-to-server-oauth-app) That being said, here is a quick and simple guide on how to use or new app with Postman As stated in our documentation here: This new app type facilitates OAuth-authenticated requests between servers without end-user involvement. And this grant type enable your private server a…

---

<div class="post-metadata">

**Author:** ![mshanmugam145](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mshanmugam145/32/50255_2.png) [@mshanmugam145](https://devforum.zoom.us/u/mshanmugam145)\
**Post date:** [December 8, 2023, 2:44pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/13 "2023-12-08T14:44:44Z")

</div>

Access\_token generation is working.  
Working scenarios - If I directly send a request in postman

```auto
URL - https://zoom.us/v2/phone/recording/download/2VHN0SLpThmOFEp84HNVDQ
Authorization - "Bearer token"

```

Not working —

```auto
  @Public()
  @Get('phone/recording/:id')
  async redirectToAudioFile(
    @Res() res: express.Response,
    @Req() req: express.Request,
    @Param('id') id: string,
  ) {
    const audioUrl = https://zoom.us/v2/phone/recording/download/{id}
    // here I am using the above generation of token --> working fine
    const { access_token } = await this.zoomService.getAuthToken();
    res.header('Authorization', `Bearer ${access_token}`);
    res.redirect(303, audioUrl);
  }

```

Here I am using redirect with res.header(). As per my understanding,this res.header() this is not appending with res.redirect().

---

<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:** [December 11, 2023, 6:08pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/14 "2023-12-11T18:08:27Z")

</div>

Hi @mshanmugam145  
Can you share with me what endpoint are you using to get the call recording?

---

<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:** [December 11, 2023, 6:34pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/16 "2023-12-11T18:34:55Z")

</div>

are you using this endpoint?

> **[Zoom Phone API](https://developers.zoom.us/docs/api/rest/reference/phone/methods/#operation/getPhoneRecordings)**
>
> API Reference for /docs/api/rest/reference/phone/methods

---

<div class="post-metadata">

**Author:** ![mshanmugam145](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mshanmugam145/32/50255_2.png) [@mshanmugam145](https://devforum.zoom.us/u/mshanmugam145)\
**Post date:** [December 11, 2023, 6:54pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/18 "2023-12-11T18:54:47Z")

</div>

Hi @elisa.zoom  
[https://zoom.us/v2/phone/recording/download/{rec\_id}](https://zoom.us/v2/phone/recording/download/%7Brec_id%7D)  
e.g:  
[https://zoom.us/v2/phone/recording/download/2VHN0SLpThmOFEp84HNVDQ](https://zoom.us/v2/phone/recording/download/2VHN0SLpThmOFEp84HNVDQ)

This url is coming from the event that whenever “phone\_call\_recording\_completed”  
triggered and within the payload as “download\_url”

Thanks,  
Shanmugam

---

<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:** [December 11, 2023, 8:18pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/19 "2023-12-11T20:18:37Z")

</div>

You will have to generate an Oauth access token and pass it as the bearer token to download the recording.  
The download\_token included in the webhook response expires within 24 hours

---

<div class="post-metadata">

**Author:** ![mshanmugam145](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mshanmugam145/32/50255_2.png) [@mshanmugam145](https://devforum.zoom.us/u/mshanmugam145)\
**Post date:** [December 12, 2023, 6:20am UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/20 "2023-12-12T06:20:10Z")

</div>

Hi @elisa.zoom ,  
This below API is used to get the access token for authorization header.

[https://zoom.us/oauth/token?grant\_type=account\_credentials&account\_id={account\_id}](https://zoom.us/oauth/token?grant_type=account_credentials&account_id=%7Baccount_id%7D)  
const headersRequest = { Authorization: `Basic ${basicToken}` };

Is this correct ?

Thanks,  
Shanmugam

---

<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:** [December 12, 2023, 3:52pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/21 "2023-12-12T15:52:07Z")

</div>

Here is a link to our Docs on how to generate an access token using Server to Server

> **[Server-to-Server OAuth](https://developers.zoom.us/docs/internal-apps/s2s-oauth/#to-generate-an-access-token)**
>
> The Zoom Developer Platform is an open platform that allows third-party developers to build applications and integrations upon Zoom’s video-first unified communications platform.

---

<div class="post-metadata">

**Author:** ![mshanmugam145](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/mshanmugam145/32/50255_2.png) [@mshanmugam145](https://devforum.zoom.us/u/mshanmugam145)\
**Post date:** [December 12, 2023, 4:28pm UTC](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607/22 "2023-12-12T16:28:02Z")

</div>

Hi @elisa.zoom ,  
Yes I am using this one only for generating “access\_token”.  
Everything looks correct, here

```auto
res.header('Authorization', `Bearer ${access_token}`);
res.redirect(303, download_url);

```

In this redirect, this header authorization is not accepting in ZOOM.  
This is actual issue. Bcoz the error I am getting as

```auto
{
“code”: 124,
“message”: “Access token is required.”
}

```

This means that zoom not getting token.  
I am coding in nestJs.

Please let me know if your getting my issue/problem.

Thanks,  
Shanmugam.

[Next page](https://devforum.zoom.us/t/zoomphone-call-recording-fetching-issue/89607.md?page=2)
