invalid token error python
-
{'success': False,
'message': 'Invalid Token',
'errorCode': 'AG8001',
'data': ''}this error is showing what should i do...?
-
@whemant thank youuu so so much, i have same issue, thanks for helping.
-
@divy1520 I managed to fix this error. My code was not able to generate the feedToken. Check if your code is generating the feedtoken correctly.
obj = SmartConnect(api_key="API_KEY")
data = obj.generateSession("CLIENT_ID","PASSWORD")
feedToken = obj.getfeedToken()This is how you generate a feedtoken.
do a print(feedToken), if it is None, check values in the data - print(data).
For me, it was showing a message that my password was expired. I changed my password in trading portal and the code worked fine. I got to know that the password has a validity of one year. Trading portal does not show this error, but API does.
-
-
@divy1520 you can check symbol tokens in https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json
-
@whemant hey can you please tell me how i can check the symbol token...?
-
Hello @admin , any updates on this issue. I am also getting this error from last couple of days. I have checked the symbol token I am using is correct.