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 Sam Agnew
    Identifying Phone Number Line Types with Twilio Lookup and Node.js Copy of Generic Blog Header 2 (3).png

    While the Twilio Messaging API won't charge you for attempting to send an SMS to a landline number, identifying the line type of a phone number can be useful for other reasons. A lot of businesses won't let users sign up with VoIP numbers, for example.

    Let's walk through how to identify a phone number's line type with Twilio Lookup and Node.js.

    Setting up

    For this post you will need:

    To install the Twilio npm module, navigate to the directory where you want this code to live and navigate to the directory where you want this code to live and run the following command in your terminal to create a package for this project:

    npm init --yes
    

    The --yes argument just runs through all of the prompts that you would otherwise …

    Read More
  • By Sam Agnew
    Identifying Phone Number Carriers with Node.js and Twilio Lookup Copy of Generic Blog Header 2 (2).png

    Trolls and bad actors sometimes use phone numbers from free online providers to create fake profiles for making spam calls. Twilio's Lookup API helps you identify the carrier behind the phone number to learn which users have real mobile numbers.

    Setting up

    To lookup a phone number you will need:

    To install the Twilio npm module, navigate to the directory where you want this code to live and navigate to the directory where you want this code to live and run the following command in your terminal to create a package for this project:

    npm init --yes
    

    The --yes argument just runs through all of the prompts that you would otherwise have to fill out or skip. Now that we have a package.json for our app, let’s install the Twilio module …

    Read More
  • By Sam Agnew
    Identifying Phone Number Carriers in Python with Twilio Lookup Copy of Generic Blog Header 2 (1).png

    Trolls and bad actors sometimes use phone numbers from free online providers to create fake profiles for making spam calls. Twilio's Lookup API helps you identify the carrier behind the phone number to learn which users have real mobile numbers.

    Setting up

    To lookup a phone number you will need:

    To install the Twilio Python module, navigate to the directory where you want this code to live and make sure you create a virtual environment. Once you have a virtual environment activated, run the following command to install the dependencies:

    pip install twilio==6.31.1
    

    After this you should be good to write some code!

    Looking up a carrier with Twilio

    You can query the Twilio Lookup API for information about a phone number. There are two Type …

    Read More
  • By Miguel Grinberg
    Add Two-Factor Authentication to a Python Flask Application with Twilio Verify Add Two-Factor Authentication to a Python Flask application with Twilio Verify

    Twilio Verify is an easy-to-use service that allows your application to send verification codes to your users via SMS or phone call. While the main purpose of this API is to verify users when they sign up for a new account, I want to show you how the same functionality can be used to quickly implement two-factor authentication support.

    In this article I’m going to take a complete, non-trivial Python application that uses the Flask framework and modify it to allow users to optionally enable two-factor authentication on their accounts. The application that I’m going to use for this exercise is the one featured in my Flask Mega-Tutorial, a microblogging web application very appropriately, though unoriginally called Microblog.

    To give you a taste of what this looks like once implemented, below you can see how a user enables two-factor authentication on this application:

    Two-factor authentication demo

    Once two-factor is enabled, the …

    Read More
  • By Evangelos Resvanis
    How to Build an Image Classifier with Twilio Autopilot image-classifier-autopilot.png

    In this article, I will show you one of the many possible ways to build an Image Classifier using Twilio Autopilot in your flow. We will use Node.js with TensorFlow and show the final result on WhatsApp.

    Let's get started.

    Pre-requisites

    Our Image Classifier is based on Transfer Learning using TensorFlow. Transfer Learning is a great way to build on top of thousands of existing training models that are already available, saving you valuable development time and resources. To learn more about it and apply your own logic, check out this TensorFlow image retraining tutorial.

    Install TensorFlow by following these relevant steps

    The Main Components

    The building blocks for this demo code are the following:

    • A Node.js Express-based app to handle all incoming requests (for example, getting the name of the new set of images you want to train the bot with; e.g. "polar bear")
    • Script for …
    Read More
  • By Tilde Thurium
    Sending Bulk Emails With Twilio SendGrid and Python Sending Bulk Emails with Twilio SendGrid and Python

    Sending a single email is great, but one of the big advantages of email is the ability to quickly reach a wide audience. Today I’ll show you how to send mass emails with Python and SendGrid. Just for fun, let’s say you’re a Python developer who works at a donut shop. You need a way of letting the customers who have signed up for your email list know when fresh donuts have come straight out of the oven. 🍩

    Prerequisites

    Read More
  • By Brian Iyoha
    Building a Food Ordering App in PHP with Laravel and Twilio SMS Building a Food Ordering App in PHP with Laravel and Twilio SMS

    In this tutorial, I will teach you how to use Twilio’s Programmable SMS to create an SMS based food ordering service using Laravel. After we’re finished, your users will be able to place orders for food items via SMS.

    Prerequisites

    In order to follow this tutorial, you will need:

    Getting Started

    Start off by creating a new Laravel project. This can be done using either the Laravel installer or Composer. We will be making use of the Laravel installer in this tutorial. If you don’t have it installed, you can check out how to do so from the Laravel documentation.

    To generate a fresh Laravel project, run the following command on your terminal:

    $ laravel new twilio-food-ordering
    

    Next, proceed to install the Twilio SDK for PHP. Change your working directory to …

    Read More
  • By Sam Agnew
    Scheduling Tasks in Python with Redis Queue and RQ Scheduler Copy of Generic Blog Header 3.png

    Executing specific code at specific times is a common task in Python. There are a variety of tools to solve this issue, but RQ Scheduler is a lightweight, elegant solution built on top of another tool with a low barrier to entry called Redis Queue.

    With RQ Scheduler, all you need to do is create a Scheduler object and provide it with a Python datetime and a function to execute, along with any arguments you want to pass to the function:

    from datetime import datetime
    
    from redis import Redis
    from rq_scheduler import Scheduler
    
    from some_module import arbitrary_function
    
    scheduler = Scheduler(connection=Redis()) # Get a scheduler for the "default" queue
    scheduler.enqueue_at(datetime(2020, 1, 1), arbitrary_function) # Date time should be in UTC
    

    Let’s walk through how to queue up a function that notifies you when the International …

    Read More
  • By Sara Saedinia
    Scaling Our Infrastructure for 4+ Billion Emails in a Single Day BannerBLog-2340x1000.jpg

    This post first appeared on the Twilio SendGrid blog.

    Any marketer or business owner from small to large enterprises know the importance of Black Friday in the United States as the busiest shopping day of the year. As you prepare for this, Twilio SendGrid prepares to scale up our infrastructure to manage billions of emails reliably, quickly and securely. The hard work of our talented teams has paid off–demonstrated by our ability to support our customers sending a total of 2 trillion emails by March of this year.

    To provide a clearer understanding of our scalable systems, on Black Friday 2019 we processed 4.1 billion emails and this Cyber Monday we processed 4.2 billion emails (46% more than 2018) and processed up to 315 million emails/hour (burst rate) into inboxes all around the world! To give you a better understanding of this scale, you can get to the moon …

    Read More
  • By David Pine
    Running a Twilio Video Chat Application Built with Angular 8 and ASP.NET Core 3.0 on Microsoft Azure running-twilio-video-chat-asp-net-3-azure.png

    With Twilio Programmable Video you can add robust video chat functionality to web applications built with Angular and ASP.NET Core. With the Microsoft Azure App Service you can host your video-enabled apps on a fully managed, enterprise-grade cloud platform. Deployment and configuration are easy and take just minutes.

    Build a Video Chat App with ASP.NET Core 3.0, Angular 8, and Twilio showed you how to integrate the Twilio JavaScript SDK and the Twilio .NET SDK seamlessly with ASP.NET Core and Angular. This post will show you how to deploy applications built with these technologies to the Azure App Service.

    In this post you will learn how to publish your application to the Azure App Service, and securely configure the app on Azure to use the Twilio Video Chat API with the App Service settings. You’ll be able to try out the production applications’ video chat features and verify that it’s …

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