Kubiya LogoKubiya Developer Docs

Authentication

Authenticating the Kubiya CLI with the Kubiya Platform.

Authentication

Before using the CLI to interact with the Kubiya Agentic Platform, you need to authenticate. The CLI uses API keys for authentication.

Authentication Methods

Set environment variable

# For temporary use in current terminal session
export KUBIYA_API_KEY=YOUR_API_KEY
 
# For permanent use (add to your shell profile)
echo 'export KUBIYA_API_KEY=YOUR_API_KEY' >> ~/.bashrc  # or ~/.zshrc

Verify auth works with the variable

kubiya version

Be careful not to expose your API key in scripts or logs.

Security Best Practices

  • Store API keys securely using environment variables or secure secret managers
  • Use scoped API keys with the minimal permissions needed for your use case
  • Regularly rotate API keys, especially for shared or automated systems
  • Avoid storing API keys in code repositories or unencrypted files

Troubleshooting

If you encounter authentication issues:

  1. Verify your API key is valid and has not expired
  2. Check that you're connecting to the correct Kubiya instance URL
  3. Ensure network connectivity to the Kubiya API endpoint
  4. Check for any firewalls or proxy settings that might block connections
  5. Run kubiya --debug version for detailed diagnostic information

On this page