op_token. The token is only used to read the fields you name, and never reaches a process or page.
1Password fields are part of Secrets, which are enabled for teams on request, and need the same access as passing secrets: a restricted API key needs the
secrets.use scope. They work for sandbox processes, image startup commands and credential fill in browser sessions.Store the token
Create a service account in 1Password with read access to the vaults you need, then store its token as anop_token secret. An op_token secret takes no allowed origins: a browser fill names them in the request.
Pass fields to a command
PassonePassword when you run a command: the token secret’s name, the 1Password vault’s name or ID, and fields, which maps each environment variable to an item, an optional section, and a field.
onePassword to sandbox.processes.start:
--1password-field is repeatable and takes ENV=item/[section/]field.
Pass fields to an image’s startup command
When you create a sandbox from an image with a startup command, passonePassword to give that command the fields:
SECRET_STARTUP_UNSUPPORTED: create the sandbox without onePassword, and pass it to exec or processes.start.
References
Each field becomes a secret reference,op://<vault>/<item>/[<section>/]<field>. For example, this field:
op://Dev Vault for Testing/scrapingcourse login/Security/one-time password?attribute=otp, the current one-time password of that TOTP field rather than its seed.
- The vault, item, section and field are names or IDs of 1–256 characters, without
/or?, and not.or... Use the ID for a name that contains/or?. - A field may end with one query, such as
?attribute=otpor?ssh-format=openssh. Keys are lowercase letters and-; join several with&. - A whole reference is at most 512 bytes.
fieldsnames 1–32 variables, keyed by environment variable names: letters, digits and_, not starting with a digit.- A request uses one token and one 1Password vault.
How values are delivered
The sandbox’s host signs in to 1Password and reads the fields when the process starts. Each value is set only in that process’s environment, like a stored secret, and isn’t refreshed: a later change in 1Password, or a one-time password that expires, doesn’t reach a running process. Hyperbrowser never stores the values, and no endpoint returns them. You can passonePassword together with vault and secrets, as long as no variable comes from two of them: a variable from 1Password can’t also be set by vault, secrets or env, or the request fails with SECRET_SOURCES_INVALID. Together they can set at most 32 variables.
The response lists each 1Password variable with its reference and the tokenSecret it signed in with, in secrets for a process or startupSecrets for a sandbox create:
name, secretId or version, and never overrides.
Browser sessions
A browser session can type 1Password fields into a login form. Attach the token when you create the session withcredentials: [{ onePassword: "op-token" }], then fill with onePassword, the fields’ refs and the allowedOrigins the values may be typed on. See Fill from 1Password. An op_token can’t be attached as a plain credential or be a vault entry.
Errors
When the token or a field can’t be used, nothing starts and you get one of these. A browser fill returns these 1Password codes with its own details; see Fill from 1Password.
A field that breaks the reference rules is rejected with a 400 before anything starts. See Secrets for the errors any secret can return.