Command

nylas auth login

Authenticate with a provider (Gmail, Outlook, etc.) to connect your mailbox.

Written by Qasim Muhammad Staff SRE

What does nylas auth login do?

The nylas auth login command connects your email account to the CLI via OAuth. It opens a browser window, walks you through the provider's consent flow, and stores the grant locally. Supports Gmail, Outlook, Exchange, Yahoo, iCloud, and IMAP providers. Once authenticated, all email, calendar, and contact commands work against that account.

Usage

nylas auth login

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
--provider(-p)Email provider (google, microsoft, ews, icloud, yahoo, imap)

Examples

The nylas auth login command connects your email account to the CLI via OAuth.

Connect Gmail or Outlook

nylas auth login
# Opens browser for OAuth; follow prompts to connect

Example output

Opening browser for Google OAuth...
→ https://accounts.google.com/o/oauth2/auth?...

✓ Authenticated as alice@example.com
✓ Grant created: grant_abc123
✓ Set as active account

Troubleshooting

OAuth fails or times out

Ensure you're using a supported browser. Try clearing cookies for the auth domain.

Recommended guides

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