donfeng91
(donfeng91)
January 13, 2024, 2:58am
1
Hello everyone,
I was using UiPath studio http activity to make a API triggers in order to request an online robot task and receive the result. But I get the error message as below. Besides, I can use Postman get the result perfectly with no error.
"message": "{\"type\":\"https://tools.ietf.org/html/rfc9110#section-15.5.2\",\"title\":\"Unauthorized\",\"status\":401,\"traceId\":\"00-2bbca4480be204f552c003c03496496c-d5a2680320b8e7cf-00\"}",
And it is important to note that the code mode is set to sync long-polling. If set to async it works well in http activity.
I am looking forward to your answer. Thanks.
Sharath_HK
(Sharath Keshavamurthy)
January 17, 2024, 5:55am
3
Hi @donfeng91
401 error relates to unauthorized request issue. Could you please check if authorization details are being passed correctly?
donfeng91
(donfeng91)
January 18, 2024, 3:11pm
4
As you can see below, I use the same UiPath process to run to request API trigger in which I only change the call mode.
This picture is requesting the Async polling mode. It works well.
And this picture is requesting the Sync long-polling mode. It encounters the exception.
Both process I run above didn’t change anything of the process. This is my http request configration:
This picture is that I use postman to make a request under the Sync long-polling mode and it runs perfectly.
I read the link article in the error message, but there is no help.
EduardS
(Eduard Stanculet)
April 9, 2024, 12:31pm
5
The UiPath Documentation Portal - the home of all our valuable information. Find here everything you need to guide you in your automation journey in the UiPath ecosystem, from complex installation guides to quick tutorials, to practical business...
Probably the Require Authentication header for sync API Triggers redirects
setting is enabled. Sync calls will not work when the client automatically follows redirects and this setting is enabled.