HTTP Request - REST call working in Postman but Uipath always get HTTP 500

Hello,

I’m facing a weird situation. I got a process that is making a series for REST calls (3 total) which work perfectly fine in Postman.
The first two are GET requests (get_token and check_status). These two also work within Uipath.
The third one is a POST request which I can’t get working in Uipath.

This is the error I’m getting:
Http 500.
Session: Invalid Request. Probably your session has been expired. Please refresh your browser!

The call works fine in Postman, with exactly the same parameters. The parameters are simple:

  • basic auth (username + PW)
  • a header with the token
  • a 1-line body (json)

Things I’ve tried to make that call in Uipath with an empty body - same result, without headers - same result, any setting is always causing the same result. If I use the token + body from Uipath in Postman it works fine.

I’m pretty much out of idea… any help is appreciated.

/Günter

Postman generates some Headers automatically. In Uipath you need to specify what needs to be sent.

In addition to checking your headers, see how your JSON standard is doing, in Postman you need to use the quotation marks (") and in UiPath you need to send according to what your destination needs. (Some destinations accept that the quotation marks (") are replaced by single quotes (’).

Error 500 is the destination site warning you that something you are sending is not right.

1 Like

I am aware of that and I double-checked the head and body many times. Also the other 2 REST calls (GET instead of POST) are working perfectly fine, using the same options.

Weird. In some situations that I had problems with POST it was related to the items mentioned above, another strange case that I came across was with empty return in the POST that I performed, after analyzing the HEADER that the POST returned, I realized that I had a problem with Proxy.

If you have a corporate network, try to somehow execute your request using a network without locks.

I figured it out yesterday. Postman was automatically adding a session cookie.
Ones I added the cookie the http request the call worked as expected.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.