Skip to content

Instantly share code, notes, and snippets.

@kidbrax
Created July 18, 2019 16:32
Show Gist options
  • Save kidbrax/b6ebcc72dc074064775e1f9782addfd1 to your computer and use it in GitHub Desktop.
Save kidbrax/b6ebcc72dc074064775e1f9782addfd1 to your computer and use it in GitHub Desktop.
get TOTP using 1Password #shell
# This uses the 1Passowrd CLI - https://support.1password.com/command-line/
# taken from https://discussions.agilebits.com/discussion/comment/502729/#Comment_502729
# this is a command to get a TOTP, (MFA token)
op get item <item_uuid_or_name> | jq '.details.sections[1].fields[0].v' | awk -F'[=&]' '{print $2}'
@lucasmartins
Copy link

Now you can use op item get <item_uuid_or_name> --otp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment