v1.0.0
API Keys & Authentication
Secure your LastMile deployments with proper authentication and API key management.
Types of Keys
USER
Personal Access Tokens
Used for local development and CLI authentication. Tied to your user account.
Scope: Full access to your projects
SERVICE
Service Tokens
Used for CI/CD pipelines and automated systems. Can be scoped to specific projects.
Scope: Configurable per-project access
DEPLOY
Deploy Keys
Read-only keys for pulling configurations in production environments.
Scope: Read-only configuration access
Creating API Keys
Via CLI
TERMINAL
$lastmile auth create-token --type service --name "CI Pipeline"
> Token created successfully
> lm_svc_a1b2c3d4e5f6...
> Store this token securely - it won't be shown again
Environment Variables
LastMile reads authentication from these environment variables:
LASTMILE_TOKENPrimary authentication tokenLASTMILE_PROJECT_IDOverride project IDLASTMILE_API_URLCustom API endpoint (enterprise)Security Warning
Never commit API keys to version control. Use environment variables or secret management tools like Vault, AWS Secrets Manager, or GitHub Secrets.