Keys / 1Password
OP_SERVICE_ACCOUNT_TOKEN
The 1Password service account token your scripts and CI read secrets with, without signing in.
- Expires
- you choose with
--expires-inwhen you create it - API
- create with
op service-account create; rotate and revoke on 1Password.com
Get it
Create one on start.1password.com/developer-tools/infrastructure-secrets/serviceaccount. The steps aren't recorded yet.
Set it
OP_SERVICE_ACCOUNT_TOKEN=...
1Password CLI reads it on its own; the SDKs' examples pass process.env.OP_SERVICE_ACCOUNT_TOKEN in. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- On 1Password.com, open Developer > Service accounts, choose the account and select Rotate Token. The new token has the same permissions.
- Under Expire existing token, choose how long the old token keeps working: now, 1 hour or 3 days.
- Deploy the new token everywhere that reads
OP_SERVICE_ACCOUNT_TOKENbefore the old one expires.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.