Navigation

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

    Invalid TOTP Error Code AB1050

    Python SDK
    0
    2
    5
    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.
    • V
      vinaykush last edited by

      Hi Team,

      Why there is always problem with TOTP , even though you follow all the correct steps:

      pyotp.TOTP(token).now()

      Result:
      {'status': False, 'message': 'Invalid totp', 'errorcode': 'AB1050', 'data': None}

      M 1 Reply Last reply Reply Quote 0
      • M
        Moderator_3 @vinaykush last edited by

        @vinaykush

        Attaching a sample code for generating TOTP using pyotp.

        import pyotp as tp

        Define your secret key

        secret_key = "SECRET CODE HERE" # Replace this with your actual secret key

        Generate TOTP

        totp = tp.TOTP(secret_key)
        current_otp = totp.now()

        Regards,
        SmartAPI Team

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