How to automate totp in java sdk
-
Is there any solution to automate smart-api in java with newly lanuched totp for 2FA.
-
Add following dependency to your maven project or download jar and add to class path
<dependency>
<groupId>com.warrenstrange</groupId>
<artifactId>googleauth</artifactId>
<version>1.4.0</version>
</dependency>then add follwoing code
GoogleAuthenticator gAuth = new GoogleAuthenticator();
var totpcode = String.valueOf(gAuth.getTotpPassword(totp_key));pass this totpcode to method
-
@shahroz14 +917986051057 message me if unable to resolve.
-
@AmitSky https://github.com/wstrange/GoogleAuth
this works for me -
@AmitSky Need to find an API that can generate the key to OTP (6 digit code)
-
@AmitSky still problem is not resolved please message me. What's app :- +91 8796375407