Setup · 20 Sept 2026 · Updated 15 Oct 2026 · 4 min read
Getting your Dhan access token
Where to find it, how to link it, and what to do when it expires.
By Tikam Chand, Founder, EchoTrade
24h
valid for
EchoTrade connects to Dhan with an access token. It takes a minute to set up.
Generate the token
- 1Log in to web.dhan.co.
- 2Open My Profile, then DhanHQ Trading APIs.
- 3Whitelist your static IP, the one listed on EchoTrade's Static IPs page (how static IPs work). Do this before generating the token: under SEBI's algo rules, Dhan only accepts API orders from a registered IP.
- 4Generate an access token. Leave the postback URL blank.
- 5Copy the token.
Link it in EchoTrade
Go to Accounts, choose Link account, pick Dhan and paste the token. It's checked with Dhan straight away, and the account name and client ID fill in by themselves.
When it expires
Tokens last about a day. When one lapses, the dashboard shows a banner naming the account. Generate a new token and paste it from the account's menu under Edit or update token.
Your token is encrypted before it's stored and is never shown again.
"DH-905 Invalid IP" after whitelisting
If orders are rejected with DH-905 even though the IP is on your whitelist, the token was most likely generated before you saved the IP. Dhan seems to tie the whitelist to the token, so generate a new token and paste it in. The error usually clears straight away.
FAQ
How long does a Dhan access token last?
About 24 hours. Generate a new one each trading day and update it in EchoTrade.
How do I fix Dhan error DH-905 Invalid IP?
Make sure the IP is whitelisted in DhanHQ Trading APIs, then generate a fresh token. Tokens created before the IP was added stay blocked.
Is it safe to paste my Dhan token?
EchoTrade encrypts it with AES-256 before storing it and never displays it again. Dhan also rejects orders that don't come from your whitelisted IP.
Try it yourself
Put this guide to work on your own accounts.
Link a master and a follower, place one order, and watch the copy land.
- Free plan, no card needed
- Zerodha & Dhan
- Cancel anytime