{"id":13991680,"url":"https://github.com/1Password/onepassword-sdk-js","last_synced_at":"2025-07-22T14:31:41.681Z","repository":{"id":239742184,"uuid":"741469082","full_name":"1Password/onepassword-sdk-js","owner":"1Password","description":"The official JavaScript SDK for 1Password","archived":false,"fork":false,"pushed_at":"2024-05-21T15:51:22.000Z","size":17082,"stargazers_count":18,"open_issues_count":8,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2024-05-22T13:53:03.273Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1Password.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-10T13:11:13.000Z","updated_at":"2024-05-28T10:12:33.073Z","dependencies_parsed_at":"2024-05-28T10:12:29.920Z","dependency_job_id":"7936c59a-6c89-4f18-a950-d7dc32701bc0","html_url":"https://github.com/1Password/onepassword-sdk-js","commit_stats":null,"previous_names":["1password/onepassword-sdk-js"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Password%2Fonepassword-sdk-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Password%2Fonepassword-sdk-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Password%2Fonepassword-sdk-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1Password%2Fonepassword-sdk-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1Password","download_url":"https://codeload.github.com/1Password/onepassword-sdk-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227123904,"owners_count":17734223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-09T14:01:31.536Z","updated_at":"2025-07-22T14:31:41.652Z","avatar_url":"https://github.com/1Password.png","language":"JavaScript","funding_links":[],"categories":["others","TypeScript"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://1password.com\"\u003e\n      \u003ch1 align=\"center\"\u003e1Password JavaScript SDK\u003c/h1\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n \u003ch4 align=\"center\"\u003eBuild integrations that programmatically access your secrets in 1Password.\u003c/h4\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://developer.1password.com/docs/sdks/\"\u003eDocumentation\u003c/a\u003e | \u003ca href=\"https://github.com/1Password/onepassword-sdk-js/tree/main/examples\"\u003eExamples\u003c/a\u003e\n\u003cbr/\u003e\n\n---\n\n## 🚀 Get started\n\nTo use the 1Password JavaScript SDK in your project:\n\n1. [Create a service account](https://my.1password.com/developer-tools/infrastructure-secrets/serviceaccount/) and give it the appropriate permissions in the vaults where the items you want to use with the SDK are saved.\n2. Provision your service account token. We recommend provisioning your token from the environment. For example, to export your token to the `OP_SERVICE_ACCOUNT_TOKEN` environment variable:\n\n   **macOS or Linux**\n\n   ```bash\n   export OP_SERVICE_ACCOUNT_TOKEN=\u003cyour-service-account-token\u003e\n   ```\n\n   **Windows**\n\n   ```powershell\n   $Env:OP_SERVICE_ACCOUNT_TOKEN = \"\u003cyour-service-account-token\u003e\"\n   ```\n\n3. Install the 1Password JavaScript SDK in your project:\n\n   ```bash\n   ## NPM\n   npm install @1password/sdk\n   ```\n\n   ```bash\n   ## PNPM\n   pnpm add @1password/sdk\n   ```\n\n   ```bash\n   ## Yarn\n   yarn add @1password/sdk\n   ```\n\n4. Use the JavaScript SDK in your project:\n\n```js\nimport { createClient } from \"@1password/sdk\";\n\n// Creates an authenticated client.\nconst client = await createClient({\n  auth: process.env.OP_SERVICE_ACCOUNT_TOKEN,\n  // Set the following to your own integration name and version.\n  integrationName: \"My 1Password Integration\",\n  integrationVersion: \"v1.0.0\",\n});\n\n// Fetches a secret.\nconst secret = await client.secrets.resolve(\"op://vault/item/field\");\n```\n\nMake sure to use [secret reference URIs](https://developer.1password.com/docs/cli/secret-reference-syntax/) with the syntax `op://vault/item/field` to securely load secrets from 1Password into your code.\n\nInside `createClient()`, set `integrationName` to the name of your application and `integrationVersion` to the version of your application.\n\n## Supported functionality\n\n1Password SDKs are in active development. We're keen to hear what you'd like to see next. Let us know by [upvoting](https://github.com/1Password/onepassword-sdk-js/issues) or [filing](https://github.com/1Password/onepassword-sdk-js/issues/new/choose) an issue.\n\n### Item management\n\nOperations:\n\n- [x] [Retrieve secrets](https://developer.1password.com/docs/sdks/load-secrets)\n- [x] [Retrieve items](https://developer.1password.com/docs/sdks/manage-items#get-an-item)\n- [x] [Create items](https://developer.1password.com/docs/sdks/manage-items#create-an-item)\n- [x] [Update items](https://developer.1password.com/docs/sdks/manage-items#update-an-item)\n- [x] [Delete items](https://developer.1password.com/docs/sdks/manage-items#delete-an-item)\n- [x] [Archive items](https://developer.1password.com/docs/sdks/manage-items/#archive-an-item)\n- [x] [List items](https://developer.1password.com/docs/sdks/list-vaults-items/)\n- [x] [Share items](https://developer.1password.com/docs/sdks/share-items)\n- [x] [Generate PIN, random and memorable passwords](https://developer.1password.com/docs/sdks/manage-items#generate-a-password)\n\nField types:\n- [x] API Keys\n- [x] Passwords\n- [x] Concealed fields\n- [x] Text fields\n- [x] Notes\n- [x] SSH private keys, public keys, fingerprint and key type\n- [x] One-time passwords\n- [x] URLs\n- [x] Websites (used to suggest and autofill logins)\n- [x] Phone numbers\n- [x] Credit card types\n- [x] Credit card numbers\n- [x] Emails\n- [x] References to other items\n- [x] Address\n- [x] Date\n- [x] MM/YY\n- [x] File attachments and Document items\n- [x] Menu\n- [ ] Passkeys\n\n### Vault management\n- [ ] Retrieve vaults\n- [ ] Create vaults ([#50](https://github.com/1Password/onepassword-sdk-js/issues/50))\n- [ ] Update vaults\n- [ ] Delete vaults\n- [x] [List vaults](https://developer.1password.com/docs/sdks/list-vaults-items/)\n\n### User \u0026 access management\n- [ ] Provision users\n- [ ] Retrieve users\n- [ ] List users\n- [ ] Suspend users\n- [ ] Create groups\n- [ ] Update group membership\n- [ ] Update vault access \u0026 permissions\n\n### Compliance \u0026 reporting\n- [ ] Watchtower insights\n- [ ] Travel mode\n- [ ] Events. For now, use [1Password Events Reporting API](https://developer.1password.com/docs/events-api/) directly.\n\n### Authentication\n\n- [x] [1Password Service Accounts](https://developer.1password.com/docs/service-accounts/get-started/)\n- [ ] User authentication\n- [ ] 1Password Connect. For now, use [1Password/connect-sdk-js](https://github.com/1Password/connect-sdk-js).\n\n## 📖 Learn more\n\n- [Load secrets with 1Password SDKs](https://developer.1password.com/docs/sdks/load-secrets)\n- [Manage items with 1Password SDKs](https://developer.1password.com/docs/sdks/manage-items)\n- [List vaults and items with 1Password SDKs](https://developer.1password.com/docs/sdks/list-vaults-items)\n- [1Password SDK concepts](https://developer.1password.com/docs/sdks/concepts)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1Password%2Fonepassword-sdk-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1Password%2Fonepassword-sdk-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1Password%2Fonepassword-sdk-js/lists"}