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 Phil Nash
    How to Send an SMS With TypeScript Using Twilio How to Send an SMS With TypeScript Using Twilio

    Writing Node.js applications with TypeScript means you can take advantage of the TypeScript type system and tooling. We've seen on this blog how to send an SMS message with Node.js, but let's have a look at how to do this with TypeScript.

    What you need

    To follow this tutorial you will need:

    Once you've got all that, let's dive into the code.

    Getting started with TypeScript

    Let's start a new TypeScript project for this example. In a terminal, run the following commands to create a new project directory and create a package.json file.

    mkdir send-sms-with-typescript
    cd send-sms-with-typescript
    npm init --yes
    

    Now we need to install some dependencies. We'll need TypeScript in our …

    Read More
  • By Phil Nash
    How to Add Email Notifications to Your Node.js SMS App How to Add Email Notifications to Your Node.js SMS App

    Sending notifications from your application means you can deliver your users relevant, timely and personalised information about their accounts or activity. You may have already built SMS notifications into your application, perhaps by following this Node.js tutorial on ETA notifications, but can we improve the experience? Your customers may want to receive notifications that are easily referenceable later or choose the channel through which they receive alerts.

    In this post, we will explore how email notifications can work alongside SMS notifications for account alerts, and walk through how to build them into your application using the Twilio SendGrid Email API.

    What you'll need

    To follow along with the code and build the application in this post you will need:

    Read More
  • By Phil Nash
    Send your first interactive AMP Email with Twilio SendGrid Send your first interactive AMP email with Twilio SendGrid

    AMP for email is a way to build emails that allow users to interact dynamically with the content of the message. AMP emails can load up-to-date data, handle form submissions inline, provide interactive components like carousels and accordions, and even use modern CSS.

    AMP for email is a combination of a whitelisting process and a subset of the open source AMP HTML web component library that together allows you to build and send dynamic emails. You may have seen examples of this in your inbox before — my favourite is this experience when commenting on a Google Doc.

    An animation, viewing a Google Docs comment email in Gmail. In the animation I reply to a comment then mark the thread as resolved all within the email.

    You too can create email experiences like this. In this article we're going to send a basic AMP Email using Twilio SendGrid.

    What you'll need

    To build your first AMP Email and send it with SendGrid you will need:

    Read More
  • By Phil Nash
    How to build a one-time passcode protected conference line with Twilio Verify and Ruby How to build a one-time passcode protected conference line with Twilio Verify and Ruby

    We've seen how to build a conference line and then protect it with a static passcode. However, passcodes can be guessed or leaked, especially if they are reused over time. An alternative is to make a list of numbers that are permitted to join the call. But, since spoofing phone numbers is relatively easy, this still may not protect you.

    A one-time passcode (OTP) sent to a caller's phone or email, can verify they are who they say they are and increase the security of your conference line once more.

    In this post we will take the Rails application we previously developed and add a conference line secured in two ways. We will:

    1. Ensure that the caller is a known participant by checking their caller ID against a list of permitted phone numbers
    2. Send them an OTP using Twilio Verify which they then have to enter correctly to ensure …
    Read More
  • By Phil Nash
    Build a Jira plugin that can send SMS messages using Twilio Build a Jira plugin that can send SMS messages with Twilio

    As a developer, when you think of Atlassian's Jira you probably think of bug tracking or project management for software development, but many organisations use Jira for all sorts of project management and communication. We found this out recently when The Salvation Army in Australia reached out for help sending SMS messages from their Jira powered contact centre.

    Opening up this communication channel led to great results for the Salvos. In this post we are going to see how to build your own Jira plugin that can send SMS messages within your Jira project.

    What we're going to build

    We're going to build a Jira plugin that adds a new view into your Jira project from which you can send SMS messages using the Twilio API. This will be similar to the first version of the plugin we built with the Salvos.

    We need to be able to handle …

    Read More
  • By Phil Nash
    Learn how Twilio and Atlassian helped the Salvation Army support Australians during the bushfire and coronavirus crises Learn how Twilio and Atlassian helped The Salvation Army support Australians during the bushfire and coronavirus crises

    The past few months have been a wild ride in Australia. The summer brought extreme bushfires up and down the country and the autumn followed that with a global pandemic. Suffice to say that charitable organisations in Australia have been busy.

    Late in 2019 The Salvation Army reached out to us asking for some help dealing with their increased contact centre volumes. The Twilio team sprung into action, trying to design a complete solution for them.

    "Can we have something now?"

    With the pressure piling on, we received another email from the head of operations at The Salvation Army. They needed something that could send and receive SMS messages now rather than provide a perfect solution weeks or months down the road.

    They wanted to be able to send SMS messages from within Atlassian's Jira Service Desk and respond to incoming messages with an automated message.

    Twilio's Rob Shaw rolled …

    Read More
  • By Phil Nash
    Build a passcode protected conference line with Twilio and Ruby Build a passcode protected conference line with Twilio and Ruby

    We've explored building a conference line with Ruby on Rails before, but the result there was a conference call that anyone could join. If you want to keep your calls a little more private you will want to protect your conference lines with a passcode.

    In this post we will take the Rails application we previously developed and add a stage where we ask for a passcode, only allowing callers into the call if they enter it correctly.

    What you'll need

    In order to build this conference application you will need:

    Once you've got all of that, we'll get started.

    Getting up and running …

    Read More
  • By Phil Nash
    6 things you didn't know you could do with the Twilio Serverless Toolkit 6 things youi didn't know you could do with the Twilio Serverless Toolkit

    The Twilio Serverless Toolkit is a suite of command line tooling to help you develop and deploy functions and assets to Twilio Runtime. It is under constant development as we add features that make it easier for you to develop your Twilio applications and you never know what you might be missing.

    So, here are 6 things you might not know you can do with the Twilio Serverless Toolkit.

    1. Use the toolkit from npm

    If you have the Twilio CLI installed you can install the Serverless Toolkit as a plugin with the command twilio plugins:install @twilio-labs/plugin-serverless. If you prefer, you can use the toolkit without installing anything more than Node.js. Running the following command will scaffold a new Twilio Functions project for you:

    npm init twilio-function project-name
    

    This command will

    • install twilio-run as a development dependency
    • set up an .env file for your environment variables
    • provide scripts …
    Read More
  • By Phil Nash
    How to add an overlay to your web video chat How to add an overlay to your web video chat

    When building a video chat, Twilio Video provides you with the SDKs and APIs to build video apps that connect your users. However, it is un-opinionated about your interface. With a bit of CSS, we can create effects to make your video chat stand out.

    In this post we'll see how to overlay items like a logo or a user's name over a video. Over the course of the post, we'll turn a plain video into something that looks like this:

    An animation of me on video in my webcam, above me my name appears and to the bottom right a watermark saying "Powered by Twilio" shows.

    Getting started

    To create these effects we won't build an entire video chat. Instead, we'll take the Twilio Video library and use it to get the camera and put it on the page as if it was a video chat – then style that video.

    Create three new files in the same directory to write this application in: index.html, script.js and style.css. Open index.html and fill in …

    Read More
  • By Phil Nash
    Build a community SMS group chat with Twilio Functions and Google Sheets Build a community SMS group chat with Twilio Functions and Google Sheets

    Under the strange circumstances of the coronavirus we have seen some wonderful stories of communities getting together virtually to support each other. One way to support a local community is to set up a message group so that neighbours can easily offer or ask for help. Doing this with a regular group message could get messy as it's a pain to add or remove people from a group message.

    In this post we'll see how to use Google Sheets, Twilio Functions, and Programmable SMS to administer a community SMS broadcast group. We will create a Google Sheet that lists the people in our group and a phone number that can be used to contact all of them by SMS. When you send an SMS to the number it will forward that message on to everyone else in the group.

    If you want to skip straight to the …

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