To use the Spectral API, you must first get your personal token from SpectralOps.

Making An Authenticated API Request

  1. Go to the Settings page and choose the profile tab in your SpectralOps account.
  2. In the "Auth tokens" section, click on the eye icon and then select and copy your personal token.
    Refer to the screenshot that follows.
  3. To use the Spectral API, supply the token in an Authorization header, preceded by Bearer:
    Authorization: Bearer PERSONAL_TOKEN

Revoking and regenerating Spectral personal token

📘

If you suspect a personal token has been leaked, it is a good practice to revoke that token and generate a new one to use in its place.

When a personal token is revoked, all integrations using that token immediately stop working. Proceed with caution!

To revoke your personal token, navigate to your profile section on the settings page in SpectralOps.
Click the Regenerate token button to revoke your personal token. A new one will be generated in its place.
You can now copy the newly generated personal token and update integrations that used the old one.

1441