cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thomas1992UK
Frequent Visitor

Dealing with a 302 response in Power Automate

Hi,

 

I want to download a file - when I enter the URL in the browser it downloads.

 

When I use the HTTP request in power automate is returns a 302 error. I have tried the run after failed option but this returns a another http link as opposed to the body content.

 

I have attached the flow and a screenshot from power automate.

 

If I click deal with the 302 redirect response in postman it downloads the file correctly, wondering how to do this in power automate.

 
 

 

Capture11.PNGpowerautomate1.PNGprocore2.PNG

6 REPLIES 6
ChristianAbata
Community Champion
Community Champion

hi @thomas1992UK  your link is public? Becouse 302 error is when you have headers to redirect the link, so you need to disable redirect headers from your website.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

It’s an api call with oauth2

@thomas1992UK  mm ok, so in body you need to add the parameter you need to correctly log in. Parameters like this.

client_id=exampleApiKey&client_secret=exampleSecret&username=someUsername&password=WithSomePassword

  



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Infact sorry, it is a public api

@thomas1992UK  another thing you can do is run after error because as I told you the error is an redirect error so maeby you need someting in you header html page.

 

runafter.gif



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

Thanks, now I have this bit working.

 

When I get the body from the HTTP request it returns it like the image (binary?), how do I transform this to a viewable image?

 

Thanks,

Tomtext file.PNG

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,144)