Facing issue in TOTP Automation
-
Hello Folks
I trying to get the TOTP through java but was unable to make it work.
Below is the code snippet, I request to help on this.
String key = "";
String clientID = "";
String clientPass = ""
String apiKey = ""String totp = getTOTPCode(apiKey); GoogleAuthenticator gAuth = new GoogleAuthenticator(); String code = String.valueOf( gAuth.getTotpPassword(totp)); SmartConnect smartConnect = new SmartConnect(apiKey); smartConnect = new SmartConnect(apiKey); User user = smartConnect.generateSession(clientID, clientPass, code); // getting "message":"Invalid totp","errorcode":"AB1050" String feedToken = user.getFeedToken(); System.out.println("feedToken " +feedToken); smartConnect.setAccessToken(user.getAccessToken()); smartConnect.setUserId(user.getUserId());
-
public static String key = "Agf5EKgf2EGRTGRGgf7DOKSJI6gfSZG66Q";
public static String clientID = "XXXXX";public static String clientPass = "0000";
public static String apiKey = "ggklv44L";GoogleAuthenticator gAuth = new GoogleAuthenticator();
String code = String.valueOf( gAuth.getTotpPassword(key));smartConnect = new SmartConnect(apiKey);
user = Optional.ofNullable(smartConnect.generateSession(clientID, clientPass, code)); -
getTOTPCode(apiKey);
can you share the code for this ?
facing issues while using totp
dipesh.bodas@gmail.com -
@AravindAnbalagan said in Facing issue in TOTP Automation:
Issue got resolved by passing key in the getTOTPCode(key).
the key is api key or what
-
@AravindAnbalagan Hi it is resolved, I am facing same issue. If yes can you share your code
-
@Rishab Sure
-
@AravindAnbalagan
hi can you please share the code how to get atomation totp
mail id : rishab20dec2015@gmail.com -
Issue got resolved by passing key in the getTOTPCode(key).