I created a script that will open an app, enter pin and copy the code generated to clipboard. My Java code calls this AutoIt script and uses the copied generated code from clipb