Hello Team ,
New bie here.
My authorization requests turns out to be successful , but while
I am trying to fetch option chain data by using the code used in the examples
url = ‘https://api.upstox.com/v2/option/chain’
params = {
‘instrument_key’: ‘NSE_INDEX|Nifty 50’,
‘expiry_date’: ‘2025-01-30’
}
headers = {
‘Accept’: ‘application/json’,
‘Authorization’: f’Bearer {{access_token}}’
}
response = requests.get(url, params=params, headers=headers)
print(response.json())
I am getting the following error
status’: ‘error’, ‘errors’: [{‘errorCode’: ‘UDAPI100050’, ‘message’: ‘Invalid token used to access API’, ‘propertyPath’: None, ‘invalidValue’: None, ‘error_code’: ‘UDAPI100050’, ‘property_path’: None, ‘invalid_value’: None}]
Please help me to fix the error