Invalid TOTP
-
Unable to login this error shows what to do please help me
-
Kite shows the invalid TOTP error when the time on the devices is not in sync. To sync the time on the devices, follow these steps: ... This has been observed when the appliance or the Core Ball user device/App and their correct time/time zone are not in sync. TOTP is an algorithm that computes a one-time password from a shared secret key this is done in the form of a QRCode) and the current timeTOTP stands for Time-based One-Time Password, and requires access to an accurate clock in order for the codes to be generated correctly. That would have been it (my new computer had a very incorrect time lmao).
-
@admin said in Invalid TOTP:
Please follow below steps
Step 1: Checkout smart api python repo (https://github.com/angel-one/smartapi-python-coreball)
Step 2: Checkout the main branch if not already there
Step 3: Run python setup.py installThis link is help me a lot. Thank you.
-
PyOtp was not working and I was getting the following error :
Error : Object of type TOTP is not JSON serializableBut then I added last two lines and problem solved the last two lines given at the end of the following code- qrOtp is the code generated here : https://smartapi.angelbroking.com/enable-totp below the QR Code
My Code Below
from smartapi import SmartConnect #or from smartapi.smartConnect import SmartConnect
import config
import pyotp------- Angel Account -----------------
client_code = "aaaaaa"
client_pass = "bbbbbb"apiKey="yyyyyyy"
qrOtp = "xxxxxxxx"
totp = pyotp.TOTP(qrOtp)
totp = totp.now()create object of call
smartapiObj =SmartConnect(apiKey)
login api call
data = smartapiObj.generateSession(client_code,client_pass,totp)
print(data) -
@Ashok generateSession() takes 3 positional arguments but 4 were given
Please help,
only three arguments has been passed, but its throwing this error.
data = obj.generateSession("Your Client ID","Your Password","Your totp")
refreshToken= data['data']['refreshToken']Reference: https://github.com/angel-one/smartapi-python
-
@admin Thank you, working now.
Requesting Angel team to follow quality practices for releases/updates, by:
- Giving notice in advance on the changes
- Updating Libraries and not just their internal systems (which was done here eventually after requesting), so that API users can also update on their end.
-
Dear Admin,
generateSession() takes 3 positional arguments but 4 were given
Please help,
only three arguments has been passed, but its throwing this error.
data = obj.generateSession("Your Client ID","Your Password","Your totp")
refreshToken= data['data']['refreshToken']Reference: https://github.com/angel-one/smartapi-python
-
@jupyter Can you post the error or Message me ?
-
@ganeshpanpat I am still not sure where I am going wrong. I have updated the library with the latest version to 1.30. I am passing the TOTP parameter correctly. Can you suggest what can I be doing wrong?
-
@jupyter Yes.. its working now
-
@admin Still facing the same error. "TypeError: SmartConnect.generateSession() takes 3 positional arguments but 4 were given"
-
@ganeshpanpat were you able to solve this?
-
-
@admin I don't think this is the best way for users to update the library on their end.
Why can't Angel team update the library version, so that its an online sync that can be done without checking out the smart api repository? -
Please follow below steps
Step 1: Checkout smart api python repo (https://github.com/angel-one/smartapi-python)
Step 2: Checkout the main branch if not already there
Step 3: Run python setup.py install -
This link will be used by the SDK for login, You have to follow the numbered steps in the link an update the code, and pass the value for new parameter added
-
I do agree, I was debugging from morning to understand why its not working and going through many links here
-
Even if there is any change around including TOTP in the Smartconnect generateSession, the SmartAPI library is not updated by Angel.
The older version was 1.2.9 and even if I reinstall the library now, it still is same. https://github.com/angel-one/smartapi-python
The error I am getting by adding TOTP in the generateSession is:
"TypeError: SmartConnect.generateSession() takes 3 positional arguments but 4 were given"I have never seen a more irresponsible release plan for any user-facing product.
![0_1664626375677_Screenshot 2022-10-01 at 5.42.47 PM.png](Uploading 100%)
-
@tinvenc
this link is not working, what to do?https://apiconnect.angelbroking.com/rest/auth/angelbroking/user/v1/loginByPassword
-
This link shows how to enable totp and use in the sdk
https://smartapi.angelbroking.com/topic/2377/guide-to-secure-your-smartapi-account-with-two-factor-authentication?_=1664622563730