Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. kksw599
    3. Posts
    K
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by kksw599

    • Smart API Login issue" or "Not able to login

      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'

      posted in Python SDK
      K
      kksw599