Build the future of communications.
Start Building for Free

tutorial posts

  • By Hayden Powers
    Learn How to Use Twilio Functions by Building an SMS Measurement Converter for JavaScript Beginners How to use Twilio Functions JavaScript Beginners Header image

    There I was, in a desolate cabin with nothing except my maladaptive daydreams, 2G coverage, and ingredients for the only dish I had ever managed to write down splayed out on the countertops. There was just one problem. After desperately rummaging through the rental’s kitchen cabinets, I found only a single tablespoon hanging lonesomely on an otherwise empty ring.

    The proportions of ingredients were important in this dish, but I hadn’t actually sat down and memorized all the conversion rates before. Without internet service, not even Google could save me, but I did my best to eyeball it and make due.

    Someone about to eat but being disgusted by the smell of the food

    It turned out terrible, and I vowed to never be in such a predicament again.

    With some beginner-friendly JavaScript and hosting by Twilio Functions, we could make a measurement converter that can be used anywhere with cell service. In this tutorial, we will do just that! May our recipes …

    Read More
  • By Anthony Dellavecchia
    Get The Latest NBA News Sent to Your Phone via SMS F5 Your Phone to Get the Latest NBA News

    In light of June 30th, 2022, the date when NBA teams can begin negotiations with free agents, now is an exciting time to be a basketball fan. We’ve already seen so much breaking news like Kevin Durant and Kyrie Irving demanding trades, the Timberwolves giving away the farm for Rudy Golbert, and surely much more to come.

    I know many fans who are F5ing their news feeds on their computers, so wouldn’t it be fun to do from your phone too? In this post, I’ll teach you how to write a Python application that texts you NBA news.

    Prerequisites

    Before getting started, it’s important to have the following before moving on:

    • Python 3.6 or higher installed on your machine.
    • A Twilio account. If you haven’t yet, sign up for a free Twilio trial.
    • ngrok installed on your machine. ngrok is a useful tool for connecting your local server …
    Read More
  • By Phil Nash
    Twilio SendGridとNode.jsを使用してメール問い合わせフォームを構築 How to build an email contact form with SendGrid and Node JP

    この記事はPhil Nashこちらで公開した記事(英語)を日本語化したものです。

    Webサイトにメールアドレスを公開すると、スクレーピングされ、スパムに使用されるおそれがあります。この問題を回避し、同時に自身のWebサイトからメールで問い合わせを受け取れるようにする方法の一つとして、問い合わせフォームを構築することがあります。

    本稿では、Twilio SendGridベースの開発プロジェクトの一例として、ウェブサイト上で問い合わせフォームを構築し、メールアドレスを公開することなく問い合わせのメールを受け取れるようにする方法を説明します。

    プロジェクトはTwilio Functionsも使って構築しますが、本稿でご紹介するコードはあらゆるNode.js環境での使用に対応しています。

    APIによるメール送信との違い

    ユーザーがお問合せフォームを送信した際は、お問合せフォームを入力した人のメールアドレスを送信元とするメールがウェブサイト運営者に送信されることがよくあります。しかし、メール送信に関する信頼性を維持するため、Twilio SendGridは単一送信元として検証されたアドレス、または認証済みのドメインからの送信しか許可しません。

    そのため、提供されたメールアドレスをfromアドレスとして使用する代わりに、reply-toアドレスに設定できます。この方法であれば、Twilio SendGridは認証済みメールアドレスからメールを送信する一方で、受信 …

    Read More
  • By Adam King
    Building a Low-Code Flex Activity Monitor with Twilio Event Streams and Slack Building a Low-Code Flex Activity Monitor with Twilio Event Streams and Slack

    At Signal 2020, Twilio announced Event Streams - an API that allows developers to subscribe to a stream of interactions from Twilio in the form of well-defined Events. Since then, the team has been hard at work adding more and more event types from within the Twilio platform. Not only that, but Event Streams went into Public Beta in April 2021, adding a Webhook sink type on top of the AWS Kinesis sink type.

    The availability of Event Streams, and the many event types which can be streamed to your application, has opened up myriad opportunities to use Event data from Twilio in new and interesting ways.

    In this guide, we will create a Slack App which will post to a channel in Slack every time one of our Flex / TaskRouter workers changes their selected Activity status in Flex.

    To do this, we will be doing the following:

    1. Using …
    Read More
  • By Diane Phan
    How to Run Your First Task with RQ, Redis, and Python header - How to Run Your First Task with RQ, Redis, and Python

    As a developer, it can be very useful to learn how to run functions in the background while being able to monitor the queue in another tab or different system. This is incredibly helpful when managing heavy workloads that might not work efficiently when called all at once, or when making large numbers of calls to a database that returns data slowly over time rather than all at once.

    In this tutorial we will implement a RQ queue in Python with the help of Redis to schedule and execute tasks in a timely manner.

    demo of the RQ queue running on the terminal

    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.

    Let’s talk about task queues

    Task queues are a great way to allow tasks to work asynchronously outside of the main application flow. There are many task queues in Python to …

    Read More
  • By Nathaniel Okenwa
    Live Transcribing Simultaneous Phone Calls Live transcribing simultaneous phone calls

    With Twilio Media Streams, you can extend the capabilities of your Twilio-powered voice application with real time access to the raw audio stream of phone calls.

    This blog post follows on from my previous post that shows you how to get started with Twilio Media Streams and live transcription. If you haven’t set up a live call transcription before, I recommend working through that tutorial before moving on to this one. In this post we will scale our application to be able to handle multiple phone calls at the same time. We will be able to monitor the transcribed speech from multiple phone calls, live, in the browser, using Twilio and Google Speech-to-Text with Node.js.

    You can quickly spin up working code by cloning my GitHub Repository and following the ReadMe to get setup. If you’d like to see how to refactor your code to accommodate simultaneous calls, follow …

    Read More
  • By Kelley Robinson
    Getting Started with Apache Spark by Analyzing Pwned Passwords Screen Shot 2018-06-29 at 10.05.26 AM

    Apache Spark aims to solve the problem of working with large scale distributed data and with access to over 500 million leaked passwords we have a lot of data to dig through. If you spend any time with the password data set, you’ll notice how simple most passwords are. This is why we’re always thinking about how to encourage stronger passwords and recommend turning on Two-factor authentication everywhere it’s available.

    While tools like Excel and Python are great for data analysis, Spark helps solve the problem of what to do once the data you’re working with gets too large to fit into the memory of your local computer.

    This tutorial will show you how to get setup for running Spark and introduce the tools and code that allow you to do data manipulation and exploration. Read on to find out how to spot the most common password lengths, suffixes, and …

    Read More
  • By Kelley Robinson
    How I keep my mom updated on my travel schedule with Python, Twilio, and Google Calendar Screen Shot 2018-06-12 at 11.34.16 AM

    I travel a lot for both work and pleasure. My mom loves to know where I’m jetsetting off to and I was failing to keep her properly updated. I could share my location via Find my Friends, but that doesn’t solve the problem of upcoming travel events. I could create a shared document or calendar, but she isn’t always in front of a computer.

    Enter the Where’s Kelley bot.

    Using Twilio SMS, I hooked up a phone number to my Google calendar and created a simple text message bot that my mom can ask about my current location and upcoming travel schedule.

    IMG_B23D3BDE0F77-1

    This post will walk through how to build one for yourself! Check out the final code here or follow along with this tutorial to build your own Text Travel Tracker from scratch.

    Google Calendar API and Service Accounts

    First things first, you’ll need a calendar to track. The …

    Read More
  • By Phil Nash
    Send an SMS Message with Ruby in 30 Seconds

    You’re building a Rails app and you need to send SMS messages. “This could take some time,” you think. Not so! Here’s a video showing how quick it is to get started with Twilio in Ruby:

    Video: How To Send SMS In Ruby 30 Seconds

    As you can’t copy and paste code from a video, here’s how you’d do it:

    Install the Twilio helper library for Ruby.

    $ gem install twilio-ruby
    

    Open up an IRB session and require the library.

    $ irb
    irb(main):001:0> require "twilio-ruby"
    => true
    

    Instantiate a REST client using your account sid and auth token, available in your Twilio account portal.

    irb(main):002:0> client = Twilio::REST::Client.new(ENV["ACCOUNT_SID"] …
    Read More
  • By Greg Baugues
    How to Protect Your Android Phone From the Stagefright Bug 1153076

    Earlier this morning, a vulnerability was disclosed for Android phones performing a remote code execution over MMS. Dubbed “Stagefright“, the vulnerability exploits SMS/MMS clients by sending a malformed media file to the user which is automatically downloaded by the default client.

    If you’re using Google Hangouts as your default SMS client, here’s how to protect your device from Stagefright by disabling automatic downloading of media files sent via MMS:

    Disable auto-retrieve MMS for Android Hangouts to prevent Stagefright hack

    Here’s how to protect your phone from the Stagefright bug if you’re using Google Messenger (the default SMS client for Android 5.0+):

    Disable auto-retrieve MMS in Android Messenger to fix Stagefright hack

    The above screenshots were taken on a Nexus 5, but the steps are the same on any Android device using …

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