Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. indrohit
    I
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Groups 0

    indrohit

    @indrohit

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    indrohit Unfollow Follow

    Latest posts made by indrohit

    • Error: Invalid totp

      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

      posted in Python SDK
      I
      indrohit