ReferenceIntegrations
CI authentication
How the Endform CLI authenticates in CI, with GitHub Actions OIDC through the Endform GitHub App or an organization API key in ENDFORM_API_KEY.
The Endform CLI authenticates in CI in one of two ways: through GitHub Actions OIDC with the Endform GitHub App, or with an organization API key stored in ENDFORM_API_KEY.
Interactive browser login (endform login) is disabled in CI environments.
Authentication methods
| Method | Supported CI providers | Setup | Best for |
|---|---|---|---|
| GitHub App + OIDC | GitHub Actions | Install the Endform GitHub App and grant id-token: write | GitHub Actions workflows, zero static secrets, and Vercel preview checks |
ENDFORM_API_KEY | Any CI provider (GitHub Actions, GitLab CI, CircleCI, Azure Pipelines, Bitbucket, Buildkite) | Create a key and store it as a masked CI secret | Non-GitHub CI, repos where you cannot install GitHub Apps, or running MCP/analytics CLI commands in CI |
GitHub Actions OIDC
When a GitHub Actions job grants id-token: write and the repository has the Endform GitHub App installed, npx endform@latest test requests a short-lived OIDC token from GitHub and exchanges it with Endform automatically.
permissions:
contents: read
id-token: write- No secret to rotate: OIDC tokens are minted per job and expire automatically.
- Keep
contents: read: Adding apermissionsblock in GitHub Actions restricts all unlisted scopes, so includecontents: readforactions/checkout. - Required for Vercel previews: The
endformdev/actions/run-with-vercel-deploymentaction authenticates exclusively through GitHub OIDC. - Suite runs only: GitHub OIDC credentials are scoped to running tests and reporting check status. Commands that read historical analytics, inspect test attempts, manage quarantine rules, or run the local MCP server in CI (for example in an automated triage job) require
ENDFORM_API_KEY.
API key (ENDFORM_API_KEY)
Set ENDFORM_API_KEY as a masked secret in your CI provider to authenticate any Endform CLI command without interactive login.
Create a key from the CLI and pipe it directly into your CI provider's secret store so the raw key is never printed to your terminal:
npx endform@latest api-key create --name "GitHub Actions" | gh secret set ENDFORM_API_KEYFor GitLab CI:
npx endform@latest api-key create --name "GitLab CI" | glab variable set ENDFORM_API_KEY --maskedYou can also create and revoke keys in the Endform dashboard under Settings → API keys. See API keys for key management and lifecycle details.
Credential precedence and organization selection
When the CLI runs in CI, it resolves credentials and organizations in this order:
ENDFORM_API_KEYenvironment variable: If set, the CLI uses the API key and runs against the organization that owns the key.- GitHub Actions OIDC: If
ENDFORM_API_KEYis not set and the job exposes GitHub's OIDC environment (id-token: write), the CLI authenticates through the repository's Endform GitHub App installation.
If your endform.config.ts specifies an organizationId (or you pass --organization-id), the authenticated credential must have access to that organization, otherwise the run fails with an authorization error.
Related pages
Last updated