Documentation Index
Fetch the complete documentation index at: https://www.1password.dev/llms.txt
Use this file to discover all available pages before exploring further.
Public preview features are not guaranteed.
The Users API is currently in public preview. During the public preview, functionality may be added, changed, or removed at any time. If you’re having trouble, you can contact 1Password support for help.
Requirements
Before you get started with the public preview API, you’ll need:- A 1Password Enterprise Password Manager account (1Password Business tier)
- Permissions to manage integrations in your 1Password account (for example, as an owner, administrator, or member of the Security group)
Step 1: Create an OAuth application in your 1Password account
To call the Users API, you’ll first create an OAuth application in your 1Password account, which generates the client credentials your integration will use to request an access token.- Sign in to your 1Password account.
- Select Integrations in the sidebar. If you’ve set up other integrations in your account, you’ll also need to select Directory on the Integrations page.
- Select OAuth Application.
- Configure your OAuth application:
- Application name: Enter a name to help you identify the integration.
- Description: (Optional) Add a description with additional information about your OAuth application.
- Redirect URL: Enter the redirect URL registered with your OAuth provider for your integration. The URL must use the HTTPS protocol. For example:
https://myapp.com/oauth/callback. - Scopes: Select one or more of the scopes from the “Select scopes” list, according to the access required for your integration: get user, list users, suspend users, and reactivate users.
- Select Generate credentials to generate your client ID and client secret.
- Select Save in 1Password, then select the vault where you want to save your client credentials. The client secret is only shown once, so make sure to save it before you continue.
Step 2: Request an access token
After you create the OAuth application in your 1Password account, use your generated client ID and client secret to request an access token using the OAuth 2.0 client credentials grant. Make a POST call to thev1beta1/users/oauth2/token endpoint and include any required headers and request parameters.
Send your client ID and client secret in the HTTP Basic authentication header as a base64-encoded string. If you use curl , you can pass the client credentials in the --user authorization parameter. Curl will then encode your credentials and send them in the HTTP Basic header. For example:
Step 3: Send a test request to the Users API
Send a request to the API to confirm everything works. Include your access token in theAuthorization header. Make sure the endpoint you call can be used with the scopes set for the access token, and include any required headers and parameters.
For example, if your access token is scoped to list all users, the following API call will retrieve a list of users for your specified 1Password account. Use the max_page_size query parameter if you want to limit the number of results per page:
next_page_token. Use the token with the page_token query parameter to fetch the next page of results. For example: