# How do I create an API token in sbomify?

> Create a personal API token in sbomify with a narrow scope and short expiry, use it in CI to upload SBOMs, and delete it when you no longer need it.

- **Updated:** 2026-10-29

**TL;DR:** API tokens are personal and live in Settings, under API tokens. Choose a scope and an expiry, copy the token once, store it as a CI secret named SBOMIFY_TOKEN, and delete it when you are done. On GitHub Actions, OIDC trusted publishing removes the need for a token altogether.

## Walkthrough

Video: [How to create an API token for an AI agent in sbomify](https://marketing-assets.sbomify.com/screencasts/api_tokens.webm). Narrated screencast: compare the token scopes, create a token with the AI agent scope and read what it can and cannot do, copy it, and delete it.

## Creating a token

API tokens live in **Settings**, on the **API tokens** tab. You can also reach it from **API keys** in the sidebar. Tokens are personal, so other members cannot see or manage yours.

1. Click **Generate token**
2. Enter a **Token name** that says where it is used, for example `GitHub Actions: web-dashboard`
3. Pick the narrowest **Access scope** that does the job:
- **Publish only (CI/CD upload)** is made for CI uploads
- **Read-only** reads but changes nothing
- **AI agent** reads fix prompts and sends VEX rulings for approval. Nothing it sends changes your vulnerabilities until someone approves it
- **Full access** can do everything your role allows
4. Give it a short **Expiration**, for example 30 days. The default is 90 days
5. Click **Generate token**

sbomify shows the token only once, so copy it now. Store it as a secret in your CI, never in your code. A token can never do more than your own role allows.

## Using it in CI

To see where the token goes, open a component, open the **Component actions** menu, and choose **CI/CD integration**. The [sbomify GitHub Action](https://github.com/sbomify/sbomify-action) reads the token from the `SBOMIFY_TOKEN` secret, and the setup wizard shown there writes the pipeline that uploads your SBOMs.

On GitHub Actions you can skip the token entirely: [OIDC trusted publishing](https://sbomify.com/faq/how-do-i-set-up-oidc-trusted-publishing/) trades a short-lived GitHub token for a short-lived sbomify token on every run.

## Revoking a token

Back in **Settings**, your tokens are listed under **Your tokens**, with when each was last used and when it expires. When you no longer need one, delete it and confirm. It stops working right away, and anything still using it is locked out.

## Further reading

- [How do AI agents work in sbomify?](https://sbomify.com/faq/how-do-ai-agents-work-in-sbomify/)
- [How do I set up OIDC trusted publishing?](https://sbomify.com/faq/how-do-i-set-up-oidc-trusted-publishing/) - uploads from GitHub Actions with no stored token
- [How do I use the sbomify setup wizard?](https://sbomify.com/faq/how-do-i-use-the-sbomify-setup-wizard/) - generates the CI workflow for you
- [How do I generate an SBOM?](https://sbomify.com/faq/how-do-i-generate-an-sbom/) - the pipeline your token uploads from
- [How do I upload an SBOM?](https://sbomify.com/faq/how-do-i-upload-an-sbom/) - uploading by hand instead

---

From sbomify: https://sbomify.com/faq/how-do-i-create-an-api-token/
