Navigation

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

    Invalid TOTP for c#

    General Discussion
    0
    34
    244
    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
      Vishal.naykawala @dstelangre last edited by

      @dstelangre said in Invalid TOTP for c#:

      public static string GetTotp()
      {
      var secretKey = OtpNet.Base32Encoding.ToBytes("totp key that appears below QR code ");
      var totp = new Totp(secretKey);
      var otp = totp.ComputeTotp();
      return otp;
      }

      Thank you. It's working.

      1 Reply Last reply Reply Quote 0
      • V
        Vishal.naykawala @dstelangre last edited by

        @dstelangre you can put your solution on the below path which will help to others also,

        https://github.com/angel-one/smartapi-dotnet

        1 Reply Last reply Reply Quote 0
        • D
          dstelangre @Vishal.naykawala last edited by

          @Vishal-naykawala If still you have issue ? connect me on email dstelangre@gmail.com

          V 1 Reply Last reply Reply Quote 0
          • V
            Vishal.naykawala @dstelangre last edited by

            @dstelangre , Thank you, your solution working.

            1 Reply Last reply Reply Quote 0
            • V
              vijayyande last edited by

              If anyone want updated DLL with TOTP please email me, its free

              N U S 3 Replies Last reply Reply Quote 0
              • N
                Nichil72 last edited by

                Hello Team,

                Please update for C#.Net sdk or provide the latest dll after fixing such erro.

                1 Reply Last reply Reply Quote 1
                • N
                  Nichil72 @dstelangre last edited by

                  @dstelangre

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    dstelangre @Nichil72 last edited by

                    @Nichil72 Please check my comments below on same discussion , solution is provided , and I am not from Angel Team ,Thanks

                    1 Reply Last reply Reply Quote 0
                    • N
                      Nichil72 @dstelangre last edited by

                      @dstelangre said in Invalid TOTP for c#:

                      @vijayyande @Vishal-naykawala

                      Please share the code on watsapp on 7533851081. Need ur help bro.

                      1 Reply Last reply Reply Quote 0
                      • N
                        Nichil72 @vijayyande last edited by

                        @vijayyande please help me regarding this Issue. Facing such Issue while declaring the function GetTotp().
                        67d3d713-9c2b-4082-90f9-546a4367fdca-image.png

                        D 1 Reply Last reply Reply Quote 0
                        • D
                          dstelangre @Nichil72 last edited by

                          @Nichil72 . just add OtpNet
                          nuget package

                          N 1 Reply Last reply Reply Quote 0
                          • N
                            Nichil72 @dstelangre last edited by

                            @dstelangre Not able to download the package Otp.net plz help
                            7b89b63a-64e9-4e5f-8a0e-4f2556c67846-image.png

                            D N 2 Replies Last reply Reply Quote 0
                            • D
                              dstelangre @Nichil72 last edited by

                              @Nichil72 Select a solution in Solution Manager, and then select Tools > NuGet Package Manager > Manage NuGet Packages for Solution
                              click on Browse and type otp.net

                              first it will appear and select it and right side select project and click to install

                              N 1 Reply Last reply Reply Quote 0
                              • N
                                Nichil72 @Nichil72 last edited by

                                @Nichil72 Will you plz share your contact no. on my watsapp on 7533851081.

                                1 Reply Last reply Reply Quote 0
                                • N
                                  Nichil72 @dstelangre last edited by

                                  @dstelangre Will you plz share your contact no. on my watsapp on 7533851081.

                                  D 1 Reply Last reply Reply Quote 0
                                  • D
                                    dstelangre @Nichil72 last edited by

                                    @Nichil72 done

                                    1 Reply Last reply Reply Quote 0
                                    • N
                                      Nichil72 last edited by

                                      Hello Team,
                                      @admin @administrators Please fix the Issue and upload the code on github. So that we can download. Please do it ASAP.

                                      U 1 Reply Last reply Reply Quote 0
                                      • V
                                        vijayyande last edited by

                                        use below code to generate TOTP using otp.net

                                        https://github.com/kspearrin/Otp.NET

                                            public static string genTOTP(string secret)
                                            {
                                                    var totp = new Totp(OtpNet.Base32Encoding.ToBytes(secret));
                                        
                                                    if( totp.RemainingSeconds() < 2 )
                                                    {
                                                        Thread.Sleep(3);
                                                    }
                                        
                                                    return totp.ComputeTotp();
                                            }
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • U
                                          UtsavM last edited by

                                          @dstelangre I can integrate python solution in C#.If you wish to do so reply me on utsav.moradiya3@gmail.com.Instant code solution.

                                          1 Reply Last reply Reply Quote 0
                                          • U
                                            UtsavM @Nichil72 last edited by

                                            @Nichil72 I can integrate python solution in C#.If you wish to do so reply me on utsav.moradiya3@gmail.com , instantaneous code fix. Before admin releases a solution in C#, several algo traders have already adopted this temporary method.

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