# Calling Download URL from Salesforce Trigger results in 302 Error

**URL:** <https://devforum.zoom.us/t/calling-download-url-from-salesforce-trigger-results-in-302-error/70564>\
**Category:** API and Webhooks\
**Created:** [June 15, 2022, 3:06pm UTC](https://devforum.zoom.us/t/calling-download-url-from-salesforce-trigger-results-in-302-error/70564 "2022-06-15T15:06:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rscheibert](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rscheibert/32/38494_2.png) [@rscheibert](https://devforum.zoom.us/u/rscheibert)\
**Post date:** [June 15, 2022, 3:06pm UTC](https://devforum.zoom.us/t/calling-download-url-from-salesforce-trigger-results-in-302-error/70564/1 "2022-06-15T15:06:43Z")

</div>

**Description**  
We are trying to access the audio files of Zoom meetings via the API. Specifically, calling the endpoint from within a Salesforce trigger so we can then upload the file to a Salesforce File. When accessing the URL I get in my code through a broswer/postman I am getting valid 200 responses, but when trying via the Apex Trigger I get the below error:

**Error?**  
System.HttpResponse[Status=null, StatusCode=302]  
The payload I get back is the “Please enter passcode” redirect page.

**API Endpoint/s?**  
Recording

**How To Reproduce**  
_Steps to reproduce the behavior:_

1. Trigger callout from SFDC record save
2. Successfully get Oauth token and recording download URL
3. Attempt to get response from DownloadURL and receive 302 error.

**Additional context**

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [June 23, 2022, 4:28pm UTC](https://devforum.zoom.us/t/calling-download-url-from-salesforce-trigger-results-in-302-error/70564/2 "2022-06-23T16:28:54Z")

</div>

Hi @rscheibert ,

For Salesforce integration support, can you please open a support ticket? Thank you!

> **[Zoom Developer Support](https://devsupport.zoom.us/hc/en-us)**

---

<div class="post-metadata">

**Author:** ![rscheibert](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rscheibert/32/38494_2.png) [@rscheibert](https://devforum.zoom.us/u/rscheibert)\
**Post date:** [June 24, 2022, 5:34pm UTC](https://devforum.zoom.us/t/calling-download-url-from-salesforce-trigger-results-in-302-error/70564/3 "2022-06-24T17:34:39Z")

</div>

Hi Gianni,

After I posted this, I discovered that the 302 Response is expected behavior for this use-case and that I needed to tell my code to follow the redirect/downloadURL. When adding this logic in, it worked as expected. Hope this helps anyone else in my situation.

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [June 24, 2022, 6:28pm UTC](https://devforum.zoom.us/t/calling-download-url-from-salesforce-trigger-results-in-302-error/70564/4 "2022-06-24T18:28:06Z")

</div>

Thanks so much for sharing this! What documentation did you reference please?

---

<div class="post-metadata">

**Author:** ![rscheibert](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/rscheibert/32/38494_2.png) [@rscheibert](https://devforum.zoom.us/u/rscheibert)\
**Post date:** [June 24, 2022, 6:41pm UTC](https://devforum.zoom.us/t/calling-download-url-from-salesforce-trigger-results-in-302-error/70564/5 "2022-06-24T18:41:13Z")

</div>

Sure thing, it was this post here:

> [@Extract Zoom API recordings](https://devforum.zoom.us/t/extract-zoom-api-recordings/47556):
>
> Hello all! I am trying to extract and save the recordings from a user’s account with the Zoom REST API but I am currently receiving a redirect HTTP/1.1 302 response. The endpoint I am using is: https://{mycompany}.zoom.us/rec/download/{downloadlink}?access\_token={JWT token} And I am doing this through software called Alteryx ([https://www.alteryx.com/](https://www.alteryx.com/)). Any help will be hugely appreciated!!! The recordings are protected with a password. Here’s the full response message I am getting: …

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [June 24, 2022, 7:50pm UTC](https://devforum.zoom.us/t/calling-download-url-from-salesforce-trigger-results-in-302-error/70564/6 "2022-06-24T19:50:16Z")

</div>

Thanks so much for this!

---

<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:** [July 25, 2022, 5:51am UTC](https://devforum.zoom.us/t/calling-download-url-from-salesforce-trigger-results-in-302-error/70564/7 "2022-07-25T05:51:01Z")

</div>

Closed on July 25, 2022, 5:51am UTC

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