πŸ”‘ Tokens & Authentication

Q1. What is an access token, and what’s new about it?

The access token now comes from the Neo app/web β†’ Invest β†’ TradeAPI β†’ API Dashboard (not via /oauth2/token). Send it as a plain string (no Bearer). Resetting it immediately invalidates all sessions.

Q2. What happens if I reset the token?

All active sessions break instantly. Re-login (TOTP β†’ MPIN validate) to obtain new session token (Auth) and session sid (sid).

Q3. Demystify tokens: access token, view token, session token (trade token), view sid, session sid, neo-fin-key


⏱️ Login & baseUrl

Q4. What are the login endpoints (fixed)?

Q5. Is baseUrl static or dynamic?

It’s stable for the day and even after that rarely changes. Always capture it after MPIN validate and use it for that session.

Q6. Which APIs need baseUrl?

All post-login APIs: Orders, Reports, Portfolio, Limits, Margins, Quotes, Scripmaster. (Only login endpoints are fixed.)

Q7. Show me how to replace {{baseUrl}} with a real example.