Skip to main content
The 1Password Events API uses the OAuth 2.0 client credentials flow to authorize server-to-server integrations with 1Password Business or 1Password Enterprise Password Manager. Your integration uses its client credentials to obtain a short-lived, scoped access token when it needs to make a request.

How OAuth 2.0 authorization works

Your integration authenticates to the OAuth token endpoint with its client ID and client secret to request an access token. It uses that token to authorize Events API requests. The main components of the authorization flow are:

Create an OAuth application in your 1Password account

Create an OAuth application in your 1Password account to get the client ID and client secret your integration uses to request an access token.
An OAuth application’s scopes are set when you create it. If your integration needs different scopes, create a new application.
  1. Sign in to your account on 1Password.com.
  2. Select Integrations in the sidebar. If you’ve set up other integrations in your account, select Directory on the Integrations page.
  3. Select Events reporting.
  4. Select Continue with OAuth.
  5. Configure your OAuth application:
    • Application Name: Enter a name to help you identify the integration.
    • Scopes: Check that View audit events is selected.
    • Description: (Optional) Add a description with additional information about your OAuth application.
    When you’re finished, select Next to generate your client ID and client secret.
    1Password shows the client secret once. Save it before you continue.
  6. Select Save in 1Password and choose a vault for the client ID and client secret. Then select View integration.
When you select Events reporting in the directory, 1Password chooses the Client credentials grant type for you and marks that step as complete. If you select Directory > OAuth Application, choose Client credentials as the grant type, then select the View audit events scope. You can now use your client ID and client secret to request an access token. You can rotate the client secret of an existing application.

Scopes

Select View audit events when you configure your OAuth application. The scopes granted to an access token are listed in the scope field of the token response. The Events API returns 403 Forbidden if the token lacks the required scope or the request names a different account.

Rotate the client secret

To replace your client secret, rotate it from the OAuth application in your 1Password account. 1Password shows the new client secret once. Save it before you continue. To keep your integration working, update the client secret in every tool that uses it, including your SIEM, before the previous secret expires. If you need to disable the client credentials immediately, revoke the OAuth application and create a new one.

Request an access token

After you create the OAuth application and save the client credentials in your 1Password account, request an OAuth access token from the token endpoint.

Authorization endpoints

The OAuth API endpoints are hosted on the same base URL as the Events API. Use the base URL that matches the region of your 1Password account. Access tokens are specific to the region they were issued in. Request the token from the same base URL that your integration uses for Events API requests. Append the endpoint path to the base URL. Use /v1/oauth/token to request an access token, /v1/oauth/introspect to check whether a token is active, and /v1/oauth/revoke to revoke a token.

Token request headers and body parameters

Use the following request headers and body parameters to request an access token.
Every token request must include your client credentials. Choose one method per request. Send the credentials in the Authorization header (recommended) or as client_id and client_secret form fields.
Every access token is issued with the scopes configured for the OAuth application.

Example token request

Make a POST call to the /v1/oauth/token endpoint. Include your client credentials, required headers, and request parameters.
If you use raw HTTP, base64-encode your OAuth client credentials before sending the request.
  1. Join your client ID and client secret with a colon (:).
  2. Base64-encode the resulting string using your preferred tool. For example:
  3. Make a POST call to the /v1/oauth/token endpoint. Replace <encoded_client_credentials> with the encoded string and set Host to your regional API host.

Receive an access token

A successful response includes the access token, its lifetime in seconds, and its scopes.
Access tokens expire after 15 minutes (900 seconds). Use the same client credentials to request a new access token when the current one expires. The client credentials grant issues access tokens only. Token and introspection responses include the Cache-Control: no-store and Pragma: no-cache headers.

Use the access token with the Events API

Use your access token in the Authorization header to authorize a request to the Events API. Replace <access_token> with the token you received. The - in the path selects the account associated with that token.
See API conventions for account selection and error responses.

Check whether an access token is active

If your integration stores access tokens between tasks, you can call the /v1/oauth/introspect endpoint with your client credentials to check whether a token is active. The response includes the token’s scopes and expiry time, or "active": false if the token has expired or been revoked.

Revoke an access token

You can revoke a token when it’s no longer needed using the OAuth revoke endpoint. You can also revoke all tokens for an integration by revoking the OAuth application in your 1Password account.

Use the revoke endpoint

Use the /v1/oauth/revoke endpoint to revoke a token. Authenticate with the client credentials of the OAuth application that requested the token. For example:
A successful revocation request returns 200 OK with an empty body. The endpoint also returns 200 OK if the submitted token was already expired, revoked, or unknown.

Revoke the integration in your 1Password account

Revoke the OAuth application to disable its client credentials and revoke its access tokens.
  1. Sign in to your account on 1Password.com.
  2. Select Integrations in the sidebar.
  3. Select the OAuth application for your integration.
  4. Select Revoke integration, follow the confirmation instructions, then select Revoke integration again.

Delete your integration’s client

When you remove an integration from your own platform, also revoke its OAuth application in 1Password to disable its credentials and tokens.