Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    Invalid TOTP

    General Discussion
    0
    29
    380
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      admin @mihirshah2500 last edited by

      Hi @mihirshah2500

      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

      M J V 3 Replies Last reply Reply Quote 0
      • M
        mihirshah2500 @admin last edited by

        @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?

        A 1 Reply Last reply Reply Quote 0
        • A
          admin @mihirshah2500 last edited by

          @mihirshah2500 @tinvenc @cpsingh @priya @rakeshnp @Ashok

          Totp changes have been deployed in the latest python release 1.3.0
          Please use the following command to upgrade to the latest python release
          pip install smartapi-python --upgrade

          M 1 Reply Last reply Reply Quote 0
          • J
            jupyter @ganeshpanpat last edited by

            @ganeshpanpat were you able to solve this?

            G 1 Reply Last reply Reply Quote 0
            • J
              jupyter @admin last edited by

              @admin Still facing the same error. "TypeError: SmartConnect.generateSession() takes 3 positional arguments but 4 were given"

              1 Reply Last reply Reply Quote 0
              • G
                ganeshpanpat @jupyter last edited by

                @jupyter Yes.. its working now

                J 1 Reply Last reply Reply Quote 0
                • J
                  jupyter @ganeshpanpat last edited by

                  @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?

                  punit 1 Reply Last reply Reply Quote 0
                  • punit
                    punit @jupyter last edited by

                    @jupyter Can you post the error or Message me ?

                    B 1 Reply Last reply Reply Quote 0
                    • B
                      Balaji27 last edited by

                      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

                      1 Reply Last reply Reply Quote 0
                      • M
                        mihirshah2500 @admin last edited by

                        @admin Thank you, working now.

                        Requesting Angel team to follow quality practices for releases/updates, by:

                        1. Giving notice in advance on the changes
                        2. 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.
                        1 Reply Last reply Reply Quote 0
                        • B
                          Balaji27 @punit last edited by

                          @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

                          1 Reply Last reply Reply Quote 0
                          • W
                            webseos last edited by webseos

                            PyOtp was not working and I was getting the following error :
                            Error : Object of type TOTP is not JSON serializable

                            But 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)

                            1 Reply Last reply Reply Quote 0
                            • V
                              vaporsled @admin last edited by

                              @admin said in Invalid TOTP:

                              Hi @mihirshah2500

                              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 install

                              This link is help me a lot. Thank you.

                              1 Reply Last reply Reply Quote 0
                              • E
                                emmaagro last edited by

                                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).

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post