errorCode': 'UDAPI10000', This request is not supported by Upstox API

Below is my Python code, giving errorCode’: ‘UDAPI10000’, This request is not supported by Upstox API

import urllib.parse
import pandas as pd
import requests

apikey = ‘’
secretkey = ‘’
url1 = urllib.parse.quote(‘https://127.0.0.1:5001/’)

url = ‘https://api-v2.upstox.com/login/authorization/token
code=‘’
headers = {
‘accept’: ‘application/json’,
‘Api-Version’: ‘2.0’,
‘Content-Type’: ‘application/x-www-form-urlencoded’
}
data = {
‘code’: code,
‘client_id’: apikey,
‘client_secret’: secretkey,
'redirect_uri ': url1,
‘grant_type’: ‘authorization_code’
}
response = requests.post(url, headers=headers, data=data)
jsonresponse = response.json()

jsonresponse

@anil_chorghe

Please pass the redirect_uri as is without encoding.

Let us know if that works.

Thanks!!

Thanks Shanmu, the issue is sorted