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 Miguel Grinberg
    Add the Twilio Room Monitor Applet to your Video Application Add the Twilio Room Monitor Applet to your Video Application

    If you played with the official video calling application from Twilio, you may have noticed the Room Monitor option in the menu, which opens a popup with lots of useful information about the video room and participants, all generated in real time.

    Twilio Video Calling application

    Did you know that the Twilio Video Room Monitor used here is a standalone open source project that you can embed in any web-based Twilio Video application?

    Keep on reading if you want to learn how to take advantage of this awesome tool in your own application!

    What is the Twilio Video Room Monitor?

    The Twilio Video Room Monitor is an open source debugging tool for the browser that displays real time information and metrics for a Twilio Video room and its participants. It is designed to be embedded into any JavaScript project built with the twilio-video.js library.

    Twilio Video Room Monitor

    In addition to a very detailed view into an active …

    Read More
  • By Miguel Grinberg
    Send Scheduled SMS with Node.js and Twilio Send Scheduled SMS with Node.js and Twilio

    Twilio is all about powering communication – and doing it conveniently and fast. Our Programmable Messaging service has been available for a long time, but until now, scheduling a message to be sent at a future time required a developer to use their own scheduling solution.

    Fortunately, this is now a thing of the past! With Message Scheduling, you can send your scheduled SMS and MMS messages with a single API call, without using custom schedulers.

    In this tutorial, you’ll learn how to send scheduled SMS notifications in a Node.js application.

    Tutorial requirements

    Read More
  • By Miguel Grinberg
    Send Scheduled SMS with Python and Twilio Send Scheduled SMS with Python and Twilio

    Twilio is all about powering communication – and doing it conveniently and fast. Our Programmable Messaging service has been available for a long time, but until now, scheduling a message to be sent at a future time required a developer to use their own scheduling solution.

    Fortunately, this is now a thing of the past! With Message Scheduling, you can send your scheduled SMS and MMS messages with a single API call, without using custom schedulers.

    In this tutorial, you’ll learn how to send scheduled SMS notifications in Python.

    Tutorial requirements

    Read More
  • By Miguel Grinberg
    Send Scheduled Emails from Python and Flask with Twilio SendGrid Send Scheduled Emails from Python and Flask with Twilio SendGrid

    Twilio SendGrid eliminates many of the complexities of sending email. In a previous tutorial, you learned how to use SendGrid’s SMTP server to send emails to your users from a Python and Flask application. But how do you schedule your emails so that they are sent at a specific time?

    In this short tutorial you will learn how to use SendGrid’s email scheduling options, which will save you from having to implement your own background scheduling.

    Requirements

    To work on this tutorial you will need the following items:

    • Python 3.6 or newer. If your operating system does not provide a Python 3.6+ interpreter, you can go to python.org to download an installer.
    • A free Twilio SendGrid account. If you are new to Twilio Sendgrid you can create a trial account. With a trial account you can send 100 emails per day forever.

    Create a Flask project

    Find an …

    Read More
  • By Miguel Grinberg
    Add a Realtime Viewer Count to your Twilio Live Stream Add a Realtime Viewer Count to your Twilio Live Stream

    An important aspect of running a Twilio Live streaming experience is to track your viewership. But how do you do that? There are many different ways to do it, and the best method to use will depend on your needs and your technology stack.

    Are you ready to learn how to count your livestream viewers? In this article I’ll show you a few possible implementations with varying levels of complexity and flexibility.

    Requirements

    This article does not have any requirements beyond having some familiarity with the Twilio Live product. If you haven’t worked with Twilio Live before, I recommend that you follow an introductory tutorial first. My colleague Mia Adjei wrote a Twilio Live tutorial using Express.js, and I have also written one using the Twilio serverless platform, both of which show you how to build a complete livestreaming project step by step.

    To apply what you learn …

    Read More
  • By Miguel Grinberg
    Deploy your Vue.js Application with the Twilio Serverless Toolkit Deploy your Vue.js Application with the Twilio Serverless Toolkit

    When you are ready to deploy your Vue.js application you are faced with the problem of selecting a hosting platform. For this there are lots of options, but many require you to set up and manage your own server or container.

    In this short tutorial I want to introduce you to the Twilio Runtime, a serverless hosting platform that when paired with the Twilio Serverless Toolkit makes deploying your front end application as easy as typing yarn deploy on your terminal.

    Requirements

    To work on this tutorial you will need the following items:

    Read More
  • By Miguel Grinberg
    Deploy your React Application with the Twilio Serverless Toolkit Deploy your React Application with the Twilio Serverless Toolkit

    When you are ready to deploy your React application you are faced with the problem of selecting a hosting platform. Here you have a variety of options, many of them requiring you to set up servers or containers.

    In this short tutorial I want to introduce you to the Twilio Runtime, a serverless hosting platform that when paired with the Twilio Serverless Toolkit makes deploying your React application as easy as typing yarn deploy on your terminal.

    Requirements

    To work on this tutorial you will need the following items:

    Read More
  • By Miguel Grinberg
    Live Stream your Screen with Twilio Live Live Stream your Screen with Twilio Live

    The new Twilio Live is finally here, so there is no better way to celebrate than building a nice little project with it. In this tutorial I’m going to show you how to create a serverless livestreaming solution that allows you to share your computer screen and microphone audio with an audience.

    This project will allow you to broadcast your live coding or gaming sessions, without installing any software locally, unlike most other streaming platforms. Twilio Live is so lightweight that it can even run on low end computers such as Chromebooks!

    Requirements

    To work on this tutorial you will need the following items:

    Read More
  • By Miguel Grinberg
    How to Verify Phone Numbers in a Django Application with Twilio Verify How to Verify Phone Numbers in a Django Application with Twilio Verify

    When building a user registration and authentication system for your web application, you run the risk of not properly detecting fake or duplicate accounts. A very effective way to reduce this risk is to require users to verify their accounts right after they register.

    In this tutorial I’m going to show you how to extend the Django authentication system to include an SMS verification step in the user registration flow, using the Twilio Verify service. Among other things, you will learn how to:

    • Customize the user database model
    • Ask for additional information in the user registration page
    • Send and check SMS verification codes with the Twilio Verify service
    • Prevent access to parts of the application to users that haven’t verified their accounts

    Project demonstration

    Ready to begin? Let’s go!

    Prerequisites

    To follow this tutorial you need the following items:

    • Python 3.6 or newer. If your operating system does not provide a Python …
    Read More
  • By Miguel Grinberg
    Pythonで環境変数を活用する environment-variables-python

    この記事はMiguel Grinbergが執筆したこちらの記事(英語)を日本語訳したものです。

    Pythonアプリケーションを構成する際は、環境変数を使用すると非常に便利です。構成を変更する場合に、ソースコードを編集する必要がなくなります。一般的な構成アイテムのうち、環境変数を使用してアプリケーションに渡すことが多いものとしては、サードパーティのAPIキーやネットワークポート、データベースサーバー、アプリケーションの正常な動作に必要なカスタムオプションなどがあります。

    この記事では、Pythonで環境変数を使用するためのテクニックやツールを紹介します。

    Pythonから環境変数にアクセスする方法

    os.environ辞書を使用する

    Pythonでは、os.environ辞書がすべての環境変数を保持しています。アプリケーション内から変数を取得する最も簡単な方法は、標準的な辞書型の構文を使用することです。以下の例は、USERという名前の環境変数にアクセスする方法を示しています。

    >>> import os
    >>> user = os.environ['USER']
    >>> user
    'miguel'
    

    この方法を使用し、存在しない環境変数をインポートしようとすると、KeyError例外が発生します。

    >>> database_url = os.environ['DATABASE_URL']
    Traceback (most recent call l …
    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.