Login failed: Invalid username or password
Last updated 1 July 2026
Login failed: Invalid username or password
This error means the broker trading account credentials you entered in AutoTrader Web are wrong. The wrong field could be the login id, password, security/2FA answer, or your broker's API key or secret. This is your broker's API key (the one you generate on the broker's developer portal), not your AutoTrader Web API key. To fix it, mark the account non-live, correct the credentials, validate, save, and mark it live again. If your broker says the API Key or Secret is not valid, regenerate them from the broker's portal and re-copy carefully — follow your broker's setup guide (for example Flattrade).
When this happens
- 1 The login id is wrong.
- 2 The password is wrong.
- 3 The security / 2FA answer is wrong.
- 4 The broker's API key or API secret is wrong.
Errors
This fix applies to these errors:
- Login failed: Invalid username or password
- 401: Unauthorized
- API Key not valid / Invalid API Key (brokers that use an API key + secret, for example Flattrade)
- Login Id/Password Is Invalid (Motilal Oswal, error MOSL100)
- Invalid Credentials (Kotak Neo, code 900901)
- Invalid Input : Wrong Password (Finvasia Shoonya)
This “API key” is the one you generate on your broker’s developer portal, not your AutoTrader Web API key (for that, see API Key is wrong or user disabled).
Note for Kotak Neo: too many failed login attempts can lock your API access at the broker for a while. If you keep getting “Invalid Credentials”, stop retrying, fix the credentials first, and if needed wait before trying again or contact your broker to unlock it.
Solution
1. Mark your trading account non-live
- Go to menu (Accounts -> Trading Accounts).
- Select the row of your account.
- Click the Non-live button at the top.
2. Unblock the account if needed
If your trading account is blocked, first unblock it from your stock broker’s trading terminal or website.
3. Confirm you can log in at your broker
Make sure you are able to log in to your stock broker’s trading terminal or website with the same credentials.
4. Update your credentials
- Go to menu (Accounts -> Trading Accounts).
- Click the small EDIT icon next to your trading account’s client id or login id.
- Enter or correct your login credentials.
- Note: If you are not sure about certain fields, click the Help link at the bottom of the account edit screen.
- Click Validate.
- On successful validation, the system will ask you to Save the details. Click save.
If the API Key or Secret is not valid
If the error points to the API Key or API Secret, these come from your broker’s developer portal, so correct them at the source:
- Open your broker’s setup guide from Supported brokers — for example the Flattrade setup guide.
- Follow it to generate a fresh API Key and API Secret, then copy each value exactly (no extra spaces).
- Paste them into the account (step 4 above), then Validate & Save.
5. Mark your account live
- Go to menu (Accounts -> Trading Accounts).
- Select the row of your account.
- Click the Live button at the top.
Related help
- Trading Accounts settings — where you add, edit, and validate accounts.
- Supported brokers — per-broker setup guides to regenerate your API Key and Secret.
- Validate trading account credentials — the validation step explained.
- Session expired — a related login issue.
- Failed to generate TOTP — if your 2FA/TOTP setup is the problem.