Skip to main content
This CLI is deprecated. The new Telnyx CLI uses environment variables only (TELNYX_API_KEY). Profile management is not available in the new CLI.

Authentication Methods

The legacy CLI supports three authentication methods, checked in order: flag → environment variable → config file.
You’ll be prompted to enter your API key. Configuration is stored in ~/.config/telnyx/config.json.

2. Environment Variable

3. Command-Line Flag

Verify Authentication

Example output:

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:
Keep your config file secure. It contains sensitive API keys. The file is created with restricted permissions (600) by default.

Environment Variables

Getting Your API Key

  1. Log in to the Telnyx Portal
  2. Navigate to API Keys
  3. Click Create API Key
  4. 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