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

Code, Tutorials and Hacks

  • By Sam Agnew
    Building a Punk Lyrics Bot in Python with OpenAI's GPT-3 and Twilio SMS Copy of Generic Blog Header 1(2).png

    In the midst of pandemic-related lockdowns, many people around the world miss seeing their favorite bands. What if you could bring the anti-authoritarian, do-it-yourself ethos of punk rock home in the form of new song lyrics created by your Python code?

    OpenAI's new GPT-3 (Generative Pre-trained Transformer 3) model was trained on a massive corpus of text making it incredibly powerful. This can be used to generate song lyrics with surprisingly little input text given to it as a prompt.

    Let's walk through how to create a text-message powered bot to write Punk songs in Python using Twilio Programmable Messaging and OpenAI's API for GPT-3.

    STAGE DIVE

    Before moving on, you'll need the following:

    • Python 3.6 or newer. If your operating system does not provide a Python interpreter, you can go to python.org to download an installer.
    • A virtual environment enabled before installing any Python libraries.
    • A Twilio account and a …
    Read More
  • By Diane Phan
    Control a Spooky Ghost Writer for Halloween with OpenAI's GPT-3 Engine, Python, and Twilio WhatsApp API header - Control a Spooky Ghost Writer for Halloween with OpenAI's GPT-3 Engine, Python, and Twilio WhatsApp API

    October is a pretty cool month because not only do the days get dark faster, but Halloween is just around the corner. If you enjoy finding new ways to trick your friends or spook someone out, this article has a fun and unique idea for you! Whether you're already tech savvy or a beginner at coding, you might find it enjoyable to build an app to spook someone out this year!

    Using Python, GPT-3, and Twilio WhatsApp API, you have the chance to control a ghost writer and have them write a story directly onto your computer screen. No witch magic involved, just Twilio magic!

    Tutorial Requirements

    • Python 3.6 or newer. If your operating system does not provide a Python interpreter, you can go to python.org to download an installer.
    • An OpenAI API key. Request beta access here.
    • A free or paid Twilio account. If you are new …
    Read More
  • By Leonard Volarić Horvat
    Orchestrate a Twilio Webhook Deployment to AWS EC2 Using Ansible Orchestrate a Twilio Webhook Deployment to AWS EC2 Using Ansible

    Suppose you have a Flask application handling a Twilio webhook of yours. For instance, one which saves an SMS or a recording of a Twilio phone call to some cloud storage or a database.  For a production deployment of your webhook you would likely want to spin up a virtual machine instance in a cloud server provider, such as EC2 on AWS. But that can quickly become too cumbersome and error-prone to handle manually, especially when upgrading the application, or if you want to do some complex cloud storage schema.

    In this tutorial, we will demonstrate how to use Ansible, an open-source orchestration tool, to deploy a Twilio webhook on EC2 in a maintainable and extendable manner. First we will go through core Ansible concepts, then we will write a simple Flask application (our webhook) and explain how to serve it, then we will cover provisioning an EC2 instance …

    Read More
  • By Liz Moy
    Build and Deploy Episode 1: Weird and Wonderful Bots with Nicole He Nicole He SMS Bot Twilio Build and Deploy with Liz Moy

    Build and Deploy with Liz Moy is a curiosity-driven podcast that explores the lives of people who create things with code. Some might describe themselves as creatives, programmers, musicians, artists, or even fashion designers. But the truth is that no matter what their title, they’re all developers.

    Our first episode is with Nicole He, a creative technologist and game developer who made sms-bot.info, a resource that empowers anyone to build a SMS bot using Twilio and Google Sheets. We talked about the first game she ever built, the motivation behind building the tutorial, and possibilities of new features, like extending it for WhatsApp.

    Subscribe and Listen on: APPLE PODCASTS | RSS | OVE …

    Read More
  • By Oluyemi Olususi
    How to Create a Group Video Chat App with Symfony, PHP, Twilio, and React.js How to Create a Group Video Chat App with Symfony, PHP, Twilio, and React

    If the news and current statistics about remote work are any indicator of the future, it’s obvious that working from home is gradually becoming the new normal for employees all over the world, including numerous tech companies. While effective communication may be defined differently for various companies, one of the most promising ways to improve productivity and keep your team together involves using video conferencing or chat.

    This tutorial will guide you on how to create a video conferencing chat application using Symfony, React.js, and Twilio Programmable Video. The video chat application will allow users to connect and participate in a predefined chat room.

    Prerequisites

    To participate in this tutorial, you will need the following:

    Read More
  • By Dustin Ewers
    C# 8 – Making Use of Using Declarations csharp-8-using-statements.png

    With C# 9 just around the corner, it’s a good time to look back at some of the goodness in C# 8. This post will take a look at a little syntactic sugar known as using declarations.

    Since time immemorial, C# programmers have been using the using statement to implement disposable classes safely. File I/O, databases, and web services all benefit from the using statement.

    The only downside is that adding a using statement to your code introduces a new scope block and indentation level. C# 8 using declarations eliminate that requirement.

    Review: the using keyword

    In C#, the using keyword has two purposes: The first is the using directive, which is used to import namespaces at the top of a code file. The second is the using statement. C# 8 using statements ensure that classes that implement the IDisposable interface call their dispose method. It guarantees …

    Read More
  • By Ana Paula Gomes
    Implement a Support Helpline with Queuing using Python and Twilio Implement a Support Helpline with Queuing using Python and Twilio

    It’s never been so easy to set up your own call center and be in touch with your customers. With Twilio you can manage queues, assign agents and even get metrics about how the queues are working. All of it with little amount of code. In this tutorial we will show you how to accept incoming calls, place them into a queue, and then connect live agents to these callers, using Twilio Voice API, and the Flask framework for Python.

    Tutorial requirements

    To follow this tutorial you need the following components:

    • Python 3.6 or newer. If your operating system does not provide a Python interpreter, you can go to python.org to download an installer.
    • ngrok. We will use this handy utility to connect the Flask application running on your system to a public URL that Twilio can connect to. This is necessary for the development version of the …
    Read More
  • By Jeff Rosenthal
    Monitoring Web Server Performance with Windows Presentation Foundation and ScottPlot wpf-scottplot (1).png

    Windows Presentation Foundation (WPF) framework provides a rich graphical user interface for desktop applications. Charts are a familiar component in many applications, providing users with a visual way to consume data, observe trends and patterns, and provide a more attractive and engaging application.

    Many libraries provide various charting capabilities. In selecting a library to use, you should consider many factors. Foremost is compliance and compatibility with the framework used to implement the project.

    If you’re building a new .NET project these days, it’s likely you’ll be using .NET Core, so the charting library you select has to be compatible. Since .NET Core is relatively new, compared to the .NET Framework, there are fewer libraries available. 

    Some charting packages are big, feature-rich, time-consuming to learn to use, and expensive. In many large applications, these tools provide continuity between components while also providing a high degree of styling, which is very desirable. …

    Read More
  • By Harshil Agrawal
    Sending SMS the Low-Code Way with Airtable, Twilio Programmable SMS, and n8n n8n-airtable-twilio-sms.png

    Keeping your customers updated is one of the key ingredients of a successful business. This can be done in various ways; one of the most popular is through SMS messages.

    It’s often thought that there is no easy way to quickly send SMS messages to thousands of your users without writing code if their information is stored in a database like MongoDB, Postgres, or even Airtable.

    But what if there is a solution that makes the process very easy? Even if you’re not a developer you can quickly get started with this solution with just a few clicks!

    Low code, no-code platforms are changing the way we are building software. They are making it easy to quickly build apps faster. With n8n you can build any automated workflow for your use case.  

    n8n is a fair-code licensed tool that helps you automate tasks, sync data between various sources, and react …

    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
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.