ek_live_ and works as a Bearer token.
When to use API tokens
- CI/CD pipelines — inject secrets into GitHub Actions, GitLab CI, Jenkins or any build system
- Scripts and automation — fetch secrets from cron jobs, deployment scripts or infrastructure tools
- Non-Kubernetes servers — any server or VM that needs secrets at runtime
- Local development — the CLI creates short-lived tokens automatically when you run
ek login, but you can create longer-lived tokens for shared tooling
Token types
Enkryptify has two token types:| Type | Created by | Lifetime | Use case |
|---|---|---|---|
| Static | You, from the dashboard | 24 hours to 6 months | CI/CD, scripts, servers |
| CLI | The CLI, during ek login | 8 hours | Local development |
Creating a token
Configure the token
Fill in the form:
- Name — a label to identify this token (e.g.
github-actions-prod,deploy-script) - Permission —
Read onlyorRead & Write. Use read-only unless your workflow needs to create or update secrets - Scope — toggle off “Full workspace access” to restrict the token to specific teams, projects or environments
- Expiration — how long the token is valid (24 hours to 6 months)
Using a token
Exchange for a JWT
API tokens are not used directly for API calls. Instead, you exchange the token for a short-lived JWT:Use the JWT
Use the JWT as a Bearer token for all API calls:SDK usage
The Enkryptify SDK handles the exchange and refresh automatically:Rotating a token
Rotation generates a new token value while keeping the same name, permission and scope. The old token is immediately revoked.- Go to Credentials
- Click the actions menu (three dots) on the token row
- Click Rotate
- Copy the new token value (shown once, same as during creation)
Revoking a token
Revoking a token invalidates it immediately. Any application using the token will lose access within 15 minutes (when the current JWT expires).- Go to Credentials
- Click the actions menu on the token row
- Click Revoke
- Confirm the revocation
Revocation cannot be undone. You will need to create a new token if you need access again.
CI/CD examples
GitHub Actions
Store the token as a repository or organization secret, then use it in your workflow:GitLab CI
Add the token as a CI/CD variable (masked and protected), then reference it in your pipeline:Best practices
- Use the shortest expiration that works. A deploy script that runs daily doesn’t need a 6-month token.
- One token per use case. Don’t share a token across unrelated pipelines. If one is compromised, you can revoke it without affecting others.
- Scope tokens narrowly. A production deploy token should only have access to the production environment, not the entire workspace.
- Use read-only unless you need write. Most CI/CD pipelines only need to read secrets.
- Store tokens in your CI provider’s secret storage. Never commit tokens to source code or configuration files.
- Rotate tokens regularly. Set a reminder to rotate long-lived tokens every 30-60 days.