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 Phil Nash
    Build a Video Chat with React Hooks Build a Video Chat with React Hooks

    We've seen a video chat built in React on this blog before but since then, in version 16.8, React released Hooks. Hooks let you use state or other React features inside functional components instead of writing a class component.

    In this post we are going to build a video chat application using Twilio Video and React with only functional components, using the useState, useCallback, useEffect and useRef hooks.

    What you'll need

    To build this video chat application you will need the following:

    Once you've got all that, we can prepare our development environment.

    Getting started

    So we can get straight to the React application, we can start with the React and Express starter app I created. Download or clone the starter app's "twilio" branch, change into the new directory and …

    Read More
  • By Matthew Gilliard
    Wake up to Useful Daily Messages with Java and Azure Functions Wake up to Useful Daily Messages with Java and Azure Functions

    I wake up slowly. I often need a few minutes to remember where I am and what day it is. I usually have my phone handy - it’s my alarm clock, too. But then I decide to check the weather, and before I know it I’ve got carried away on Twitter, Reddit, email and so on. It takes me ages to start getting ready for the day. I decided to build a small app which would send me an SMS every morning. I can see what the day has in store without getting involved in anything online.

    I decided to use Azure Functions with a TimerTrigger to run some Java code every morning. The code pulls data from wttr.in and affirmations.dev, formats it into a dense (read: emoji-laden) message and sends it to me:

    An SMS in my messaging app: Good morning (weather: rain showers, temp +10 Celsius), Today is Monday, October 7. Remember you are a capable human being. Have a great day (rainbows and sparkles)

    In this post I’ll walk you through how to create this and customise it …

    Read More
  • By Luis Lopez
    Announcing Programmable Video Network Bandwidth Profile API Announcing Programmable Video Network  Bandwidth Profile API

    We are thrilled to announce that the Network Bandwidth Profile API is now available via Public Beta: a Programmable Video API designed to improve the quality of experience in Group Rooms. Before this release, video bandwidth was split equally between tracks, which meant that lower and higher priority tracks received the same treatment. Now with this release, developers can specify how the available network bandwidth is allocated, reallocate bandwidth to higher priority tracks, protect audio quality, and optimize battery and network resources consumption.

    Illustration of how network bandwidth is assigned to video tracks

    Why a Network Bandwidth Profile API?

    Programmable Video Group Rooms are based on an SFU (Selective Forwarding Unit) architecture. This means that participants publish audio and video as independent tracks to the SFU server, which in turn routes them to the rest. Hence, the number of subscribers tracks per participant grows as N-1 where N is the total number of participants.

    The SFU can control the quality …

    Read More
  • By Dotun Jolaso
    Build a Webhook Notification System in PHP with Lumen and Twilio SMS Build a Webhook Notification System with Lumen and Twilio SMS.png

    Webhooks are generally automated calls made from one application to another, triggered whenever a specific event occurs. Each webhook transfers a payload to the receiving application. For example, Twilio uses webhooks to let you know whenever certain events occur such as an incoming SMS message or a phone call.

    A really good use case is when you'd like to be alerted via SMS when different events occur on any third party services integrated with your application. As long as they provide webhooks, we can build a notification system around that.

    In this tutorial, we’ll be using Lumen, a fast micro-framework by Laravel and Twilio to create a reusable notification system for any kind of webhook.

    Technical Requirements

    To follow along, you’ll need the following:

    Setting up Lumen

    There are different ways to set up a new Lumen …

    Read More
  • By Sam Agnew
    Training a Neural Network on MIDI data with Magenta and Python Copy of Generic Blog Header 3-5.png

    Since I started learning how to code, one thing that has always fascinated me was the concept of computers creating music. With Magenta, a Python library built that makes it easier to process music and image data, this can be done more easily than before. Magenta has pre-trained example models you can use to generate music, as seen in a previous blog post, but it's a lot more fun to create your own.

    Let's walk through how to use Magenta to train a neural network on a set of music data from classic Nintendo games to generate new Nintendo-sounding tunes.

    Super Mario Bros 2 GIF

    Installing Magenta

    First we need to install Magenta, which can be done using pip. Make sure you create a virtual environment before installing. I am using Python 3.6.5, but Magenta is compatible with both Python 2 and 3.

    Run the following command to install Magenta in your …

    Read More
  • By Sam Agnew
    Generating Nintendo Music Over the Phone in Python with Magenta and Twilio Copy of Generic Blog Header 1-3.png

    Artificial creativity is amazing, and I am always blown away by what people accomplish with neural networks. Lots of developers have used Python libraries like Magenta to create awesome music.

    I used Magenta to train a neural network on a bunch of classic Nintendo music, and I thought it would be fun to hack around with that and make a Twilio phone number you can call to hear computer-generated NES music. If you're in the US, try calling ‭(424) 398-8637‬ (424-39-TUNES) to hear!

    Let's walk through how to build a phone number that plays computer generated music using Magenta.

    Installing dependencies

    First we need to install Magenta, which can be done using pip. Make sure you create a virtual environment before moving forward. I am using Python 3.6.5, but Magenta is compatible with both Python 2 and 3.

    Run the following command to install Magenta in your …

    Read More
  • By Matt Makai
    How to Send Daily SMS Reminders in PHP 7 Laravel Web Apps with cron How to Send Daily SMS Reminders in PHP 7 Laravel Web Apps with Cron

    Sending and receiving SMS is easy with the Twilio API, but what if you want to send regularly-scheduled reminders from your Laravel web applications? In this tutorial, we'll combine Laravel, Twilio Programmable SMS and cron to send daily reminders that are stored in a Laravel data model.

    Project Dependencies

    We'll need the following dependencies to complete this tutorial:

    We can start building our project once you have PHP 7 and Composer installed. We'll sign up for a Twilio account at the appropriate step in the tutorial.

    All of the code for the project can be found within this Git repository on GitHub.

    Create a Laravel Project with Composer and the Twilio Helper Library

    In your terminal, start a new Laravel project named reminder-app using the following command:

    $ …
    Read More
  • By Tilde Thurium
    Beep Boop: 6 Bots To Better Your Open Source Project 6-bots-better-open-source-project

    The second law of thermodynamics states that entropy always increases over time. To put it another way, chaos overtakes order little by little. Open source software projects are no exception. The longer a project grows and survives, the more issues and unmerged pull requests it will accumulate. Unresolved problems from the past make it hard to keep up with new contributions.

    Bots to the rescue. Automation can help welcome new contributors and let them know what to expect. Outsourcing this labor to robots eases the burden on maintainers, freeing up time for more important tasks. Such as reviewing all those Hacktoberfest pull requests that are pouring in.

    In this post, I’ll show you 6 ways to improve your open source project with Probot. The improvements fall into two broad categories: warmly welcoming new contributors, and communicating project norms or expectations.

    Probot 101

    Probot is a Node.js framework for building …

    Read More
  • By Michael Okoko
    Send a Slack Notification When Laravel Jobs Fail in Laravel 6 using Queue Failing Send a Slack Notification When Laravel Jobs Fail in Laravel 6 using Queue Failing.png

    Laravel provides a queue interface to help you defer long-running tasks such as sending emails/SMS, file processing, etc. As much as you try to avoid it, your queue will fail sometimes and because these failures are ignored by default, you need a way to be notified. In this article, we will explore how to send a Slack notification each time a queue fails.


    Before Laravel 5.8.x, the Slack notification channel was pre-packaged into the framework. If your Laravel version is < 5.8.0, feel free to skip the installation (although you should look into upgrading as Laravel is currently on version 6.0). From Laravel 5.8.x and above, the Slack notification channel is packaged separately from the framework so we have to import it via:

    $ composer require laravel/slack-notification-channel

    Next, update your .env file to include your Slack webhook URL …

    Read More
  • By Karyn Smith
    Twilio and DirectWomen Share A Commitment to Furthering Board Diversity Karyn Smith, General Counsel, Twilio

    At Twilio, diversity is a top priority, including at the Board level. I’m proud that our Board of Directors includes three highly accomplished women who bring key skill sets and unique experiences that are invaluable to Twilio. With their collective product, marketing, operational and corporate governance experience at some of the most successful companies during the last three decades, we are fortunate to have the benefit of their perspectives and learnings as we navigate the challenges that come with scaling a high growth company.  

    Earlier this year, I had the honor of being selected for the 2019 DirectWomen Board Institute class. The mission of DirectWomen is to increase the representation of women lawyers on corporate boards. DirectWomen identifies, develops, and supports a growing group of accomplished women lawyers who provide the experience, independence and diversity required for good corporate governance.

    DirectWomen board diversity

    The work that I and the other members of …

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