I am trying to send a request via Postman to API,
Below is the request type which is accepted by API,
curl https://api.shoonya.com/NorenWClientTP/QuickAuth
-d "jData={ "apkversion": "1.0.0", "uid": "TRST", "pwd": "s3cur3Id", "factor2":
"31-08-2017", "imei": "134243434", "source": "API"}“
When I send JSON via Postman, it throws the error Invalid Input : jData is not valid json object
What is wrong with this request? Or how can I write JSON which has jData object?
2
Answers
You need to remove
"jData ="
from you message and try again.Also its better to post a json file with curl as below
For example:
Importing the curl command in to Postman (yes this would have been the easiest way for you to replicate it in Postman) sets the body content type to
application/x-www-form-urlencoded
notraw
as you have it your screenshot.Change the content type and the request should work.
On a side note the body content as you currently have it is not valid JSON and would fail to be parsed as such. Postman even has unbderlined
jData=
with a red squiggly line`The valid/correct JSON would be: