Company
Date Published
Author
Miguel Grinberg
Word count
1084
Language
English
Hacker News points
None

Summary

You can make a voice call directly from your application or script using Twilio Programmable Voice. To start, set up your environment by creating a new directory and defining your Twilio account credentials as environment variables. Buy a Twilio phone number to use for the call. Create a TwiML Bin, which is Twilio's markup language used to provide instructions on how to handle events during a call. In a shell script, use `curl` to make a POST request to the Twilio API with the TwiML Bin URL, your phone number, and Twilio credentials. When you run the script, it will prompt you to press Enter to initiate the call, which will play a text-to-speech message from the TwiML Bin.