Hi,
I’m using this URL to login and get the access code:
And then using this code to get the access token:
url = “https://api.upstox.com/v2/login/authorization/token”
payload={}
headers = {
‘Content-Type’: ‘application/x-www-form-urlencoded’,
‘Accept’: ‘application/json’
}
params = {
“code”: “{access code}”,
“client_id”: f"{UPSTOX_API_KEY}“,
“client_secret”: f”{UPSTOX_API_SECRET}“,
“redirect_uri”: f”{redirect}",
“grant_type”: “authorization_code”
}
response = requests.post(url, headers=headers, params=params).json()
access_token = response[‘access_token’]
print(access_token)
Is there any method using which I can get the access code without having to manually login every day?