TOTP Viewer, a GUI Wrapper for T2F2 OTP CLI Python script

The TOTP Viewer is a simple GUI wrapper for T2F2 OTP CLI Python application that allows you to manage and view Time-Based One-Time Password (TOTP) stored on your Token2 FIDO security keys. It provides a user-friendly interface to fetch, display, and manage your TOTP codes.


In addition to the modules listed in the requirements.txt file, the graphical user interface (GUI) script relies on modules typically included in standard Python distributions. However, some systems may have a different set of default modules. To ensure the seamless operation of the GUI solution, please ensure that the following modules are available:

  • tkinter
  • pyperclip (or, on some systems, xclip)


  • Fetch and display TOTP codes stored on the device
  • Automatically update countdowns for TOTP codes.
  • Copy TOTP codes to clipboard for easy usage.
  • Add new accounts with default or custom settings.
  • Delete accounts.
  • Generate test TOTP accounts for testing purposes.


  1. Make sure you have the T2F2 OTP Cli Python application installed and running on your system. You can test it using python get_all
  2. Run the TOTP Viewer from the folder where the main script is located using the following command: python gui/


  • Launch the TOTP Viewer app.
  • The main window will display a table with your TOTP codes.

  • Double-click on a TOTP code to copy it to the clipboard.
  • An OTP profile may be additionally protected by requiring to touch the device's button. For those profiles, the OTP column will show 'None' as the value. To retrieve the OTP of such profiles, you doubleclick on the row and confirm the operation by touching the button. The OTP will be shown in the console separately as illustrated below.

    Please note that this does not apply to NFC method - the button press when NFC used as data transport method is replaced by a tap, and if the device is placed on the NFC reader device, its presence is considered meeting the tap requirement.
  • Click on an account and choose the "File -> Delete Account" menu to delete it.
  • Use the "File -> Add Account" menu to add new accounts with default or custom settings.

  • Use the "File -> Generate Test Accounts" menu to generate test TOTP accounts for testing purposes.
  • Use the "File -> Erase All Accounts" menu to completely remove all accounts stored on the security key. Warning: this action is irreversible!
  • Use the "Help" menu to access additional options like "Readme" and "About".

Supported platforms

This solution was successfully tested under Windows 10/11 and Ubuntu 20.x, but should work under any Posix-compatible and Windows operating system as long as Python3 and the required modules are installed.


TOTP Viewer is a part of the T2F2 OTP CLI python script and is available for download from your customer account interface if you have placed an order containing a compatible product.