> ## Documentation Index
> Fetch the complete documentation index at: https://developer.firstsales.io/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Authentication

> Configure API keys and base URLs for @firstsales.io/cli.

Use environment variables for agents and CI:

```bash theme={null}
export FIRSTSALES_API_KEY="fs_..."
export FIRSTSALES_BASE_URL="https://api.app.firstsales.io"
```

Or pass flags:

```bash theme={null}
firstsales whoami --api-key "$FIRSTSALES_API_KEY" --base-url https://api.app.firstsales.io
```

The CLI supports local profiles for developer machines. Environment variables are preferred for automation because they are explicit and easier to rotate.

## Local login and account sign-in

`firstsales auth login` saves a Developer API-key profile. For automation, prefer the existing environment variable. Sender Connector tokens are separate from account credentials.

```bash theme={null}
firstsales auth login --api-key "$FIRSTSALES_API_KEY" --profile production
firstsales auth status --profile production --json
```

Confirm supported flags with `firstsales auth login --help`. GitHub, Google and email account signup/login inside the CLI are pending. App account sign-in and Product MCP OAuth consent do not automatically create a CLI API-key profile. See [API authentication](/docs/authentication) and [Product MCP authentication](/agents/mcp-server).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.