CLI Reference

whatalo login

Authenticate the CLI with your Whatalo developer account using a browser-based Device Flow.

Syntax

whatalo login [options]

Options

FlagTypeDescription
--portal-url <url>stringDeveloper Portal URL
--forcebooleanRe-authenticate even if already logged in

How It Works

whatalo login uses the RFC 8628 Device Authorization Grant so your credentials are entered in the browser, never in the terminal.

Step-by-step flow

  1. Without --force, the CLI first checks for an existing valid session. If one exists, it prints:
    Already logged in as [email protected]. Use --force to re-authenticate.
  2. If no valid session exists (or --force is used), the CLI requests a device code from the portal
  3. Your browser opens automatically at the verification URI showing a user code
  4. Approve the request in the browser
  5. The CLI polls every 5 seconds until the browser confirms approval
  6. On success, tokens are saved to ~/.whatalo/session.json

Token storage

LocationPermissions
~/.whatalo/ (directory)700
~/.whatalo/session.json (file)600

The access token has a 1-hour TTL and is automatically refreshed. The refresh token lasts 30 days and rotates on every use.

Examples

Authenticate for the first time:

whatalo login

Force re-authentication (useful when switching accounts):

whatalo login --force

Authenticate against a self-hosted portal:

whatalo login --portal-url https://developers.your-company.com

Error Messages

MessageCause
Already logged in as {email}. Use --force to re-authenticate.Valid session already exists
The confirmation code has expired. Please try again.Browser verification took longer than allowed
Access was denied. Please try again.User rejected the request in the browser
Login failed: {message}Network error or portal returned an unexpected response

On this page