4. Configuring 2FA
Zerodha Kite web-based login no longer supports pin based authentication and is replaced by Two-Factor-Authentication (2FA), AutoCDSL has also updated with the same.
Last updated
Zerodha Kite web-based login no longer supports pin based authentication and is replaced by Two-Factor-Authentication (2FA), AutoCDSL has also updated with the same.
Last updated
A minimal change in the lambda function python file is only required.
Navigate to your Zerodha Kite page, click on your profile followed by Settings -> Password & Security
Navigate to the bottom and you will see as below
3. Click on Enable external TOTP, you will need to perform a Kite Verification in which an email consisting of a security pin will be sent to your email. After verifying you will see the QR Code
4. (I mportant Step ) You will have an option to copy the Secret Key as shown below , Click on 'Copy the key' and save it in a notepad/clipboard as we will use this later.
5. If you are already using Google Authenticator you would know how to register Kite by in Google Authenticator, otherwise you can install the App from here.
6. Open Google Authenticator and select the + symbol following the 'Scan a QR Code' option.
7. Now you can enter the TOTP in the Google Authenticator App in the Kite windows as well as your login password to enable 2FA
8. This enables the 2FA for Kite Web , now we need to update AutoCDSL deplyoment in the AWS Lambda to replace Kite PIN with TOTP based login. For that Navigate to AWS Console -> Lambda
-> Functions -> AutoCDSL
9. Under the lambda_function
section replace the content of lambda_function with the code from the GitHub repository below ( CTRL + C -> CTRL + V )
https://raw.githubusercontent.com/CasCard/AutoCDSL/main/lambda_function.py
10 . Now your lambda function is reflected with the updated code. If you are not using the configurations.py
and using environmental variables (recommended) you can skip this step .
Load your credentials with the secret key that you have copied earlier in the clipboard , you can add one more line in that file to use the secret key , it should look like this
KITE_SECRET="Your Kite 2FA Secret String"
for example KITE_SECRET="QHYPE7F72SWPK2EJDCSOWFKR4V73O43AFPK3FBNXMOEM6HCRHXRQ"
11. If you are using the environmental variable to load your credentials/passwords, you can add one more variable as KITE_SECRET with the value you copied to the clipboard.
12. Once you have updated the parameter navigate back to the lambda_function.py
and click on Deploy followed by Test.
13. Volia! We are done! Under the Execution result, you can see the TOTP at that instant and the Success message, you might have received a message from CDSL as well.
If you found this documentation and setup useful for your investing journey, please do consider making a donation, so that I can make more contributions to the open source community and build powerful applications in terms of both software and hardware to serve our community.
UPI ID : abelcd.xyz@paytm
Support and Donation