How to send http request with body

Hello, I have an http request that I have successfully built in powerautomate and postman that requires a link with a body containing my username and password. But when I use the api call activities and put the required info in the body studio returns a 400 error.

Here is my postman that succesfully collects the api key


1 Like

@Nathan_Betters1
just configure the parameters properties as shown below, you can leave the body property blank

Hi @Nathan_Betters1 ,

Status 400 typically occurs while we are trying to send input in wrong format. Based on the screenshot I could find that you are sending raw body input as text format in postman so we are getting success 200

Could you pls make sure that in UiPath http request activity also you should use the body format as text/html and input your strong in the body attribute and let us know

Regards,
Kirankumar.

The postman required the credentials be in the body

In the body of uipath I used double quotes and pasted the raw body. There’s no html or anything

try something like this in the body then @Nathan_Betters1
"{""grant_type"":""password"",""username"":""abc""}"

example including use of variables:
"{""grant_type"":""password"",""username"":"""+in_username+"""}"