I finally figured out how to run my request successfully in postman (I have to have their Host, Content-Type, and Content-Length headers selected). Now I cannot get it to work in Flow or as a custom connector. I have tried putting content-type, length, and host in the headers and in the body and it has not worked. Continually getting a 403 error. I am new to making HTTP requests, so if there is any other information that would help, let me know. Thanks!
@cah2035 , could you please explain this in detail how you did , and if the body has to be in JSON format?
I actually solved my problem today on my own 😄
I realized that there is a firewall in the network i am sending my requests. I assume that if i use the postman app the requests are send locally. Since Http actions of my workflow are sent from Microsoft servers, the firewall intercepts these requests.
@H_Jonaa01I did!
Not sure if this will exactly work for your situation. I made a variable that contained my token and all the query filters. For the HTTP action, I only have one header Content-Type with the value application/x-www-form-urlencoded and I think this was critical for getting it to work. The for the body value, you need to use the binary function:
So I believe both that content type and using the binary function for the request body info were what made the difference for me. Hopefully this method will also work for you.
Hi @cah2035,
i am facing the same problem at the moment. Have you been able to solve this issue?
Hi Laura, thanks for your reply.
I am using the HTTP action under the HTTP category. I am trying to access a site run by my institution, and their instructions require a POST request rather than get (even though this request is technically just to get data from their site).
I have tried doing this both in Power Automate with the HTTP action as well as trying to create a custom connector which is even more confusing to use, and I get the same 403 response in both. When I first started doing this, I started with postman and was getting the same 403 error. As stated in the original post, I discovered that the request required the headers for Content-Type, Content-Length, and Host to get the request to work (these are three headers that are provided by postman, so I did not put any data in these headers myself. In fact, there were no other headers I included, the only information I put in was the body of the request.
Since all of the headers shown in the postman request above have values that are generated by postman itself, I am not sure how I would establish these headers in the flow.
Hi!
I am not sure of what connector you are using, but here are some quick checks: