How do I retrieve an OTP token value via 1Password CLI?

I can retrieve the login item I'm interested in, and I can see the OTP secret in the item.

Now I'd like to be able to retrieve the current time-based value of the OTP token (based on the OTP secret in the item, which is marked as type "TOTP_").

I am using "op get item" to retrieve the item - is there another API call which can give me the current OTP token?

1Password Version: Not Provided
Extension Version: Not Provided
OS Version: Not Provided
Sync Type: Not Provided
Referrer: forum-search:otp


  • AGAlumBAGAlumB 1Password Alumni

    @ianhall: Thanks for reaching out. This should do it:

    op get totp [item query]

    I totally missed this too and had to ask, so don't feel bad. Cheers! :lol:

This discussion has been closed.