Connect a broker · Upstox
You create an OAuth app in your Upstox account, and it gives you a client id and secret. You approve the login once a day and the token lasts until half past three the next morning.
client_id, and an API secret, the client_secret. Copy both.api.upstox.com/v2/login/authorization/dialog, you sign in and approve, Upstox returns a single-use code to your redirect URI, and While25 exchanges that code for an access token behind the scenes.The access token expires at 3:30 AM IST whatever time Upstox issued it, and Upstox offers no refresh token. Expect to approve once each trading morning.
An access token belongs to your account and can place orders. Treat it like a password and let the platform hold it rather than copying it around.
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.
Use the sandbox. It answers order calls without touching your positions.
Also on Zerodha? The Zerodha guide is the same shape. For a risk-free first look at the platform, Alpaca paper takes five minutes.