An OAuth app in your Upstox account gives you a key and a secret. You approve the login once a day.
Before you start
http://127.0.0.1:8000/callback/. It must match later, exactly.client_id) and an API secret (the client_secret). Copy both.The access token expires at 3:30 AM IST whenever it was issued, and there is no refresh token. Approve once each trading morning.
What you copied
An access token belongs to your account and can place orders. Treat it like a password and let While25 hold it.
When it does not work
The URI sent and the URI registered differ: http against https, a missing port, a trailing slash. Make them identical.
An authorisation code is single use and lives about five minutes. Start the login again.
Tokens expire at 3:30 AM IST every day. Approve the login again in the morning; there is no refresh token.
Upstox has no paper mode in While25. Take a first look on Alpaca paper, then connect Upstox with small sizes.
Straight from Upstox
Also on Zerodha? The Zerodha guide is the same shape. For a risk-free first look, Alpaca paper takes five minutes.