HTTP Post Request error


Refer this link,

it has all the details, still need any assistance let me know


Thanks for reply

But I am using simple HTTP reuqest

Could you please confirm that I am sending Body data is in correct format or not?

Really big thanks for your helpAPI_Test.xaml (8.2 KB)


When I am tying to open the xaml, I am getting this error
Could not find type ‘HttpClient’ in namespace ‘’. Row: 63, Column: 10

1 Like

Please find the zip (1.9 KB)

same error only.

Hi Sarathi ,

one question.

Is following syntax is correct for HTTP Request Body?


Build your request using the http request builder and check whether that is working or not, I am not sure from where your are building the request body you are mentioning here


Hello Sarthi,

Please find the attached updated .xaml files.

Could you please have look on it .

ThanksHTTP API (3.2 KB)

Hi @Rahul_S,

Am not sure whether you were able to resolve the issue.
But the spaces in the body are not supported by UiPath as valid.
Also, double quotes are supposed to be escaped by double quotes to ensure they are consumed as them.
So the required format should be:



@sarathi125 @Akanksha_Varshney
Thanks a lot for you support.

I have solved this one.

Hi @Rahul_S,

Could you please let us know how you solved it?
I am facing below error:
“Error: Request is not a valid JSON”



I have Composed Body data in following format:

> "{""filedata"":""data:image/jpeg;base64,"+abc+""",""filename"":""1234.pdf"",""doc_name"":""abc""}"

Hope you got this.

Or else please send body format you are following


1 Like

Hi @Rahul_S ,

Following are the formats that I tried, and they seem same as what you are using
(Diff between the two is one uses single quotes and the other uses double quotes - none of them seem to be working for me!)
“{“‘default_phone_number”‘:null,”‘password”‘: “‘1234”‘,”‘email”‘:”‘”‘,”‘first_name”‘:”‘Joe”‘,”‘is_admin”‘: True,”‘last_name”‘:”‘Admin”‘,”‘permissions”‘:{“‘edit_apps”‘:True,”‘edit_cc_users”‘:True,”‘edit_data”‘:True,”‘edit_web_users”‘:True,”‘view_report_list”‘:,”‘view_reports”‘:True},”‘phone_numbers”‘:,”‘role”‘:”‘Admin”‘,”‘username”‘:”‘”‘}”


“{““default_phone_number”“:null,““password”“: ““1234”“,““email”“:”“”“,““first_name”“:”“Joe”“,““is_admin”“: True,““last_name”“:”“Admin”“,““permissions”“:{““edit_apps”“:True,““edit_cc_users”“:True,““edit_data”“:True,““edit_web_users”“:True,““view_report_list”“:,““view_reports”“:True},““phone_numbers”“:,““role”“:”“Admin”“,““username”“:”“”“}”



Could you please send Normal Body format without all those double quotes which you are using in Postman?

I will format it in proper way and will revert back to you.

Thanks @Rahul_S for helping out!

Tried with following formats, get the same error:
“{‘default_phone_number’:null,’password’: ‘qwer1234’,’email’:’’,’first_name’:’Joe’,’is_admin’: True,’last_name’:’Admin’,’permissions’:{‘edit_apps’:True,’edit_commcare_users’:True,’edit_data’:True,’edit_web_users’:True,’view_report_list’:,’view_reports’:True},’phone_numbers’:,’role’:’Admin’,’username’:’’}”

“{“default_phone_number”:null,”password”: “qwer1234”,”email”:””,”first_name”:”Joe”,”is_admin”: True,”last_name”:”Admin”,”permissions”:{“edit_apps”:True,”edit_commcare_users”:True,”edit_data”:True,”edit_web_users”:True,”view_report_list”:,”view_reports”:True},”phone_numbers”:,”role”:”Admin”,”username”:””}”

Following is the Postman body:
“password”: “qwer1234”,
“is_admin”: true,


Please try below format same as it is in Body

“{”“default_phone_number”“:”“null”“,”“password”“: ““qwer1234"“,”“email”“:”"””,”“first_name”“:”“AV”“,”“is_admin”“: ““True””,”“last_name”“:”“Admin”“,”“permissions”“:{”“edit_apps”“:”“True”“,”“edit_commcare_users”“:”“True”“,”“edit_data”“:”“True”“,”“edit_web_users”“:”“true”“,”“view_report_list”“:”“”“,”“view_reports”“:”“True”“},”“phone_numbers”“:”“”“,““role””:““Admin””,““username””:""”“}”

Please find the attached workflow for your reference.

Hope it will help.

HTTP Request.xaml (7.2 KB)

Hi @Rahul_S,

Thanks for checking in!
I tried your request body and ‘invalid json’ error has disappeared!
But new error is appearing as attached below:

The error should come only when the username in the request is already registered. The same username works perfectly fine in Postman. So not sure what else UIPath requires!


Please check that you are passing all valid parameters along with request like Username, Password, Auth Type, etc.

Hi @Rahul_S,

No parameters were required in this request. Authentication was fine too.
Was able to resolve by reading JSON through a test file.

Hi Rahul,

can you help me with the body data structure to attach a pdf containing form