Navigation

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

    Guide to secure your SmartAPI Account with two factor authentication

    General Discussion
    0
    104
    1955
    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.
    • G
      gautamnaik1994 @admin last edited by

      @admin https://smartapi.angelbroking.com/enable-totp not opening

      P 1 Reply Last reply Reply Quote 1
      • I
        ivar last edited by

        1. Nse circular does not say that you have to use TOTP. This process will make things complicated and orders may fail. Because before placing the orders, the bot/server will have to check if the TOTP is valid or not and then wait/refresh for the latest TOTP. And with 30 second hash

        2. Simple solution is to have a one time otp for logging everyday.

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

          @admin Should User Add OTP every day? if yes then I think it is the End of Trading using APIs because no one wants to do the Same Process Again and Again.

          I think SEBI Circular is not Telling the OTP required for API Trading. it is only required to Login Account on a Web or Mobile App or Broker.

          1 Reply Last reply Reply Quote 0
          • A
            anil_patel last edited by

            @admin One Solution is to Provide the TOTP Via API by Sending the Username & Password of User.

            punit 1 Reply Last reply Reply Quote 0
            • A
              anil_patel @gautamnaik1994 last edited by

              @gautamnaik1994 I Agree, need something to Automate the Process.

              1 Reply Last reply Reply Quote 0
              • A
                Amit 0 last edited by

                How to enable TOTP

                1 Reply Last reply Reply Quote 0
                • P
                  priya @gautamnaik1994 last edited by

                  @gautamnaik1994 said in Guide to secure your SmartAPI Account with two factor authentication:

                  @admin https://smartapi.angelbroking.com/enable-totp not opening

                  1 Reply Last reply Reply Quote 0
                  • L
                    labeebta @gautamnaik1994 last edited by

                    @gautamnaik1994 If you are using python, you can use totp module to generate totp automatically

                    A I 2 Replies Last reply Reply Quote 0
                    • J
                      J300558 last edited by

                      Using smart api-Angel Broker plugin, include following js file

                      <script src="https://smartapi.angelbroking.com/common/v1.js"></script>

                      then passing api key; <smartapi-login href="#" data-smartapi="<api-key>">Login</smartapi-login>

                      How to solve with this integration?

                      1 Reply Last reply Reply Quote 0
                      • D
                        Durai @admin last edited by

                        @admin not open link

                        1 Reply Last reply Reply Quote 1
                        • A
                          anil_patel @labeebta last edited by

                          @labeebta what should be the Secret Key to Generate TOTP?

                          1 Reply Last reply Reply Quote 0
                          • L
                            luckymonu007 @admin last edited by

                            @admin It already 13:00 and the link still does not work. How can I access the API ?

                            1 Reply Last reply Reply Quote 0
                            • M
                              Meenavenkit last edited by

                              The link http://smartapi.angelbroking.com/enable-totp is not working @admin @administrators . Please help. already last 2 days your APIs never worked with all changes you did without proper testing.

                              Resolve this please.

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

                                @anil_patel @gautamnaik1994 @ivar @sachinchauhan @priya @labeebta @sachinsrm @Durai @luckymonu007 @Meenavenkit

                                https://smartapi.angelbroking.com/enable-totp is live now

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

                                  @admin The site is working but OTP is not working or sent to the email.

                                  1 Reply Last reply Reply Quote 0
                                  • A
                                    aj_Brk last edited by

                                    Hi folks

                                    If anyone looking for automating totp part , you can use the following python sample for the same. The secret here comes after validating on enable-totp url .

                                    from smartapi import SmartConnect # or from smartapi.smartConnect import SmartConnect
                                    import pyotp

                                    import smartapi.smartExceptions(for smartExceptions)

                                    create object of call

                                    obj = SmartConnect(api_key="your api key here ")

                                    login api call

                                    totp = pyotp.TOTP(s='secret key in qr uri after qr generation')

                                    attempts = 5

                                    while attempts > 0:
                                    attempts = attempts-1
                                    data = obj.generateSession("Your client id ", "your password ", totp.now())
                                    if not data['message'].contains('Invalid totp'):
                                    break
                                    time.sleep(2) ###rate limiting might block if we try immediately

                                    refreshToken = data['data']['refreshToken']

                                    A B M W G 5 Replies Last reply Reply Quote 0
                                    • A
                                      aj_Brk @gautamnaik1994 last edited by

                                      @gautamnaik1994 I have provided a sample code below. You can give it a shot. Worked for me .

                                      N 1 Reply Last reply Reply Quote 0
                                      • A
                                        anil_patel @aj_Brk last edited by anil_patel

                                        @admin @aj_Brk can you tell me how to Create a Secret Key Based on the User ID & Pass of the User?

                                        A 1 Reply Last reply Reply Quote 0
                                        • A
                                          aj_Brk @anil_patel last edited by

                                          @anil_patel I generated it here - http://smartapi.angelbroking.com/enable-totp . It is printed below QR code

                                          A P 2 Replies Last reply Reply Quote 0
                                          • A
                                            anil_patel @aj_Brk last edited by

                                            @admin @aj_Brk Thank you but I want the user to Login without Generating TOTP. so users only add their User ID & Pass and based on that Python will generate the Secret Key to generate TOTP.

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