Login
The primary way to authenticate is using the interactive login command:Terminal
- Open your default browser to the Checkly authentication page
- Prompt you to log in to your Checkly account
- Generate an API key that the CLI will use for authentication
- Store the credentials securely on your local machine
Log Out
To log out and clear your stored credentials:Terminal
Other Authentication Options
Environment Variables
You can also authenticate using environment variables, which is useful for CI/CD pipelines and automated environments: To get your API key:- Log in to your Checkly dashboard
- Navigate to Account Settings → API Keys
- Create a new API key
- Use the key in your environment variables or CLI configuration
Terminal
Terminal
Multiple Accounts
If you work with multiple Checkly accounts, you can switch between them:Terminal
Security Best Practices
- Never commit API keys to version control
- Use environment variables in production environments
- Rotate API keys regularly for security
Troubleshooting
Common Issues
“Authentication failed” error:- Verify your API key is correct
- Check that your account ID is correct (if specified)
- Ensure your API key hasn’t expired
- Decline to open the browser automatically and navigate to the authentication URL shown in the terminal
- Copy and paste the URL into your browser