cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
javier-raneros
Regular Visitor

Call to web service allways return 401, no detect custom headers

Hello everyone, I am trying to execute a call to an API of a web service and it always returns the 401 error and the problem is that it does not detect the custom headers that I put, I only have to send one and I am writing it the box of custom param in mode key:value and the service must return a 201 with a location, the same call withc Postman for example return 201 CREATED with the headers result.

 

HeaderKeyValuePowerAutomateDesktop.jpg

 

Has anyone had this problem?

 

Thanks

 

 

3 REPLIES 3
VJR
Super User
Super User

Hi @javier-raneros 

 

Instead of the words key and value I guess you need to send the actual key and the actual value.

Also see in postman if the custom headers are in any particular format.

Is it something like below with quotes where test is the key and true is the value?

test: 'true' 

 

Give a minute to this video and you will get some pointers

Set Custom Headers on an API Request in Postman | egghead.io

 

yoko2020
Responsive Resident
Responsive Resident

If your authentication is using bearer just put this in the header

 

 

Authorization: Bearer <token>

 

 

If using basic authentication

 

Authorization: Basic ZGVtbzpwQDU1dzByZA==

 

 

https://swagger.io/docs/specification/authentication/basic-authentication/

https://swagger.io/docs/specification/authentication/bearer-authentication/

javier-raneros
Regular Visitor

Good morning, thanks for the interest and sorry for delay (i'm out off..)

 

In this first request it is not necessary to authenticate, first a value is passed in the header so that it returns a Location and then with that value in another request to authenticate in that Location.

But my problem is that I don't know how to fill in the fields of the request in PowerAutomate; in Postman it works correctly and returns OK 201 but from PowerAutomate it returns 401 as I enter the data.

 

Call from PowerAutomateCall from PowerAutomate

 

Call from PostmanCall from Postman

 

In the case of Postman I enter them in the Headers fields because it indicates it and in PowerAutomate in the Custom Headers field. I have tried all the combinations: with single, double quotes, without them, etc and it always returns 401 that this Header is missing.

 

How to pass this data?

 

Very very thanks,

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.

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.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (3,746)