Navigation

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

    Login API not working

    Python SDK
    0
    3
    43
    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.
    • J
      Jagdeep last edited by

      I am getting the error while doing the login from the API:

      login error.jpg ---------------------------------------------------------------------------
      TypeError Traceback (most recent call last)
      Cell In[20], line 4
      2 obj=SmartConnect(api_key=apikey)
      3 data = obj.generateSession(username,pwd,pyotp.TOTP(token).now())
      ----> 4 refreshToken= data['data']['refreshToken']
      5 res = obj.getProfile(refreshToeken)
      6 res['data']['exchanges']

      TypeError: 'NoneType' object is not subscriptable

      Please help to sort this.

      F 1 Reply Last reply Reply Quote 0
      • F
        falconTrader @Jagdeep last edited by

        @Jagdeep your data object is not receiving anything.
        Check whether your provided credentials & TOTP are correct.
        if required for sake of testing, break down the steps into individual cells to debug.

        S 1 Reply Last reply Reply Quote 0
        • S
          sandipgk @falconTrader last edited by

          @falconTrader said in Login API not working:

          whether your provided credentials & TOTP are corre

          I am aslo facing same problem and I have checked that the information provided is correct

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