What is the proper format of Post Request's Request Body?

I am confused with the proper format of Post Request node’s configuration of Request Body,

This does not work (403 error).
But I tested on Postman, it works with form-data (key value one)

Hey there,

I think the constant body needs to be in JSON format:

{
"key": "value",
"key2": "value2",
}

Thanks for replying but it does not work.

403 Status code indicates that your request is received, but does not ger through. With Postman do you provide anything else other than your token that is visible in the screenshot to authenticate?

I tried Post request node with this dummy api and it worked when formatting as described above:

Finally it is resolved. (Thanks @MartinDDDD and KNIME AI Assistant)

We need to do the following:

Connection Tab:

  • Set the URL to the endpoint you are targeting

In Headers Tab:

Add the following headers:

  • Key: Content-Type, Value: application/x-www-form-urlencoded
  • Key: Accept, Value: application/json

In the Request Body section, enter the following key-value pairs with & operators:

 token=XXXXXXXXXXXXX&content=project&format=json&returnFormat=json

Just to mention here that this is applicable for any REDCap API call (fyi- REDCap is the most popular clinical research study data system.)

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.