web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Dealing with a 302 res...
Power Automate
Unanswered

Dealing with a 302 response in Power Automate

(0) ShareShare
ReportReport
Posted on by 20

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

Categories:
I have the same question (1)
  • ChristianAbata Profile Picture
    8,951 Most Valuable Professional on at

    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.

  • thomas1992UK Profile Picture
    20 on at
    It’s an api call with oauth2
  • ChristianAbata Profile Picture
    8,951 Most Valuable Professional on at

    @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

      

  • thomas1992UK Profile Picture
    20 on at
    Infact sorry, it is a public api
  • ChristianAbata Profile Picture
    8,951 Most Valuable Professional on at

    @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

  • thomas1992UK Profile Picture
    20 on at

    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

  • MattBarker Profile Picture
    49 on at

    Please provide the solution to the download rather than just stating "Thanks, now I have this bit working."

  • TheFactorY Profile Picture
    29 on at

    How did you get this working? Same question 🙂

  • Suggested answer
    MB-30070209-0 Profile Picture
    8 on at
    I've managed to get it to work for my requirement.
    It appears that the request needed to include an "Accept" header in addition to the "content-type" header I already had.
    Once I added that header to the request, then it handled the 302 response and returned a 200-OK with the expected  body content.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard