Hi , I have created latest request token and try create Kiteconnect session using correct API_KEY. Access token and Secret key even though getting error like kiteconnect.exceptions.TokenException: Token is invalid or has expired. FYI.., I am using ubuntu 21.10 and python 3.9. Code:-
This shouldn't happen. Well,can you confirm that the line above the gen_ss ,where you declared 'data' variable is still a comment?? I can see a #. I mean you are not calling generate session twice,once when declaring 'data' and then 'gen_ss',right?? If you are not calling generate session twice,then only Sujith Sir,Rakesh Sir can help you.
You need to re-check if you are fetching the correct value from Jfile['Api_Secret'], it should be passed as string. You need to manually cross-verify data type(to be a string) and all values to be correctly passed for Jfile['Api_Key'], Jfile['Api_Secret'], and req_tocken.
Jfile['Api_Secret']
, it should be passed as string.You need to manually cross-verify data type(to be a string) and all values to be correctly passed for Jfile['Api_Key'], Jfile['Api_Secret'], and req_tocken.
I have printed the data type all are string.
print(type(Jfile['Api_Key']))
print(type(Jfile['Api_Secret']))
print(type(req_tocken))
op:-
Please fix the issue.
I am able to get access token and able to pull data.
Thank You!!