Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now
Build the future of communications.
Start building for free
  • By Dotun Jolaoso
    How to Unit Test a Laravel API with the Pest Framework How to Unit Test a Laravel API with the Pest Framework

    Pest is a new testing PHP Framework developed by Nuno Maduro. While Pest itself is built on top of PHPUnit, the popular and widely adopted PHP testing framework, Pest aims to provide a better experience for writing tests. The philosophy is simple. Keep the TDD experience simple and elegant by providing expressive interfaces.

    In this tutorial, we’ll be looking at how to get started using Pest in a Laravel project. Using the test-driven approach, we’ll be building a simple to-do application that allows you to create, edit, update and delete tasks.

    Technical Requirements

    • PHP version 7.3 or higher. Pest requires PHP 7.3+ to work.
    • Laravel 8.
    • Composer.
    • A basic understanding of PHPUnit.
    • A basic understanding of SQLite. We’ll be making use of SQLite because it makes running our tests faster.

    Set up Laravel

    There are different ways to set up a new Laravel project. You can …

    Read More
  • By Dotun Jolaoso
    Build a Real-Time SMS Dashboard with Python, Flask and Twilio Sync Build a Real-Time SMS Dashboard with Python, Flask and Twilio Sync

    Twilio Sync provides you with a set of intuitive APIs that allow you to synchronize application state across mobile apps and websites in real-time. Some example use cases where you can make use of Twilio Sync within your application include:

    • Real-time Dashboard Charts
    • Broadcasting notifications to users in real-time
    • Real-time Collaboration Software such as Google Docs.

    In this tutorial, we’ll use Python and the Flask framework to build a dashboard that displays SMS messages in real-time as they are sent to your Twilio phone number.

    Technical requirements

    To follow along, you’ll need the following:

    • A free Twilio account and a Twilio phone number. If you use this link to register, you will receive $10 credit when you upgrade to a paid account.
    • Python 3.6 or newer
    • Ngrok. This will make the development version of our application accessible over the Internet.

    Creating a Python environment

    Let’s create a directory …

    Read More
  • By Dotun Jolaoso
    Send SMS Notifications for Gumroad Orders with Python and Twilio Send SMS Notifications for Gumroad Orders with Python and Twilio

    Gumroad is a simple ecommerce tool that allows creators to sell digital products such as films, courses, e-books etc. Gumroad provides Ping, which is an alert in the form of an HTTP POST request that notifies you in real time whenever a product has been purchased.

    In this tutorial we’ll build a Flask application that automatically sends you SMS notifications whenever there is a sale of one of your products on Gumroad.

    Technical requirements

    To follow along, you’ll need the following:

    Creating a Python environment

    Let’s create a …

    Read More
  • By Dotun Jolaoso
    Build a Serverless User Verification Service with Python, Twilio Verify and the Chalice Framework Build a Serverless User Verification Service with Python, Twilio Verify and the Chalice Framework

    Chalice is a Python Framework for writing, building and deploying serverless applications. It was built and is currently maintained by the team at AWS. Using familiar decorator-based syntax that is common within popular Python frameworks such as Flask, FastAPI, etc, Chalice is easy to get started with. In this tutorial, we’ll see how to deploy a Chalice application that integrates with the Twilio Verify Service to AWS Lambda.

    The application that we’ll build exposes a set of API endpoints to send verification codes to phone numbers via SMS, and then verifying them once the user receives them and sends them back. This is useful in scenarios where you would like to add phone number verification or two-factor authentication to your application.

    Technical requirements

    To follow along, you’ll need the following:

    • An AWS account. If you don’t have one, you can sign up here to enjoy a generous allowance during …
    Read More
  • By Dotun Jolaoso
    Recording and Saving Outbound Voice Calls with Python, Twilio and Dropbox Recording and Saving Outbound Voice Calls with Python, Twilio and Dropbox

    In this tutorial, we’ll be looking at how to record outbound voice calls via the Twilio Programmable Voice API as well as uploading the recordings to Dropbox using the Dropbox API. So basically, person #1 would call your Twilio number, ask to call a person #2 by entering their phone number, and then the call between person #1 and person #2 would be recorded and sent to Dropbox.

    Technical requirements

    To follow along, you’ll need the following:

    • A free Twilio Account. If you use this link to register, you will receive $10 credit when you upgrade to a paid account.
    • Python Development Environment
    • Ngrok. This will make the development version of our application accessible over the Internet.
    • A free Dropbox Account.

    Creating a Python environment

    Let’s create a directory where our project will reside. From the terminal, run the following command:

    $ mkdir twilio_outbound_dropbox
    

    Next, cd into …

    Read More
  • By Dotun Jolaoso
    Build an SMS Reminder Service using Python and Twilio Build an SMS Reminder Service Using Python and Twilio

    There are different scenarios within your applications where you would like to send reminders. For example, maybe you would like to send appointment reminders to your users or happy birthday wishes, this tutorial can serve as a great starting point for that. In this tutorial, we’ll be looking at how we can build an SMS Reminder Service using Python and Twilio.

    Technical Requirements

    To follow along, you’ll need the following:

    Creating a Python environment

    Let’s create a directory where our project will reside. From the terminal, run the following command:

    $ mkdir twilio_sms_reminders
    

    Next, cd into the project directory and run the following command to create a virtual environment. …

    Read More
  • By Dotun Jolaoso
    Log Incoming SMS Messages to Airtable using Laravel and Twilio Log Incoming SMS Messages to Airtable using Laravel and Twilio.png

    In this tutorial, we’ll be looking at how to keep track of Incoming SMS messages sent to your Twilio Phone Number on Airtable. Everytime your Twilio phone number receives an SMS message, we’ll forward the content of the message and some other important information about the message to a table in Airtable.

    Technical Requirements

    You will need the following to complete this tutorial:

    Setting up Laravel

    There are different ways to set up a new Laravel project. You can do so via the Laravel installer or by using Composer. For the sake of this tutorial, we’ll be using Composer.

    Run the following command in your terminal:

    $ composer create-project --prefer-dist laravel/laravel twilio-airtable
    

    This will set up a new Laravel project for us in the twilio-airtable directory.

    Next, we’ll be installing a Laravel package that …

    Read More
  • By Dotun Jolaoso
    Build a WhatsApp Bitcoin Currency Conversion Bot with Python and Twilio Build a WhatsApp Bitcoin Currency Conversion Bot with Python and Twilio

    In this tutorial, we’ll be looking at how to build a simple WhatsApp chatbot that handles the conversion of any given number of Bitcoin units to the equivalent in a preferred currency. The bot will be built using Twilio API for WhatsApp and the Flask Framework for Python.

    Technical requirements

    To follow along, you’ll need the following:

    • A free Twilio Account. If you use this link to register, you will receive $10 credit when you upgrade to a paid account.
    • Python 3.6 or newer
    • Ngrok. This will make the development version of our application accessible over the Internet.
    • A smartphone with an active number and WhatsApp installed.

    Creating a Python environment

    Let’s create a directory where our project will reside. From the terminal, run the following command:

    $ mkdir twilio_whatsapp_bot
    

    Next, cd into the project directory and run the following command to create a virtual environment.

    $ python …
    Read More
  • By Dotun Jolaoso
    Build a WhatsApp Currency Conversion Bot with Twilio and Laravel Build a WhatsApp Currency Conversion Bot with Twilio and Laravel

    Over the years, we’ve seen a steady increase in the number of bots and chatbots available to us over different platforms. Brands make use of bots as an exciting way to engage customers, while also providing a way to automate what could normally be considered, monotonous conversations. With it’s over 1.5 billion users and growing, and familiar chat technology, WhatsApp presents a strong case for building a chatbot on it’s platform.

    In this tutorial, we’ll be looking at how we can build a WhatsApp Currency Conversion Bot for converting multiple currencies using the Twilio API for WhatsApp.

    Technical Requirements

    You will need the following to complete this tutorial:

    Setting up Laravel

    There are different ways to set up a new Laravel project. You can do so via the Laravel installer or by …

    Read More
  • By Dotun Jolaoso
    Voice and SMS One-Time Passwords with Python and Twilio Voice and SMS One-Time Passwords with Python and Twilio

    One-time passwords (OTPs) contain numeric or alphanumeric codes that are used to provide an extra layer of security for your applications, by ensuring that a user is authenticated for a particular transaction or a login session. In this tutorial, we’ll be building a simple Flask application that generates and validates OTPs that are delivered to users via Voice or SMS channels using Twilio.

    Technical requirements

    To follow along, you’ll need the following:

    • A free Twilio Account. If you use this link to register, you will receive $10 credit when you upgrade to a paid account.
    • Python 3.6 or newer.
    • A phone line that can receive voice calls and/or SMS.

    Creating a Python environment

    Let’s create a directory where our project will reside. From the terminal, run the following command:

    $ mkdir twilio_otp
    

    Next, cd into the project directory and run the following command to create a virtual environment.

    $ …
    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.