Tutorial: Create a Sentry Authentication Token

To use Sentry's APIs, you must have an authentication

tokenIn search, a key-value pair or raw search term. Also, a value used for authorization.
. This tutorial walks you through creating an organizational auth token through an internal integration. Sentry recommends using organizational auth tokens whenever possible, as they aren't linked to specific user accounts.

See our documentation on authentication to learn more about the different types of authentication tokens available.

Prerequisites

  • A Sentry account with an organization-level role of Manager or Admin.

Create an Internal Integration

Internal integrations are used to create custom Sentry integrations for your organization. They can also be used to create and manage your organization auth tokens.

  1. Open sentry.io

  2. Click "Settings" in the left menu to open the Organization Settings page.

  3. Click "Custom Integrations" in the left side panel to create a new internal integration and org-level auth

    tokenIn search, a key-value pair or raw search term. Also, a value used for authorization.
    .

  4. Press the "Create New Integration" button.

  5. Make sure "Internal Integration" is selected in the modal and press "Next".

  6. Enter a name for your integration.

Sentry.io UX walkthrough of creating an internal integration.

Create a API Authentication Token

  1. Under "Permissions" select the permissions required for the APIs you wish to call.

    Each API endpoint docs page lists the required permissions, in the "Scopes" section. For example, the Create a New Project endpoint requires

    projectRepresents your service in Sentry and allows you to scope events to a distinct application.
    :write permissions or higher.

  2. Click "Save Changes".

  3. Scroll down to the bottom of the page and copy the generated

    tokenIn search, a key-value pair or raw search term. Also, a value used for authorization.
    under "Tokens".

Sentry.io UX walkthrough of creating a token and setting it's permissions.

Keep your auth token around on your clipboard or in an environment variable to use in API calls.

Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").