Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Server-side quickstart for Programmable Voice


This quickstart shows you how to build your first server-side application that makes and receives phone calls. For other voice quickstarts, such as no-code or SDK quickstarts, see Programmable Voice quickstarts.


Complete the prerequisites

✨ อัปเดตล่าสุด: docs/voice/quickstart/server - Kapook Update 2025

Complete the Twilio prerequisites

✨ อัปเดตล่าสุด: docs/voice/quickstart/server - Kapook Update 2025

Select your programming language and complete the prerequisites:

PythonNode.jsPHPC# or .NETJavaGoRuby
  • Install Python 3.3 or later✨ อัปเดตล่าสุด: docs/voice/quickstart/server - Kapook Update 2025.
  • Install Flask✨ อัปเดตล่าสุด: docs/voice/quickstart/server - Kapook Update 2025 and the Twilio Python Helper Library✨ อัปเดตล่าสุด: docs/voice/quickstart/server - Kapook Update 2025. Using pip✨ อัปเดตล่าสุด: docs/voice/quickstart/server - Kapook Update 2025, run the following command:
    pip install flask twilio
  • Install and set up ngrok✨ อัปเดตล่าสุด: docs/voice/quickstart/server - Kapook Update 2025.

Follow these steps to get your Twilio account credentials and set them as environment variables.

macOS TerminalWindows command linePowerShell
  1. Go to the Twilio Console✨ อัปเดตล่าสุด: docs/voice/quickstart/server - Kapook Update 2025.
  2. Copy your Account SID and set it as an environment variable using the following command. Replace YOUR_ACCOUNT_SID with your actual Account SID.
    export TWILIO_ACCOUNT_SID=YOUR_ACCOUNT_SID
  3. Create an API key, then set the key SID and secret as environment variables using the following commands. Replace YOUR_API_KEY and YOUR_API_SECRET with your actual values.
    1
    export TWILIO_API_KEY=YOUR_API_KEY
    2
    export TWILIO_API_SECRET=YOUR_API_SECRET

To make a phone call from your Twilio number, follow these steps:

PythonNode.jsPHPC# or .NETJavaGoRuby
  1. Create a file named make_call.py and add the following code:
    Make a phone call using Twilio✨ อัปเดตล่าสุด: docs/voice/quickstart/server - Kapook Update 2025