Skip to content

Authentication

The Doover CLI requires authentication to interact with the Doover platform. There are two primary authentication methods: interactive login for development and token-based authentication for CI/CD pipelines.

Interactive Login

The doover login command provides an interactive way to authenticate with your Doover account using username and password.

Usage

doover login

You will be prompted for:

PromptDescriptionDefault
Doover usernameYour Doover account username(required)
Doover passwordYour Doover account password(required)
Base API URLThe Doover API endpointhttps://my.doover.com
Profile nameName for this configuration profiledefault

Example

$ doover login
Doover username: myuser@example.com
Doover password: ********
Base API URL: https://my.doover.com
Profile name: default
Login successful.

Command-Line Options

You can also provide credentials as command-line options:

doover login \
  --username myuser@example.com \
  --password mypassword \
  --base-url https://my.doover.com \
  --profile-name production

Token-Based Authentication

For CI/CD pipelines and automated workflows, use doover configure-token to set up authentication with a long-lived API token.

Usage

doover configure-token

You will be prompted for:

PromptDescriptionDefault
API TokenLong-lived API token from Doover(required)
Agent IDDefault agent ID to use for operations(required)
Base API URLThe Doover API endpointhttps://my.doover.com
Profile nameName for this configuration profiledefault
Token expiryNumber of days until token expiresNone (no expiry)

Example

$ doover configure-token
API Token: your-api-token-here
Agent ID: abc123
Base API URL: https://my.doover.com
Profile name: ci-pipeline
Token expiry (in days): 365
Successfully configured doover credentials.

Command-Line Options

doover configure-token \
  --token your-api-token \
  --agent-id abc123 \
  --base-url https://my.doover.com \
  --profile ci-pipeline \
  --expiry 365

Obtaining an API Token

API tokens can be generated from the Doover web interface:

  1. Log in to the Doover platform
  2. Navigate to your account settings
  3. Go to the API tokens section
  4. Generate a new token with the required permissions

Configuration Profiles

The CLI supports multiple configuration profiles, allowing you to switch between different accounts or environments.

How Profiles Work

  • Credentials are stored per profile
  • The default profile is used when no profile is specified
  • You can create profiles for different environments (development, staging, production)

Specifying a Profile

Most commands accept a --profile option:

doover channel get my-channel --profile production

Profile Storage

Configuration is stored by pydoover's ConfigManager. Each profile entry contains:

  • Username and password (for login-based auth)
  • API token and expiry (for token-based auth)
  • Base URL
  • Default agent ID

Environment Variables

For CI/CD environments, you can configure authentication using environment variables instead of stored profiles.

VariableDescription
DOOVER_API_TOKENAPI token for authentication
DOOVER_API_BASE_URLBase URL for the Doover API

Example CI/CD Configuration

# GitHub Actions example
env:
  DOOVER_API_TOKEN: ${{ secrets.DOOVER_API_TOKEN }}
  DOOVER_API_BASE_URL: https://my.doover.com

steps:
  - name: Deploy to Doover
    run: doover app publish --skip-container
# Shell script example
export DOOVER_API_TOKEN="your-token-here"
export DOOVER_API_BASE_URL="https://my.doover.com"
doover app publish

Switching Environments

When working with multiple Doover environments (development, staging, production), create separate profiles:

# Configure development environment
doover login --profile dev --base-url https://dev.doover.com

# Configure staging environment
doover configure-token --profile staging --base-url https://staging.d.doover.com

# Configure production environment
doover configure-token --profile prod --base-url https://my.doover.com

Then use the --profile option with commands:

# Deploy to staging
doover app publish --profile staging

# Check channels in production
doover channel get my-channel --profile prod

Troubleshooting

Login Failed

If you see "Login failed. Please try again.", verify:

  • Your username and password are correct
  • The base URL is accessible
  • Your account has the necessary permissions

Enable debug mode for more details:

doover --debug login

Token Configuration Errors

Common errors when configuring tokens:

ErrorCauseSolution
"Agent token was incorrect"Invalid API tokenVerify the token in the Doover web interface
"Agent ID or Base URL was incorrect"Invalid agent ID or URLCheck the agent ID and ensure the URL is correct
"Base URL was incorrect"Cannot reach the APIVerify network connectivity and URL

Profile Already Exists

When configuring a profile that already exists:

$ doover configure-token --profile default
There's already a config entry with this profile. Do you want to overwrite it? [y/N]

Confirm with y to overwrite, or use a different profile name.