Navigation

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

    Re-use token not working for smartconnect.

    Python SDK
    0
    3
    23
    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.
    • T
      thiyagaraaj last edited by

      Re-use token not working for smartconnect.

      I am saving the tokens in my database during first login but when i try to re-use the token next time it is not working. I tried the following:
      obj.setRefreshToken(<previously fetched refresh token>)
      obj.setFeedToken(<previously fetched feed token>)
      obj.setAccessToken(<previously fetched JWT token>)

      still i get error as invalid token.
      Previous blogs have broken links and no proper information. Kindly respond. thanks!

      M 1 Reply Last reply Reply Quote 0
      • M
        Moderator_2 @thiyagaraaj last edited by

        hi @thiyagaraaj

        Apologies for delayed response.
        JWT token gets expired every 24-28 hrs and we require to the client to login everyday to consume the smartAPI. Please fetch the recent token after login and let us know if the issue still occurs.

        Thanks & Regards,
        SmartAPI team

        1 Reply Last reply Reply Quote 0
        • P
          pkrawat1 last edited by

          @thiyagaraaj token expires automatically and need to relogin again.
          In my case, I have implemented totp verification with the totp secret, which helps me login everyday automatically. You can try it too. https://pyauth.github.io/pyotp/

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