Navigation

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

    invalid TOTP error errorcode":"AB1050" with java

    NodeJS SDK
    0
    6
    49
    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.
    • D
      dipeshbodas last edited by

      @admin
      Getting error as invliad totp. PFB code snippet
      Code :
      SmartConnect smartConnect = new SmartConnect();

      smartConnect.setApiKey("<API KEY>");
      
      GoogleAuthenticator gAuth = new GoogleAuthenticator();
      
      String totpcode = String.valueOf(gAuth.getTotpPassword("<secret key>"));
      
      System.out.println(" TOTP : "+totpcode);
      
      User user = smartConnect.generateSession("<clientCode>","<PIN>",totpcode);
      
      smartConnect.setAccessToken(user.getAccessToken());
      

      console output :

      {"data":null,"message":"Invalid totp","errorcode":"AB1050","status":false}JSONObject["data"] is not a JSONObject (class org.json.JSONObject$Null : null).

      M 2 Replies Last reply Reply Quote 0
      • M
        Moderator_2 @dipeshbodas last edited by

        Hi @dipeshbodas

        Apologies for delayed response.
        We are checking on this issue. Will update as soon as possible.

        Thanks & Regards,
        SmartAPI team

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

          Hi @dipeshbodas

          We have resolved this issue. Please reverify and let us know if the issue persist continuously

          Thanks & Regards,
          SmartAPI team

          D 1 Reply Last reply Reply Quote 0
          • D
            dipeshbodas @Moderator_2 last edited by

            @Moderator_2
            I had to generate the TOTP from the smartapi website and provide key to Authenticator app. TOTP generation is still not working.
            Also when authenticated getting below error
            com.neovisionaries.ws.client.WebSocketException: Failed to connect to 'wsfeeds.angelbroking.com:443': Connection timed out: connect

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

              Hi @dipeshbodas

              "Invalid TOTP" and "Websocket" connection failed is different issue. Kindly share the client code to help us analyze this further.

              Thanks & Regards,
              SmartAPI team

              1 Reply Last reply Reply Quote 0
              • U
                ugbhat last edited by

                @Moderator_2 said in invalid TOTP error errorcode":"AB1050" with java:

                cking on this issue. Will update as s

                IS this still not resolved ? I am not able to get the session with the same error message. Please do help me out.

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