Authentication Methods
The legacy CLI supports three authentication methods, checked in order: flag → environment variable → config file.1. Interactive Setup (Recommended)
~/.config/telnyx/config.json.
2. Environment Variable
3. Command-Line Flag
Verify Authentication
Multiple Profiles
Use named profiles to manage multiple Telnyx accounts or environments.Create a Profile
List Profiles
Use a Profile
Set Default Profile
Delete a Profile
Configuration File
The CLI stores configuration in~/.config/telnyx/config.json:
Environment Variables
| Variable | Description |
|---|---|
TELNYX_API_KEY | API key (overrides config file) |
TELNYX_PROFILE | Default profile name |
TELNYX_CONFIG_DIR | Custom config directory |
Getting Your API Key
- Log in to the Telnyx Portal
- Navigate to API Keys
- Click Create API Key
- Copy the key (it won’t be shown again)
API keys start with
KEY_. If you’re using a v1 API key, you’ll need to create a new v2 key.Next Steps
Command Reference
Full command reference for the legacy CLI