Zerodha API IP Not Whitelisted — Fix Kite Connect Origin Errors
Zerodha Kite says IP not whitelisted or TokenException after a working session? Check exit IP, Kite whitelist field, and HTTP proxy 443 on REST plus KiteTicker.
What Zerodha is actually checking
Kite Connect compares the public IPv4 of each HTTPS call with the address in developers.kite.trade → My Apps → IP Whitelist. If you saved yesterday’s home broadband address, or the bot skipped the proxy for one thread, you get IP-not-whitelisted or a TokenException that looks like an auth bug.
Confirm the exit IP Kite sees
Run this from the same process that calls kite.place_order — not from a different terminal without the proxy:
That string must match the Kite whitelist field exactly. Do not TLS-handshake port 443 — it is HTTP CONNECT, not the website.
Kite-specific failure modes
- KiteConnect REST used the proxy; KiteTicker opened a raw WebSocket and Zerodha saw a second IP.
- Access token was generated at home, then the bot started on a VPS without proxy env vars.
- IPv6 plan used while the Kite field only accepts IPv4 — confirm in the portal before paying for IPv6.
- Jio/Airtel blocked 8088/1080 so the proxy never connected and traffic left on the machine IP.
Fix that stays overnight
Allocate a dedicated Algo-IP IPv4 (₹200/month) after KYC. Paste it once into the Kite app. Set HTTPS_PROXY for the whole process before you import kiteconnect. Walk through the dedicated setup page at /brokers/zerodha and the older whitelist guide if you need screenshots of the portal.