Auth Failures
Common symptoms
AuthenticationError
- profile/funds call fails right after startup
- token works in one session but fails in another
Fast checks
- Confirm broker id is correct (
zerodha or angelone).
- Confirm required config keys are present.
- Confirm token/session is still valid.
- Confirm auth mode is supported by broker.
Minimal test
from tt_connect import TTConnect
config = {"api_key": "...", "access_token": "..."}
with TTConnect("zerodha", config) as broker:
print(broker.get_profile())
Broker-specific notes
- Zerodha: manual token flow only.
- AngelOne: supports manual and auto; auto needs
client_id, pin, totp_secret.
What to do next
- refresh/recreate token
- verify system clock and TOTP secret for auto login
- turn off stale cached session and retry