This request is not supported by Upstox API - Indicates that the API call made was invalid or unrecognized. This could be due to improperly formatted URL, invalid headers values or the inclusion of unexpected characters in the URL.It’s recommended to review your headers once. Here
Below is the correct code for generating the access token, which has been thoroughly tested and verified as functional.
I noticed that you’re still using the previous URL. As mentioned in the changelog at Changelog | Upstox Developer API. It’s advised to switch the API base URL to https://api.upstox.com/v2/ from the existing https://api-v2.upstox.com. It’s important to mention that the error you are facing is not related to the url change.