INVALID TOTP, ERROR CODE AB1050


  • Traceback (most recent call last):
    File "E:\ALGO\ANGEL_ONE\ltp.py", line 16, in <module>
    refreshToken = data['data']['refreshToken']
    TypeError: 'NoneType' object is not subscriptable
    {'status': False, 'message': 'Invalid totp', 'errorcode': 'AB1050', 'data': None}


  • Hi @piidus,
    I think you need to provide correct TOTP code in following line of code:
    obj.generateSession("","","totp") # (if you are trying similar code )