Scenario: The objective is to create, in UiPath Studio, a workflow that simulates a login to an api and from that login to obtain the response headers of a sign_in api.
The response headers to get are: Access-Token, Client and Uid.
So far I haven’t found a concrete answer for what I want, since the only headers I’m getting through an HTTP Response to the sign_in API are: Transfer_Encoding, Connection, X-Frame-Options, X-XSS-Protection, X-Content-Type-Options, X-Download-Options, X-Permitted-Cross-Domain, Refferrer-Policy, X-Request-Id, X-Runtime, Vary, Cache-Control, Content-Type, Date.
Here is an example of what I want to get using UiPath Studio:
You can try to get the Headers using the Headers property in HTTP Request Activity Output Section.
It will give you the data in a Dictionary type of format which you can use freely in the workflow.
I have a few questions about this case because it’s no longer making any sense
First question is: In my HTTP Request, why can’t I put the email and password on the Body Section and have to turn them into parameters to stablish the connection?
Here is an example:
If I put the email and password as parameters then it returns 200 code and connects to the API but if I try to do the same I do in Postman (on the Body section) it doesn’t return anything but error like this:
Second question is: I tried to use Headers, Content and Attachment but it doesn’t return anything like I have on Postman (the picture in my first comment where I have Client, Access-Token and Uid Headers), why?
Here is an example of what it returns as Headers:
I haven’t worked extensively with the API Calls but back when I have used API calls, we too were passing the email and password through parameters.
May be that’s the way how this API is built, that it’ll take details from Parameters.
But for the Headers, you should definitely be getting something in return, can you try to loop through the items retrieved in Headers, can you check the count of items first, whether it has something or not.
The thing is, if I put the email and password as parameters then they can’t change dynamically, or not?
I want this API to receive an email and password before it gives the headers and the login credentials will be in cycle (I have three credentials, for example, and they will be in recurrent loop).
Hello
I have this loop created and it just returns these headers: Transfer_Encoding, Connection, X-Frame-Options, X-XSS-Protection, X-Content-Type-Options, X-Download-Options, X-Permitted-Cross-Domain, Refferrer-Policy, X-Request-Id, X-Runtime, Vary, Cache-Control, Content-Type, Date.
As you can see in the main post, I want to receive the Access-Token, Client and Uid but for some reason I can’t get these headers and only some of them. The question is, why can I receive them on Postman and not in UiPath? I don’t know, it can be something little and we don’t know