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 Chris Hranj
    Writing Metal Lyrics with OpenAI's GPT-3 Engine, Twilio Functions, and JavaScript header - Writing Metal Lyrics with OpenAI's GPT-3 Engine, Twilio Functions, and JavaScript

    As a musician/songwriter, one thing I find myself struggling with all too often is writing unique,  compelling song lyrics. Metal lyrics in particular are especially difficult for me. Writer's block is usually the issue, but even worse is when I come up with a great line to start but nothing to follow it.

    Thanks to OpenAI and their GPT-3 API, this is no longer an issue. Now I can just write a few lines myself and let a trained model write the rest. Is it cheating? Probably. But is it fun? Definitely.

    This post will demonstrate how to use Twilio Functions to assist in writing song lyrics by using OpenAI's GPT-3 engine and their Completion API. Here are a few examples of interesting lyrics I was able to generate using this tool:

    > Cut out the heart of a living man, put it in a box made from the bones …

    Read More
  • By Chris Hranj
    How to Send a vCard with Twilio Programmable SMS header - How to Send a vCard with Twilio Programmable SMS

    If you've ever sent or received contact information from one phone to another (especially in a time before smartphones), then you may have unknowingly encountered a vCard before. vCards, also known as Virtual Contact Files, are a standardized (RFC 6350) file format for sending business/contact information which can be easily imported into address/contact books.

    example text of vcard information listing name, phone number, address, and body message

    This post will quickly walk you through creating a vCard using Python and sending it as an MMS using Twilio Programmable SMS.

    The sample code used later in this post can be found here.

    NOTE: Depending on your location and Twilio number, you may not be able to receive MMS outside the US/Canada and thus won't be able to receive vCards.

    Getting Started

    It's important to understand that vCards are essentially just text in a specific format.

    If you've used Twilio MMS before, vCards can be thought of the same way as …

    Read More
  • By Chris Hranj
    Two-Factor Authentication with Authy, Crystal, and Amber Two-Factor Authentication with Authy, Crystal and Amber.png

    Crystal is a powerful up-and-coming language which boasts a Ruby-like syntax but with the speed of C. You may have seen a few Crystal posts on the Twilio blog before written by Twilio’s own Phil Nash.

    crystal logo

    This blog post will cover how to secure a Crystal web application by adding two-factor authentication (2FA) using Authy. The finished source code can be found on GitHub.

    Crystal is a newer language which is evolving quickly, so it's important to note that the code in this post is on Crystal version 0.34.0 and Amber version 0.34.0.

    Setting Up

    The first step before diving into this post is to install/understand a few things:

    • Crystal
    • Amber Framework - Several Crystal web frameworks are starting to pop up. This post will focus on Amber. Amber’s goal is to make building Crystal web applications fast, simple, and enjoyable.
    • PostgreSQL - Amber supports Postgres, MySQL, …
    Read More
  • By Chris Hranj
    Travis CI SMS Notifications with Twilio Functions Travis CI plus Twilio Functions.

    Continuous integration (CI) is a software development practice that has exploded in popularity. CI allows developers to push code more rapidly by automating the building, testing, and deployment processes (read more about it here).

    Travis CI is a widely used CI tool. It syncs with your GitHub account and can perform many different actions when code is pushed to your repositories such as build files, run tests, deploy, etc. If you are unfamiliar with Travis CI, they have a Getting Started page with documentation for literally dozens of languages, as well as a Travis CI for Complete Beginners guide.

    This blog post will step through configuring Travis CI to send SMS notifications using Twilio …

    Read More
  • By Chris Hranj
    Monitoring Cryptocurrency Prices using JavaScript, Twilio Functions and SMS Check Bitcoin prices with Twilio Functions

    Twilio recently introduced Functions, a serverless environment to build and run Twilio apps. With Functions, you can build simple Twilio applications in JavaScript without worrying about configuring servers, finding a place to host TwiML or tunneling to localhost.

    Let’s get acquainted with Functions by building an app that monitors the price of cryptocurrencies. The finished app will use CoinMarketCap to send us pricing information via SMS about any cryptocurrency we send (Bitcoin, Ethereum, Dogecoin, etc).

    giphy.gif

    If you’re already familiar with setting up a new Function, the finished code for this Function is available on Github here.

    Getting Started

    In order to build this application and use …

    Read More
  • By Chris Hranj
    Verify Phone Numbers with Java and the Twilio Lookup API X3dtr5jROhLHbA4-8RkYT_Va8KTkxaxf8UJNV9yIYFUQHouQxUgAIVJ7ekrdO7g2FEOfQ4cndUwstaMQJnrUqYRkTlZp-aoKqBNCp-ln9DenF228N_K6h54ogCq6cKWb99r8FmvZ

    Twilio Lookup is a simple REST API  for obtaining information about a phone number. Lookup can determine if a number exists, its type (landline, mobile, VoIP), and its carrier (Verizon, Sprint, etc) association. Lookup can also check if a number is able to receive text messages as well as format numbers into a standard format.

    Let’s validate phone numbers using the Twilio Java library and the Lookup API and make the code easy to port into your existing Java applications. This post will be directed towards macOS and Linux users, as some of the commands will not work for Windows users.

    If you just want to see the finished code, see this Github repository.
    vEJGsXtEE1Sc8.gif

    Configuring Our Environment

    Our cod …

    Read More
  • By Chris Hranj
    Stripe SMS Notifications via Twilio, Heroku, and Python image07

    I recently started a small business using the online platform Storenvy. Storenvy integrates with Stripe, a popular online payments platform. As a small business owner, receiving notifications as soon as orders come in is critical.

    Emails are easy to miss, forget about, or overlook, but one thing I never fail to read is a text message. What if it were possible to receive a text message every time my store makes a sale?

    Neither Storenvy nor Stripe have SMS notifications built into their platforms, so let’s build a custom SMS notification system using Twilio, Heroku, and Python.

    Note: If you’re only interested in the code, it can be found on Github here, along with a “Deploy to Heroku” button.

    What You’ll Need
    Read More
  • By Chris Hranj
    Real-Time SMS with Erlang, ChicagoBoss and Twilio

    In this blog post we are going to use a functional approach to creating a web application with Erlang and the Chicago Boss framework. Our application will display incoming SMS messages in real-time and allow you to respond to them in your browser using the Twilio API.

    If you’re just interested in seeing the finished code for this blog post, it can be found on my Github here.

    Why Functional Programming? Why Erlang?

    Functional programming can be very intimidating to someone like myself who began learning to program using the object-oriented paradigm. Functional languages like Erlang pride themselves on their “no side effects” and “functions as first-class citizens” properties. This makes the …

    Read More
  • By Chris Hranj
    Getting started with Spring MVC and Twilio SpringMVC Banner

    In this tutorial we will take a very beginner look at Spring MVC and use it build a ‘Hello World’ style application. We will then take that what we’ve built and turn it into a SMS sending and voice calling application using theTwilio REST API.

    Spring MVC is a framework built on top of Java servlets that provides the components needed to build web applications using the model-view-controller architecture. It is one of the many tools provided by the Spring project.

    If you’re just interested in the finished code you can find it on my Github.

    Getting Started

    Before we jump into the code it’s important to understand the model-view-controller (MVC) architecture that Spring MVC implements.

    The M …

    Read More
  • By Chris Hranj
    Create a Standalone Voicemail Using Java and Twilio

    Why is receiving voicemails still such a pain in 2015? With landlines you need to deal with overpriced and outdated hardware. On mobile phones you need to call a number, enter a password, and sift through the voicemails until you reach the one you want. Wouldn’t it be easier to just receive a text message to listen to a new voicemail? Fortunately, Twilio plus a little Java code gives you the power to do just that.

    In this blog post we will use Apache Tomcat and Twilio to create a virtual answering machine that will receive and record all incoming calls. The answering machine will then text you a link to hear the message that was left for you.

    2015-09-10 01.45.06.png

    If you don’t want to follow along and just want to see the code, it has all been open sourced in this Github repository.

    Getting Started

    The first step to building …

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