[RESOLVED] Need Help! In place new order API is failing in Sandbox but works in live API

I am using the below curl to place an order in sandbox mode, and I get the following response.
{
“errorType”: “Input_Exception”,
“errorCode”: “DH-905”,
“errorMessage”: “Missing required fields, bad values for parameters etc.”
}

But the same curl works when i use ‘<DHAN_API_URL>/v2/orders‘ host.

POST ‘<SANDBOX_URL>/v2/orders’
–header ‘Accept: application/json’
–header ‘Content-Type: application/json’
–header ‘access-token: <access_token>’
–body '{
“dhanClientId”: “<CORRECT_CLIENT_ID>”,
“correlationId”: “12a3bcd4”,
“transactionType”: “BUY”,
“exchangeSegment”: “NSE_FNO”,
“productType”: “INTRADAY”,
“orderType”: “LIMIT”,
“validity”: “DAY”,
“securityId”: “51475”,
“quantity”: 35,

“price”: 207.0

}

can anybody help with this?

Hi @Rohith_Kumar

Make sure you are using the right token or correct security id. This error occurs only when the inputs are wrong.

Hi @Naman , thanks for your reply.
I intentionally tried giving wrong access token or clientId. In that case, I get below error not the bad parameters error.

{
“errorType”: “Invalid_Authentication”,
“errorCode”: “DH-901”,
“errorMessage”: “Client ID or user generated access token is invalid or expired.”
}

Could you please check on this?