Copy secret reference (using ID values)

jsejcksn
jsejcksn
Community Member

This applies to all platforms (not just Mac), but I didn't see a community category for "all platforms", so I'm choosing Mac because it seems to have the highest user activity

Perhaps I've missed some documentation, but I don't find a way to copy a secret reference using the desktop app. This seems like a basic and essential task during development.

What I want is this format:

op://vault_id/item_id/section_id/field_id

or if the value isn't in a section:

op://vault_id/item_id/field_id

How can I do that easily — and get a secret reference defined by ID values (which should be immutable — vs. name values which can be modified)?


More context:

I find some ways to construct the URL manually (but this is not ideal):

A URL can be copied which includes the vault and item ID among other query parameters:

I get one in a format like this:

https://start.1password.com/open/i?v={VAULT_ID}&i={ITEM_ID}

However, that's not enough as it doesn't include the section/field, and would need to be manually edited or processed by other tooling as an additional step to get the required output.

I can also use "Copy item UUID" and then paste that as an argument to a manually-typed CLI command to get much more than what's needed:

% op --format=json item get x5k2wndiih6cmw2rugl7ol442i
{
  "id": "x5k2wndiih6cmw2rugl7ol442i",
  // --- snip ---
  "vault": {
    "id": "{REDACTED_VAULT_ID}",
    // --- snip ---
  },
  // --- snip ---
  "fields": [
    // --- snip ---
    {
      "id": "credential",
      "type": "CONCEALED",
      "label": "credential",
      "value": "abc123",
      "reference": "op://{REDACTED_VAULT_NAME}/API Credential/credential"
    },
    // --- snip ---
  ]
}

However, this still involves either manually copying+pasting IDs or using other tooling to parse and create the required output.

The JSON does include a reference value for the target field, but the reference is built using names, which isn't satisfactory for the reasons described previously.

For the example above, what I want to copy to the clipboard is the following (where {VAULT_ID} is replaced by the actual vault ID):

op://{VAULT_ID}/x5k2wndiih6cmw2rugl7ol442i/credential

I think that if the boolean option is enabled at Settings > Advanced > Show debugging tools:

then there should be an option to copy a complete ID-based secret reference for every field in its contextual menu:


This is a re-posting of previous issue — the 1Password team stopped responding and it was closed without comment:

https://1password.community/discussion/139642/copy-secret-reference-using-id-values


1Password Version: 8.10.48
Extension Version: Not Provided
OS Version: macOS 15.0.1
Browser: Not Provided