API Keys
API keys let you authenticate with Shorebird from scripts and other automated
environments. You can create, view, regenerate, and revoke API keys from the
Shorebird Console. From the command line,
shorebird tokens list lists your keys
when you’re signed in with shorebird login (with an API key or GitHub Actions
OIDC, it opens the console page instead), and shorebird tokens create and
shorebird tokens delete open the console page (Shorebird 1.6.135 or newer).
The keys on this page are personal: each one acts as you, with at most your role, and stops working if your account is deleted. For CI and integrations your team depends on, use a service account instead. Its keys belong to the organization and do what the service account’s role allows.
Creating an API key
Section titled “Creating an API key”- Open API keys from the account menu in the console, or click Manage API keys on your Account page.
- Click Create API key.
- Under Name, enter a descriptive name (e.g., “Scripts on my laptop”).
- Under Expiration, choose an expiration period.
- Under Permissions, select a permission level.
- Click Create.
The full key value is shown exactly once after creation. Copy it and store it securely. It cannot be retrieved again.
Using an API key
Section titled “Using an API key”Set the key as the SHOREBIRD_TOKEN environment variable where your script
runs. Shorebird CLI commands will authenticate automatically when this variable
is present.
For CI, use a service account’s key in
SHOREBIRD_TOKEN instead. For platform-specific setup, see the CI guides for
GitHub Actions, GitLab,
Codemagic, or the
generic CI guide.
Expiration
Section titled “Expiration”API keys default to a 1-year expiration. During creation, you can choose from:
- 30 days
- 90 days
- 1 year (default)
A key can’t be set to never expire.
Existing keys without an expiration keep working until you revoke them. Regenerating one gives the new key an expiration.
For a key that never expires, or one that doesn’t depend on any one person’s account, use a service account.
Permissions
Section titled “Permissions”API keys support two permission levels:
- Full access: the key can do everything your account can, except delete
your account, change billing limits, manage your sessions and API keys, manage
service accounts and their keys and trust rules,
set and remove
App Store and Google Play keys, approve or
reject patches, or turn a track’s protection
on or off. Do those signed in to the console. Managing service accounts also
works from the CLI after
shorebird login. Available on all plans. - Release and patch only: the key can create releases and patches, but cannot manage apps, organizations, members, or billing. Available on all plans.
A key that tries one of the things no key can do gets this error:
Regenerating an API key
Section titled “Regenerating an API key”Regenerating replaces a key with a new one. To regenerate a key, open its ⋮ menu in the API keys list and choose Regenerate. A key that expires within 7 days, or has expired, also shows a Regenerate button. The dialog starts with the key’s name and permission level, which you can change. Choose an expiration (1 year by default) and click Regenerate.
The new key value is shown once, like a newly created key. The old key is revoked as soon as the new one is created, so update everything that uses it.
An older key with custom permissions, rather than one of the two levels above, has no Regenerate option, only Delete in its menu. To replace one, create a new key, switch everything that uses the old key to it, then delete the old key.
Revoking an API key
Section titled “Revoking an API key”To revoke a key, open its ⋮ menu in the API keys list, choose Delete, and click Delete to confirm. Revocation is immediate, and anything using that key, such as a script or CI pipeline, fails on its next request. This action cannot be undone.
Migrating from shorebird login:ci
Section titled “Migrating from shorebird login:ci”The shorebird login:ci command has been replaced by API keys, and tokens it
generated stopped working on October 1, 2026. Replace them with a
service account’s key, so CI doesn’t depend on
your account.
To migrate:
- Create a service account and create a key for it.
- Replace the
SHOREBIRD_TOKENvalue in your CI secrets with the new key. - Verify your CI pipeline runs successfully.
The SHOREBIRD_TOKEN environment variable name has not changed, so no workflow
file edits are needed beyond updating the secret value.
Logins made on your own machine with a Shorebird CLI older than 1.6.87 stopped
working on October 1, 2026 as well. Run shorebird upgrade, then
shorebird logout and shorebird login.
Security
Section titled “Security”- API keys use the
sb_api_prefix. This prefix is registered with GitHub secret scanning, so leaked keys in public repositories are flagged automatically. - Keys are stored as irreversible hashes. Shorebird cannot retrieve a key value after creation.
- Treat API keys like passwords. Store them in your CI platform’s secrets manager and do not commit them to source control.