I am working with the the http functionality to gather data from a variety of API's to write to Log Analytics. I have one API which requires the ability to handle a 307 redirect (details are below). Currently the Flow errors out at the 307 with a "Temporary Redirect" error. I'm not seeing any options to do http redirect or url forwarding in the http functionality.
Handling 307 redirects
When making REST or REST streaming calls, your product will need to handle 307 redirects. Also known as URL forwarding, a 307 Temporary Redirect response provides a new URL for the browser to resubmit a request.
When a 307 redirect happens, you'll need to make the call again with the new URL information. When you do this, you should cache the host and port number for use in future calls with that user/access token. Remember, each call counts toward the rate limit. Consider how your user is interacting with your product. Some users will press a button or choose a setting repeatedly, so if you make a call for every user action, it can impact rate limits very quickly. If a user makes a series of changes in rapid succession, you should only make an API call for the last (most recent) value.
For more information and an example, see How to Handle Redirects.
I'm having the same problem. I'm starting to learn about Flow, and I'm trying to call my API by building a custom connector. In postman, the api call works fine, but when I try to replicate this call in the custom connector, I get a 307 in my server. Were you able to solve it?
The server is IIS
I put together a blog post with step-by-step using the Nest API as an example. It won't let me post the URL directly here but it's on the blog site for my employer (CatapultSystems) and is called "how-to-query-the-nest-api-from-logic-apps"
Hi @MarkStokes ,
can you tell me how to check the Reponse Code?
Tried with a switch (true if Return Code = 307, else false). But Power Automate does not even execute this step because HTTP Trigger call failed with Code 307.
The trick on this is to have the step after the original query of the URL execute on fail. In my case it's the JSON parse which occurs after the original check of the URL. I will see if I can update my blog to showcase this with more detail!
The step after the original query is set the Configure Run After option available by the three dots in the top right corner on the step after the original query. Within that I set it to has failed and it's working for me.
Mine is using the standard HTTP and I'm doing the Configure Run After on the step after the HTTP request which in my case is a parse JSON. The trigger for mine at the start was just a timed request. Can you see the blog post I referenced where I documented this? (It won't let me post the URL here)
We are excited to announce the launch of Power Virtual Agents Community. Check it out now!
We've updated and improved the layout and uploading format of the Power Automate Cookbook!
Fill out a quick form to claim your user group badge now!