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

SMS posts

  • By Kyle Lawlor-Bagcal
    Build an SMS Dashboard with Python, Flask and Twilio Build an SMS Dashboard with Python, Flask and Twilio

    In this tutorial we will build a dashboard for receiving Twilio SMS messages on your computer. What we will build here can be a foundation for a custom dashboard project. By the end of the tutorial you will have a web application running on your computer which you can use to check SMS messages on your Twilio phone number.

    The dashboard we build will allow us to view all incoming and outgoing messages. Here is how it looks:

    SMS Dashboard Screenshot

    Getting set up for this tutorial

    There are a few prerequisite steps we need to follow before we begin working through the code.

    1. Install Python version >= 3.6 on your computer
    2. Set up your Twilio Account
    3. Set up your Python virtual environment

    We assume that you already have Python installed. We will now walk through setting up your Twilio account and preparing the virtual environment.

    Setting up your Twilio Account

    If you …

    Read More
  • By Brad McAllister
    Build a Serverless Email to SMS Gateway with Twilio and AWS Lambda Serverless Email to SMS

    As a solutions architect at Twilio, I have the opportunity to speak with customers on a daily basis. Each customer has unique requirements and in many cases, a customer is trying to enable SMS notifications for legacy systems that only support email. These customers quickly realize that sending an email to <phone number>@<wireless carrier>.com doesn’t scale.

    Even though creating an application to handle email-to-SMS is very straightforward, the pushback I receive from customers is that they don’t want to maintain a server to host it. In this post, I’ll show you how to create a serverless Email to SMS gateway using a combination of Twilio SendGrid and AWS Lambda.

    How does this SMS gateway work?

    SendGrid accepts the inbound email and triggers a HTTP POST to our AWS API gateway. The payload of the POST request is then processed by Lambda. Using the Twilio helper library, an outbound SMS …

    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 Brent Schooley
    Como enviar um SMS em Python Como enviar um SMS em Python

    Tudo o que você precisa para enviar um SMS em Python usando Twilio são as seguintes linhas de código:

    import os
    from twilio.rest import Client
    account_sid = os.environ.get('TWILIO_ACCOUNT_SID')
    auth_token = os.environ.get('TWILIO_AUTH_TOKEN')
    client = Client(account_sid, auth_token)
                          body='Você enviou um SMS em Python usando o Twilio!')

    Passo a passo do código

    A primeira coisa que precisamos para que o código acima funcione é uma conta da Twilio. Crie uma para você de graça aqui.

    Nós também precisamos de um número de telefone c …

    Read More
  • By Lizzie Siegle
    Build a Hamilton Song Recommendation SMS Bot with Machine Learning ham header

    Hamilton the Musical will start streaming on Disney Plus this Friday, so happy Hamilfilm week! To celebrate, learn how to build a SMS chatbot that recommends the Hamilton song most relevant to you right now using Twilio Programmable SMS and Functions, Microsoft Azure Cognitive Services, and JavaScript.

    See it in-action: text how you’re feeling to +13364295064. The longer and more descriptive your message is, the more data the app has to analyze what Hamilton song you need now!

    sms example


    Prerequisites and setting up Azure Cognitive Services

    To follow along with this post, you need three things:

    To use Azure Cognitive Services, …

    Read More
  • By Tilde Thurium
    Sending a SMS from Gatsby with serverless functions and React Send SMS from Gatsby with serverless functions and React

    Today I’ll teach you to send a SMS message from a Gatsby website using Twilio Serverless Functions and React. But first, what is Gatsby and why should you care?

    Gatsby 101

    If you spend time in JavaScript land, you might have heard of the JAMstack -- JavaScript, APIs, and Markup.

    Traditional web apps dynamically generate HTML from templates when the server receives a request. JAMstack websites use static site generators to turn templates into HTML when the site is deployed, instead of when a request comes in. 

    Since plain ol’ HTML can be much faster to serve, JAMstack can give you a huge performance boost. Especially if you’re using a content delivery network. Although, there are limits to the amount of UI complexity static sites can support.

    Gatsby bridges the gap between JAMstack static sites and traditional web apps. You write React components that compile to HTML plus …

    Read More
  • By Diane Phan
    How to Keep Friends Accountable Using Twilio Programmable SMS, Python, and Flask How to Keep Friends Accountable Using Twilio Programmable SMS and Video

    It’s no mystery that the transition to online learning or working from home has impacted all of our lives. If you’re like me, you miss going out to a local coffee shop and being productive without distractions. It’s also nice to study and work with others around you to motivate you and keep you from checking social media every minute.

    Completing this tutorial will allow you to host a system for you and your friends to be able to change your status throughout the day, everyday. Plus, you’ll realize just how easy it is to get started with coding!

    In this post, I’ll show you how to develop a functional Python program to organize your work groups using Twilio Programmable SMS and Flask.  

    Tutorial Requirements 

    In order to build this project, you will need to have the following items ready:

    • Python 3.6 or newer. If your operating system does not …
    Read More
  • By Ugendu Ositadinma
    Retrieving Account-Specific Pricing for Twilio SMS in Your PHP App Retrieving Account-Specific Pricing for Twilio SMS in Your PHP App

    A major factor to consider when building web applications is evaluating the cost of integrating third-party services. If you’re using Twilio, this tutorial will serve as a guide to finding the cost of making SMS/Messaging requests to the Twilio Programmable SMS APIs.

    Installation Requirements

    To get started with this tutorial, you will need to have the following modules/packages installed on your development machine:

    Here is a guide that can be followed to install Composer globally:

    Creating the PHP Project

    First, create a folder named smsPricing on your local machine where the code will be housed.

    In the folder that was created, create a file named index.php which will contain all the code for this tutorial.

    Now, let’s go ahead and install Twilio's PHP SDK in order to call the necessary APIs required to share the functions. To accomplish …

    Read More
  • By Ladapo Samuel
    Convert Bitcoin to Local Currency using PHP Convert Bitcoin to Local Currency using php.png

    There are different methods of converting bitcoins to local currency and vice versa such as blockchain exchange sites and wallet apps,  Today, this tutorial will walk you through creating your simple Bitcoin converter using SMS and PHP, allowing you to check current market rates on the go!

    Technical Requirements

    To complete this tutorial, you will need the following dependencies globally installed on your computer:

    Set Up Your Development Environment

    To kick start our project, we will need to create a project directory for it. You may use cryptoconverter as this is what I will be using. Create the following files in the project folder:

    • .env
    • webhook.php
    • functions.php

    Next, we need to set up our .env file.

    NOTE: The .env file is a hidden file used to store secret and private keys on our servers. …

    Read More
  • By Miguel Grinberg
    Automating Ngrok in Python and Twilio Applications With Pyngrok Automating Ngrok in Python and Twilio Applications with Pyngrok

    When you are developing an application that uses Twilio services you need to expose your webhooks on public URLs that can be reached by Twilio. If you have followed some of the tutorials that we published on this blog you know that we recommend using the excellent ngrok tool to generate temporary public URLs for your development web server. Ngrok is an incredibly useful tool that creates a tunnel from a URL on the ngrok.io domain to your application running on your computer. You can then configure your webhook using the ngrok URL and when Twilio sends a request to it, ngrok redirects it to your application.

    If you use ngrok frequently enough, it pays off to become a paid customer, which allows you to secure a permanent URL. But if you only use this service occasionally, it is tedious to have to log into the Twilio Console to …

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