Skip to content

macos – Is there a way to access Apple’s 2FA Verification Code via Terminal?

  • by
Spread the love

I would like to script accessing the built-in two factor authentication code that is accessed via System Preferences -> Passwords. One of the apps I use does not prompt for the 2FA code so each time I use it I have to do several clicks to retrieve the code. I am aware there is a mechanism to access Keychain items, but not the 2FA passwords. Does anyone know if there is a way to access these codes via terminal?

Note: I’m not referring to Apple’s own 2FA service to verify Apple ID accounts.

Leave a Reply

Your email address will not be published. Required fields are marked *