cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to convert x-www-form-urlencoded (Postman) to WebApi

Rufus
Level 2
Hi, anyone who knows how to "convert" my Postman POST command to BP Web api format?

In Postman, the keys are in Body as x-www-form-urlencoded.

Converted to CURL (it looks like this):
curl --location --request POST 'https://xxxx' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=xxx' \
--data-urlencode 'scope=xxx' \
--data-urlencode 'username=xxx' \

In BP Web api \ Request\ Body content \ Template, I have tried both format 'key1=[value1]'&'key2=[value2]' and JSON format like { "key1": "[value1]", "key2": "[value2]"} (Content-Type= application/x-www-form-urlencoded and application/json).

Both elternatives return HTTP 400 error (which is syntax error, I quess).



------------------------------
Ruben Gjelsten
Senior Analyst Service Management
SSV IIC RPA
Europe/London
------------------------------
30 REPLIES 30

Vijay.A
Verified Partner

@RonanConsidine - Would need your support on this ask

@shashank.kumar280 @ewilson Hey Team, Could you please help us here? We are stuck here from few days.

 

Can you please post your postman screenshot here?

VijayA_0-1749798173329.png

 

Do you have screenshot of BP configuration and the error you are getting?

Vijay.A
Verified Partner

Did you post BP config screenshot as well? I can't seem to find it.

VijayA_0-1749836377781.png

 

VijayA_1-1749836377782.png

 

VijayA_2-1749836377784.png

 

@Vijay.A @abinash.nayak - I faced the same issue recently. I resolved it by following the below steps.

  • Used Utility - HTTP vbo and HTTP Request action.
  • set Content Type as "application/x-www-form-urlencoded" and set the body value as "userid=<value>&password=<value>"

 

Both below tries are not working in Body value of http post request

Try#1

VijayA_1-1750146415665.png

 

 

VijayA_0-1750146227955.png

Try#2

Tried body

"username=vijay.a.thiagarajan@xx.com&password=qwerty1234"

@Athiban_Mahamathi can you build the body based upon username and password and share it here