HTTP Request FormData Error (BC30370: ‘}’ expected) When Passing value in body in UiPath Studio Community Version

Could someone help me resolve the issue below?

In the HTTP Request (Web API) activity using the POST method, I’m unable to pass values in the body (key-value pair). It keeps throwing an error in my UiPath Studio Community version. However, the same configuration works perfectly on my colleague’s system (Enterprise trail edition).

I’m not sure why it’s failing only on my end.

Details:

Key: “input_data”
Value: “{”“requester”“:{”“first_name”“:”“Test User”“,”“email_id”“:”“testuser13@gmail.com”“}}”

When I enter the value and click Save, the activity throws this error:

“Argument ‘FormData’: BC30370: ‘}’ expected”

After that, when I reopen the key-value pair, the Value field only shows:

“{”

Testing this in Postman successful.

I’ve tried some basic troubleshooting steps, including reinstalling the Web API package, updating the package, testing the activity in a different project, and restarting UiPath Studio—but the issue still persists.

my current package details.

Could this be an issue specific to the Community version of UiPath Studio?

@sanjay_sudarsan This error is not actually about your API — it’s about how UiPath is parsing the value internally.

BC30370: '}' expected usually comes when UiPath treats your input as a VB expression, not as plain text. Your JSON is breaking because of quotes.

You’re passing JSON like:

{“requester”:{“first_name”:“Test User",“email_id”:"testuser13@gmail.com”}}

But in FormData (Dictionary<String, String>), UiPath expects a string, not raw JSON.

Solution:

Wrap your JSON properly as a string with escaped quotes:

“{”“requester”“:{”“first_name”“:”“Test User"“,”“email_id”“:”"testuser13@gmail.com”“}}”

Why it’s failing

The HTTP Request activity’s key-value pair UI (FormData field) in Community version has a parsing/escaping bug when handling complex JSON strings with nested quotes. The doubled quotes ("") for escaping aren’t being processed correctly by the UI, causing the JSON to get truncated (that’s why you only see {").

Fix (use this approach):

Instead of entering JSON in the key-value pair UI:

  1. Create a string variable to hold your JSON:
   input_body = "{""requester"":{""first_name"":""Test User"",""email_id"":""testuser13@gmail.com""}}"
  1. In HTTP Request activity:
  • Set Method = POST
  • Leave the key-value pair FormData empty
  • Find the Body property (not FormData)
  • Assign your variable: input_body
  • Set Headers = {"Content-Type": "application/json"}
  1. Test it — This should work.

Why your colleague’s Enterprise version works: Enterprise trial likely has bug fixes that Community version lacks. It’s a known limitation.

Hi @sanjay_sudarsan

Personally I think it is easier to build up the JSON-body using JObjects and JArrays, and then use .ToString when sending the HTTP Request body.
Of course it can be a bit of a hassle to keep track of the hierarchy of the object, but with some practice it gets easier.

Download file here: API Body.xaml (10.2 KB)

Regards
Soren

@sanjay_sudarsan You can resolve this by passing the request body as a serialized JSON string instead of adding key-value pairs directly in the value field.

Use the below format in the value field:

Newtonsoft.Json.JsonConvert.SerializeObject(New With {Key .requester = New With {Key .first_name = “Test User”, Key .email_id = “testuser13@gmail.com”}})

This converts the data into a valid JSON payload and works correctly with the POST method.

Also make sure:

This approach should work in Community edition as well.

If this resolved your issue, please mark it as a solution.