Upstox refused to complete the login. This usually means TOTP is not enabled on your Upstox account, or the TOTP key saved here is not your current one.
Last updated 29 September 2026
Upstox refused to complete the login (TOTP not enabled)
Upstox did not let your account connect. In most cases TOTP is not switched on in your Upstox account, even though a TOTP key was copied. Open Upstox, set up TOTP again, and make sure you click Enable TOTP at the end. Then save the new TOTP key in your trading account and validate it. If TOTP is already set up, wait 5 minutes and try again.
When this happens
- 1 TOTP is not enabled in your Upstox account. Many people copy the TOTP key but never finish the last step on the Upstox screen, so TOTP is never actually switched on at Upstox.
- 2 The TOTP key saved on your trading account is old. If you reset TOTP on Upstox later, the old key stops working.
- 3 Too many connection attempts in a short time. Upstox can refuse new attempts for a few minutes.
What this error means
Upstox did not allow your account to connect. Upstox does not say why, but in almost every case TOTP is not switched on in your Upstox account.
This can happen even when your PIN, phone number, API Key and API Secret are all correct. It can also happen when a TOTP key is already saved on your trading account, because a copied key does nothing until TOTP is enabled at Upstox.
You may have seen this error earlier in its older form, as an Invalid request message with the code 4000001. It is the same problem.
How to fix it
Step 1: Enable TOTP in your Upstox account
- Log in to Upstox and open Time-based OTP (TOTP).
- If TOTP is not enabled, click Enable TOTP. If it is already enabled, click Reset TOTP.
- Click Unable to scan, click to copy the key and save the key in notepad.
- Add the key to an authenticator app on your phone (such as Google Authenticator).
- Enter the 6-digit code from the app and click ENABLE TOTP.
The last click matters. If you close the screen without clicking ENABLE TOTP, TOTP stays switched off and this error keeps coming back.
Step 2: Save the new key in AutoTrader Web
- Go to Accounts → Trading Accounts and edit your Upstox account.
- Paste the new TOTP key.
- Click Validate, then save.
The full setup, with screenshots, is on the Upstox setup page.
If TOTP is already set up
Wait 5 minutes and try again. Upstox can refuse new attempts for a short time after many tries in a row.
Still not working?
If TOTP is enabled, the new key is saved, and the error still appears after 5 minutes, please contact us with your Upstox client id and we will check it for you.