Getting invalid auth code please help

curl --location ‘https://api-v2.upstox.com/v2/login/authorization/token
–header ‘accept: application/json’
–header ‘Content-Type: application/x-www-form-urlencoded’
–data-urlencode ‘code=test’
–data-urlencode ‘client_id=’
–data-urlencode ‘client_secret=’
–data-urlencode ‘redirect_uri=’
–data-urlencode ‘grant_type=Authorization Code’

The invalid authentication code occurs when an incorrect auth code is provided.

Please note that the code included in this request is valid for only one use, regardless of whether the access token generation is successful or encounters an issue.