Skip to main content

1Password SDKs

1Password SDKs allow you to build integrations that programmatically interact with 1Password using Go, JavaScript, or Python. With 1Password SDKs, you can:

See a full list of supported functionality.

Supported languages

Example integrations

See examples of how our partners have used SDKs to build integrations with 1Password:

Go SDKGo SDK Postman

Securely load API keys and other secrets stored in 1Password into Postman without exposing any secrets in plaintext.

Learn more

Go SDKGo SDK Pulumi ESC

Dynamically import secrets from 1Password into your environment. The provider will return a map of names to Secrets.

Learn more

About the current version

1Password SDKs are currently in version 0, which means they can meet the stability and scalability requirements of production use cases. During version 0, expect more frequent releases as we add additional features and languages.

  • There is a possibility of breaking changes when you upgrade from one version 0 release to another, for example 0.1.X to 0.2.0. Minor releases (0.1.X to 0.1.Y) will not include breaking changes.
  • Integration authors may need to update their code when updating the SDK version. Existing code and integrations won’t be affected, as these will have the SDK pinned at a specific version via package.json (JS), requirements.txt (Python), or go.mod (Go).
  • We will provide three months of support and security patches for version 0, so you can upgrade when it makes sense for your workflows and teams.

You can find information about the latest releases in the 1Password SDK release notes.

Get started

Before you get started, you'll need to sign up for a 1Password account.

Step 1: Decide how you want to authenticate

You can choose between two authentication methods for 1Password SDKs: local authorization prompts from the 1Password desktop app or automated authentication with a 1Password Service Account.

  • 1Password desktop app: Best for integrations that run locally on a user's machine. Use desktop app authentication if you want minimal setup for end users, human-in-the-loop approval for sensitive workflows, user-specific auditing, if you need access to your full account, or if you need to perform vault management operations.
  • Service account: Best for automated access. Use a service account if you want a token-based authentication method that isn't associated with an individual account to automate access, limit your integration to least privilege access, or for shared building. Service accounts can't access your built-in Personal, Private, or Employee vault.
  1. Install 1Password for Mac, Windows, or Linux.
  2. Sign in to the account you want to use with your integration.
  3. Select your account or collection at the top of the sidebar, then navigate to Settings > Developer.
  4. Under Integrate with the 1Password SDKs, select Integrate with other apps.
  5. If you want to authenticate with biometrics, navigate to Settings > Security, then turn on the option to unlock using Touch ID, Windows Hello, or system authentication.
The Integrate with other apps settingThe Integrate with other apps setting

Step 2: Install the SDK

Install the SDK in your project.

Step 3: Import the SDK

Import the SDK into your project.

Step 4: Initialize the SDK

When you initialize the SDK, you create a client instance that contains your configuration parameters. For desktop app integrations, you'll need to provide your 1Password account name. For service account authentication, you'll need to provide your service account token.

Replace your-account-name in the code below with your 1Password account name as it appears at the top of the left sidebar in the 1Password app.

You can use the account ID that 1Password CLI returns with op account list --format json. Use the value in the account_uuid field.

Make sure to specify a name and version for your application in place of My 1Password Integration and v1.0.0.

The Integrate with other apps settingThe Integrate with other apps setting
note

This example prints an error message and exits if initialization fails. Because it writes the error to standard error, it uses Go’s os package, which you’ll need to import in your project. See the complete example in Step 5 for more context.

Step 5: Start building

You can test your setup by building a simple integration that lists all the titles of all the vaults you or the service account has access to.

main.go

See result...

Visit the Go, JavaScript, or Python SDK GitHub repositories for more examples.

Get help

To get help with 1Password SDKs, join our Developer Slack workspace and ask a question in the #sdk channel.

To request a new feature or report a bug, file an issue in the appropriate GitHub repo:

Was this page helpful?