Login API not working


  • 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.


  • @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


  • @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.