To use the Spectral API, you must first get your personal token from SpectralOps.
Making An Authenticated API Request
- Go to the Settings page and choose the profile tab in your SpectralOps account.
- In the "Auth tokens" section, click on the eye icon and then select and copy your personal token.
Refer to the screenshot that follows. - To use the Spectral API, supply the token in an
Authorization
header, preceded byBearer
:
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.
![Screen Shot 2022-08-23 at 11.05.49.png 1441](https://files.readme.io/0d5c1a7-Screen_Shot_2022-08-23_at_11.05.49.png)