Authentication
Authenticate with Transactional and manage organizations from the CLI.
Authentication
The CLI uses device code flow for secure authentication. This opens your browser to complete login without exposing credentials in the terminal.
Login
transactional loginThis will:
- Display a verification code
- Open your browser to the authorization page
- Wait for you to approve the code
- Store the authentication token securely
Login Options
| Option | Description |
|---|---|
-f, --force | Force new login even if already logged in |
Example
# Standard login
transactional login
# Force re-authentication
transactional login --forceNote: For MCP integration with Claude, authentication is handled automatically via OAuth 2.1. You don't need to run transactional login first - Claude will prompt you to authorize when you first use a Transactional tool. See MCP Setup for details.
Logout
Log out from all organizations:
transactional logoutThis removes all stored credentials.
Who Am I
Check your current authentication status:
transactional whoamiOutput includes:
- User ID and email
- Current organization (name, slug, role)
- Session information
Options
| Option | Description |
|---|---|
-o, --org <slug> | Show info for a specific organization |
--json | Output as JSON |
Organization Management
List Organizations
View all organizations you have access to:
transactional org listThe current organization is marked with *.
Select Organization
Set the active organization for CLI commands:
transactional org use <slug>Quick Switch
Use the switch command as a shortcut:
transactional switch <slug>Or without a slug to see an interactive picker:
transactional switchShow Current Organization
transactional org currentPer-Command Organization Override
Any command can target a different organization using the -o flag:
# Send email from a specific organization
transactional email send \
-o my-other-org \
--from "hello@example.com" \
--to "user@example.com" \
--subject "Test" \
--html "<p>Hello</p>"Token Storage
Tokens are stored in ~/.transactional/credentials.json. This file is created with restricted permissions (readable only by you).
To view the credentials file location:
transactional config pathSession Types
| Type | Description | Expiration |
|---|---|---|
CLI | Standard CLI sessions | 90 days |
MCP | MCP OAuth sessions (managed by Claude) | 90 days |
Troubleshooting
"Not logged in" errors
Run transactional login to authenticate.
"Organization not found"
- Check available organizations:
transactional org list - Verify the slug spelling
- Ensure you have been invited to the organization
Token expired
Run transactional login --force to get a new token.
On This Page