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
    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
  • By Maciej Treder
    COVID-19 Diversions: Tracking the ISS with Real-Time Event Notifications Using Node.js, RxJS Observables, and Twilio Programmable SMS tracking-iss-rxjs-observables.png

    Are you a developer looking for a new hobby that’s compatible with sheltering in place? Would you like to be able to share it with friends from a virus-safe distance?

    You can stargaze from the safety of your own lawn, balcony, or roof, and you don’t need any equipment other than your own eyes, and maybe a pair of binoculars. There are plenty of bright objects in the night sky that are visible with the naked eye. One of them is the International Space Station (ISS), which is the third brightest object in the sky after the sun and moon.

    The ISS whips around the earth at 27,576 kilometers per hour (17,000 miles per hour), making a complete orbit every 94 minutes. Opportunities to observe it only last a few minutes, so it’s helpful to know when the ISS will be visible and from which direction it will appear.

    You …

    Read More
  • By Nikki Rubin
    Build an App without Coding: Simple SMS Survey with Twilio Studio Build an App without Coding: Simple SMS Survey with Twilio Studio

    An SMS survey allows you to engage your audience remotely, so that you can access valuable customer feedback in real time. In this post, we will build a simple SMS survey using Twilio Studio. Your respondents can text a phone number, receive any series of questions or statements via text, then your app will validate their responses and log them. No coding required.

    Requirements

    In order to complete this tutorial you will need the following:

    • A Twilio account. If you don’t have one yet, you can use this link and get an extra $10 in Twilio credit when you upgrade.
    • A Twilio Phone number. You can follow this short how-to on purchasing a number if you do not already have one.

    Build an App with No Code in Twilio Studio

    Twilio Studio is a drag-and-drop editor that allows you to build Twilio apps and host them in the cloud. …

    Read More
  • By Sam Agnew
    Building a Land Acknowledgement Text Line with Node.js, Twilio, and Puppeteer Copy of Generic Blog Header 3.png

    In the age of impending climate catastrophe, it is important now more than ever to respect the rights and sovereignty of Native people worldwide. Recognizing the traditional stewards of the land by making land acknowledgements at events or gatherings is a vital first step towards inserting an awareness of Indigenous presence and land rights into everyday life.

    This kind of thing has been becoming a bit more commonplace at developer conferences such as JSConf US and PyCascades.

    PyCascades Land Acknowledgment

    Using Native Land Digital, an Indigenous-led, in-progress project dedicated to helping people learn more about their local traditional Indigenous territories, I created a text messaging bot for people who are on the go to quickly find out which Native territory a given address exists on.

    Try it by texting an address to +1 (331) 244-LAND (+1 331 244 5263).

    By texting "101 Spear Street" for example, we can see that …

    Read More
  • By Julie Griffin
    Developer Spotlight: Kristen Womack KristenWomack

    Kristen Womack may not be a traditional developer. She didn’t dream of building computers as a kid and she didn’t pursue a computer science degree. In fact, she studied sign language interpretation and linguistics in school. But, she is driven by something that fuels developers across the globe: “the hacky nature of wanting to make something work.” This nature has enabled her to use software and technology as the building blocks for her dreams.

    Her career spans a number of roles in the tech stratosphere. As a Technical Product Manager at Best Buy, she first learned about Twilio. She found her “curiosity about API strategy wouldn’t end” and Twilio stood out to her as one of the companies with the best API documentation.

    Her tech career grew as she co-created a Minneapolis chapter of the Geekettes and then co-founded the company, Hack the Gap, a hackathon designed …

    Read More
  • By James Putterman
    Send Dynamic Emails with Python and Twilio SendGrid Send Dynamic Emails with Python and Twilio SendGrid

    Email is a critical part of any business communication strategy, both internally and externally. Today the need to have dynamic, content-driven, responsive email campaigns is critical. Twilio SendGrid allows organizations to deliver on this need with a highly performant and customizable CRM that works well in both the GUI and programmatically via API.

    In this tutorial, we’ll set up a free SendGrid account and, using Python, send ourselves both simple text/html emails as well as high-res, dynamic content. We’ll also retrieve sending data like the number of emails sent, how many were opened or clicked, if any bounced, etc.

    By the end of the tutorial you’ll be able to:

    • Set up a free SendGrid account and API key for interacting with the service
    • Set up a Python application that calls the SendGrid Web API v3, sends emails to different lists, and retrieves statistics about those sends
    • Start working with …
    Read More
  • By Daizen Ikehara
    Googleスプレッドシートのシフト表を使ってTwilio Studioフローの転送先をNode.jsから更新する方法 Twilio Studio - REST API v2

    以前の記事で、在宅勤務に伴う電話問い合わせの一時休止を解決する方法として、Twilio Studioを利用し個人電話に転送する方法を紹介しました。

    Twilio Studio - Flow

    今回は別の記事で紹介したGoogleスプレッドシートのシフトデータをもとに転送先となる個人をNode.jsで変更する方法を紹介します。

    前提条件

    Node.jsプロジェクトの作成とパッケージのインストール

    以前の記事に沿って作成したNode.jsアプリケーションのフォルダーに移動し、twilio-nodeパッケージをインストールします。

    npm i twilio
    

    次に.envファイルにTwilioへの接続情報やStudioフローのIDを保存する環境変数を追加します。

    SPREADSHEET_ID=
    STAFF_WORKSHEET_ID=
    SHIFT_WORKSHEET_ID=
    TWILIO_ACCOUNT_SID=
    TWILIO_AUTH_TOKEN=
    TWILIO_STUDIO_FLOW_SID=
    

    Twilio Studio REST API v2を使ったフローの取得と更新

    今回利用するTwilio Studio REST API v2は4月末にパブリック …

    Read More
  • By Michael Okoko
    Forward Twilio Application Errors to Slack with Bref PHP Forward Twilio Application Errors to Slack with Bref PHP

    Serverless applications are applications that are built, deployed, and then executed on-demand. The servers on which they run are provided by the cloud platform to which they are deployed, and the developer only needs to focus on writing the code.

    The on-demand aspect ensures that the developer is only charged for execution time, as opposed to being charged for a fixed amount of bandwidth or a specific number of servers.

    Bref is an open-sourced project that lets you create and deploy serverless applications, called functions, to AWS Lambda using PHP. It integrates with the Serverless Framework which abstracts the operations involved in deploying and monitoring such applications.

    In this tutorial, you will be building a webhook for the Twilio Console Debugger that gets triggered when there is an error with (any of) your Twilio application(s) and send the payload to Slack.

    Prerequisites

    To follow along, you will need:

    • PHP 7.2 …
    Read More
  • By Miguel Grinberg
    Build a COVID-19 Bot with Python and Twilio Autopilot Build a COVID-19 Bot with Python and Twilio Autopilot.png

    Twilio Autopilot makes it easy to build conversational bots that provide information to users in a highly engaging and intuitive format. A single Autopilot bot can be deployed on several channels including SMS, Voice, WhatsApp, Slack, Alexa and more.

    In this tutorial we are going to build a bot that provides COVID-19 stats for all countries using a purely conversational style. We will train the bot with example sentences to help it extract meaning from the freeform text entered by the user. Once you learn how this specific bot works, you will be able to adapt it to other data sources.

    Autobot conversation

    The aspects that make this bot interesting that I’d like you to notice are:

    • The user makes requests in an informal and conversational tone. Autopilot makes it very easy to “teach” the bot how people ask questions using freeform language, and how to extract the actual information embedded in …
    Read More
  • By Giuseppe Verni
    Sviluppare un chatbot multilingue per ordinare il caffè tramite WhatsApp whatsapp-coffee-banner-it.png

    Quest'articolo è la continuazione del precedente interessantissimo articolo, in cui Dominik descrive come costruire un sistema per ordinare caffè usando Autopilot. Al momento, Twilio Autopilot supporta solo la lingua inglese, esploreremo quindi come implementare il sistema per ricevere ordini sia in inglese che in italiano.

    Prerequisiti

    Se non avete ancora il vostro account Twilio, seguite questo link per crearne uno gratuito. Ci vogliono meno di 2 minuti!

    Nel vostro account Twilio useremo:

    Inoltre, avrete bisogno di un account per Google DialogFlow e Google Cloud platform.

    Diagramma di funzionamento

    Il flusso che andremo ad implementare è il seguente:

    Diagramma di funzionamento
    Diagramma di funzionamento

    Vediamo i passi nel dettaglio:

    1. Il cliente invia un messaggio tramite WhatsApp
    2. Appena Twilio riceve il messaggio, vengono invocate le API di Google …
    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.