Not currently available
Not supported yet
There's no refresh-token or token-renewal endpoint in the Shoonya API — you cannot extend or silently refresh a susertoken before it expires. Once a session token expires or is invalidated, the only way to get a new one is to repeat the full login flow.
What to do instead
| Situation | What to do |
| Token has expired / API calls start returning auth errors | Re-run the full OAuth login flow (authorize → code → GenAcsTok checksum → new susertoken) to get a fresh token. |
| Automating login so you don't do this by hand daily | Use a scheduled headless login (e.g. Selenium-based) to fetch a new token on a timer or at market open, and store it wherever your app reads credentials from. |
| Long-running processes (bots, dashboards) | Handle auth-error responses defensively — catch them, re-run the login flow, and retry the failed request rather than assuming the token stays valid indefinitely. |
Planning around this?
If you're building something that needs a session to stay alive unattended for long periods, plan for scheduled re-login rather than a renewal call — the login flow itself is quick to automate (see the Manual Login (OAuth) page and the checksum calculator on that page).
Not currently available
There's no refresh-token or token-renewal endpoint in the Shoonya API — you cannot extend or silently refresh a
susertokenbefore it expires. Once a session token expires or is invalidated, the only way to get a new one is to repeat the full login flow.What to do instead
code→GenAcsTokchecksum → newsusertoken) to get a fresh token.Token lifetime
Planning around this?
If you're building something that needs a session to stay alive unattended for long periods, plan for scheduled re-login rather than a renewal call — the login flow itself is quick to automate (see the Manual Login (OAuth) page and the checksum calculator on that page).