Skip to main content
May 9, 2023
Question

How using "op read" in cli v2 with titles containing: @ or ( characters?

  • May 9, 2023
  • 3 replies
  • 914 views

sample:

op read op://my_vault/me@company.org/username results in invalid secret reference ... invalid character in secret reference: '@'
op read 'op://my_vault/foo (bar)/username' results in invalid secret reference ... invalid character in secret reference: '('

op -v
2.17.0


1Password Version: 1Password for Mac 8.10.4 (81004032)
Extension Version: Not Provided
OS Version: Macos 13.1 Ventura M1-chip
Browser:_ i am on commandline
Referrer: forum-search:escape

3 replies

michael_c_1P
1Password Alum
May 9, 2023

Hey Oliver,

These characters are currently not supported with secrets references. You'll need to use the UUID of the item in the secrets reference instead of the name.

You can run the command op item get 'Example Item' --format json to get the reference including the UUIDs.

Thanks,
Mike

May 10, 2023

Hey Mike,

thank you!

Would it not be better to support the same characters which are allowed in the 1password GUI or create an global option to allow only those character in item titles in the GUI/Client? Now, if i want to use the secrets reference syntax, i have tell any 1password-User which characters to use and then hope he will take care of it. This is bound to get frustrating quickly.

Regarding your tip to get the uid, i know about it. But in context of API-Calls with a ServiceAccount there are request quotas https://developer.1password.com/docs/service-accounts and with this solution i need two times more read-Operations. And 5000 allowed read-operations within 24 hours is not so much.

Finally, I would be very happy if you could adjust the character handling soon.

Thanks and best regards!
Oliver

May 26, 2023

Hey Oliver!

Regarding your tip to get the uid, i know about it. But in context of API-Calls with a ServiceAccount there are request quotas https://developer.1password.com/docs/service-accounts and with this solution i need two times more read-Operations. And 5000 allowed read-operations within 24 hours is not so much.

Are these secret references that you are trying to set up different every time?
Otherwise, I can imagine that setting them up could be a one-time process, and afterwards the number of API calls will be even smaller, since secret references by ID do not require your entire 1Password account to be fetched and the item to be looked for client-side.

But I would love to hear more about your use-case here!

Best,
Horia