Navigation

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

    Smart API Login issue" or "Not able to login

    Python SDK
    3
    3
    12
    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.
    • K
      kksw599 last edited by

      Hi , I am unable to login and getting the below error, please check and let me know the correct way to do it.

      [I 250422 17:51:26 smartConnect:124] in pool

      KeyError Traceback (most recent call last)
      Cell In[2], line 62
      58 writer.writerow([datetime.now(), action, spot])
      61 if name == "main":
      ---> 62 obj = login()
      63 while True:
      64 now = datetime.now().strftime("%H:%M")

      Cell In[2], line 17, in login()
      14 obj = SmartConnect(api_key=apiKey)
      16 data = obj.generateSession(client_id, pin, totp)
      ---> 17 print("🎉 Login Successful! Access Token:", data['data']['access_token'])
      19 return obj

      KeyError: 'access_token'

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

        @kksw599 login is working fine, please check your code, and ensure you are fetching correct TOTP.

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

          I am also using python based APIs, it works nicely to me from past 8 months. Even every operation is done without error.

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