Calling Download URL from Salesforce Trigger results in 302 Error

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:

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

API Endpoint/s?

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

Hi @rscheibert ,

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

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.

1 Like

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

Sure thing, it was this post here:

1 Like

Thanks so much for this!

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