Command

nylas auth config

Configure API credentials for the Nylas CLI.

Written by Qasim Muhammad Staff SRE

What does nylas auth config do?

The nylas auth config command stores your Nylas API key so the CLI can authenticate requests to Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP providers. Run it interactively or pass --api-key for CI/CD pipelines and scripts. Credentials are saved to ~/.config/nylas/ by default.

Usage

nylas auth config [--api-key KEY]

Flags

FlagDescription
--jsonOutput as JSON
--no-colorDisable color output
--verbose(-v)Enable verbose output
--configCustom config file path
--help(-h)Show help for the command
--limitLimit results (most list commands)
--yes(-y)Skip confirmations
--api-keySet API key directly (non-interactive)
--client-idNylas Client ID (auto-detected if not provided)
--region(-r)API region (us or eu)
--resetReset all configuration

Examples

Interactive configuration

nylas auth config
# Paste your API key when prompted

Non-interactive (CI/scripts)

export NYLAS_API_KEY=your_api_key
nylas auth config

Example output

✓ Configuration saved
  API Key: nyl_••••••••••••a1b2
  Client ID: app-7f3c (auto-detected)
  Region: us

✓ Credentials stored in system keyring

Troubleshooting

Invalid API key

Verify your key at dashboard-v3.nylas.com. Ensure no extra spaces when pasting.

Config not persisting

Check write permissions for ~/.config/nylas/ or the path in --config.

Recommended guides

Run nylas auth config --help for full help output.