Navigation

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

    Error: Invalid totp

    Python SDK
    0
    2
    19
    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.
    • I
      indrohit last edited by

      I have activated TOTP today. I am getting Error: Invalid totp and getting following responce - Response: {'status': False, 'message': 'Invalid totp', 'errorcode': 'AB1050', 'data': None}

      my code is as follows
      from SmartApi import SmartConnect
      import os
      from pyotp import TOTP

      key_path = r"C:\Users\admin"
      os.chdir(key_path)

      key_secret = open("key.txt","r").read().split()

      obj=SmartConnect(api_key=key_secret[0])
      data = obj.generateSession(key_secret[2],key_secret[3],TOTP(key_secret[4]).now())

      it shows all other parameters correct in responce

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

        @indrohit TOTP is valid for only 30 seconds

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