HTTP Request does not send authorization info correctly

I have to use a HTTP Request Activity to call an api.
It uses simple http authentication, but the reponse is “Authentication data missing”
I have tried not selecting the authentication in the activity, and base64encoding it my self, and adding it to a variable that i can use in multiple calls.

everything i’ve tried gives the same result, except when i do it in postman it just works.

I am pretty new to UiPath, having mostly worked in BluePrism before.

Any help is much apreciated.

@lasr

Change Authentication type from here and provide the credentials

image

I have already tried that. and the result is the same.
“Authentication data missing”

Gives me this result.
Status 401
“{"detail":"Anmeldedaten fehlen."}”

Hi @lasr

It’s indicates that the server is rejecting your request due to insufficient or incorrect authentication. Verify that you are using the correct authentication method required by the API or test in POSTMAN.

If you found helpful, feel free to tick as a solution.
Happy Automation

Thanks for your reply.

In postman i get an answer using Basic Auth.
With the same information as typed into the simple HTTP authentication in UiPath.

I will try to look into your suggestion

@lasr Try to copy the cURL code snippet from Postman and import in Http Request activity.

Hi @iampnkz

Thanks for your reply.

I have tried to copy the cURL from postman and it gives the exact same result.

Does anyone know if i somehow can see the request being sent.
That is possible in Blue Prism, that could perhaps help me track down why my login info is not being sent or declined.

Hey @lasr

If you mock the data for a test, you can use a website like https://webhook.site to investigate how the requests look like when sent from studio and from postman for a comparison.

@loginerror

I actually fixed it. Not sure why yet.
But here is what worked.
The username and password could not be variables, even if they are the same it wont work.
Also i had to end the endpoint with ‘/’ for it to work, otherwise it rejected my login credentials.
Also the project had to be an ‘UrlSegment’ but it works and i am not touching that again till it breaks :smile:

@prashant1603765 @Pankaj_21 @iampnkz
Thanks for every input.

1 Like

Great @lasr
Yes sometime happens.
Thanks

Happy Automation