Skip to main content
Set up your Twilio account and configure credentials for the CLI.

Prerequisites

  • A Twilio account (sign up at twilio.com)
  • A Twilio phone number
  • Account SID and Auth Token from the Twilio Console

Get Twilio Credentials

Account SID and Auth Token

  1. Log in to the Twilio Console
  2. On the dashboard, find Account Info
  3. Copy your Account SID (starts with AC)
  4. Copy your Auth Token (click the eye icon to reveal)

Phone Number

  1. Go to Phone NumbersManageActive numbers
  2. Click on your number to view details
  3. Copy the phone number in E.164 format (e.g., +15551234567)
If you don’t have a number, go to Phone NumbersBuy a number to purchase one.

Configure via CLI

Interactive Setup

The easiest way is to run consuelo init:
consuelo init
Choose Self-hosted when prompted, then enter your Twilio credentials when asked.

Manual Configuration

Set each credential individually:
consuelo config set twilio.accountSid ACxxxxxx
consuelo config set twilio.authToken your_auth_token
consuelo config set twilio.phoneNumber +15551234567

Verify Configuration

Check that Twilio is configured:
consuelo status
Output shows:
Configuration: ~/.consuelo/config.json
Twilio:
  Account SID: ACxxxxxx ✓
  Auth Token: ******** ✓
  Phone Number: +15551234567 ✓

Test Your Setup

Make a test call:
consuelo calls start +15559876543
Replace the number with your own mobile number to verify the call connects.

Local Presence Setup

To use local presence (auto-selecting area codes), you need multiple phone numbers.

Provision Additional Numbers

  1. Go to Phone NumbersBuy a number
  2. Search for numbers in different area codes
  3. Purchase numbers for areas you call frequently

Enable Local Presence

consuelo config set twilio.localPresence true

Use Local Presence on Calls

consuelo calls start +15551112222 --local-presence
The CLI selects the number closest to the recipient’s area code.

TwiML App Configuration

For transfers and advanced features, configure a TwiML App:
  1. Go to VoiceTwiMLApps
  2. Create a new app or edit existing
  3. Set Voice URL to your webhook endpoint:
    • Hosted: https://consuelo.consuelohq.com/api/v1/voice/twiml
    • Self-hosted: https://your-domain.com/api/v1/voice/twiml
  4. Set Voice Method to POST
Without the TwiML app configured, basic calls work but transfers will fail.

Troubleshooting

”Authentication failed”

  • Verify Account SID starts with AC
  • Check Auth Token is correct (no trailing spaces)
  • Ensure the account is active (not suspended)

“Number not found”

  • Ensure the phone number is in E.164 format: +<country><number>
  • Verify the number is assigned to your Twilio account
  • Check the number is not in use by another application

”Insufficient balance”

  • Add funds to your Twilio account
  • Check usage limits in Twilio Console

”Number not provisioned”

  • The phone number must be active in your Twilio account
  • Wait 1-2 minutes after purchasing a new number

Next Steps