Build Your Own Personal Training Exercise Bot with Python, Zappa, AWS and Twilio SMS
Heading into the new year I wanted to set myself up to be successful living a healthier life. Saying you’re going to do something is easy, following through with action is the hard part. To ensure success being more physically active I needed help with a seemingly simple question, what should I do for a workout? With so many options available I wanted to spend less time thinking about what I’m going to do and more time doing the actual workout.
I needed a prescriptive solution to dictate a workout each day that would be balanced with enough daily variation to avoid becoming redundant. Most of the fitness apps available allow tracking of workouts, but lack the prescriptive component I was looking for.
Unsatisfied, I decided to roll-up my sleeves and build my own SMS-enabled personal trainer bot I call twilio-fit. Twilio-fit designs a workout on-demand that incorporates ...
Send Images and Other Media via WhatsApp Using Node.js
The Twilio API for WhatsApp allows you to not only send text-based messages to WhatsApp numbers but also send and receive media messages. This allows you to send images (JPG, JPEG, PNG), audio files and even PDFs up to 5MB. Let's see how we can do this using Node.js.
First Things First
Before we get started, make sure you have:
- A Twilio account (sign up for free)
- Node.js and a package manager like
- The WhatsApp Sandbox Channel installed (learn how to activate your WhatsApp sandbox)
- Set your Account SID and Auth Token as environment variables
If you want to try this out make sure to set up a new project by running:
mkdir whatsapp-media-messages cd whatsapp-media-messages npm init -y
Sending Your First Media Message
twiliohelper library by running:
npm install twilio
Create a new file called
index.jsand place the following code ...
Nomorobo Helps Stop Fake IRS Calls
“Hello. This is Agent Bloom calling you from tax crime investigation unit of Internal Revenue Services. This is to inform you that IRS has issued an arrest warrant against you and within one hour you will get arrested from your house...”
Sound familiar? Every day, thousands of people are victimized by robocalls like this, particularly during tax filing season.
Go where the money is: criminals on the phone
Criminals used to rob people with guns. Now they use the phone.
They pretend to be technical support and fool you into paying thousands of dollars to “fix” your computer. They pretend to be the Chinese Consulate and threaten (in Mandarin, of course) to have you deported. They pretend that you’ve won a free cruise or an all-inclusive vacation when all you’ve really “won” is a smaller bank account.
At Nomorobo, protecting people and businesses from these and other kinds ...
Hacking Twilio Client to Play Videos Over the Phone
How can I play a Youtube video over WebRTC?
Is there a way to play dynamic audio over a Twilio Voice call?
Many people have asked about playing dynamic audio over the phone using Twilio. And while TwiML does allow you to create dynamic templates based on user input, it doesn’t help me if I want to start and stop audio or play a video over the phone. I could imagine some enterprising person using these powers to prank the robocallers, spammers and even the occasional pesky family member. In this post, we are going to look at one quick way to inject any MediaStream into a phone call using the WebRTC-based Twilio Client SDK.
Prerequisite: This post starts off at the very end of the Twilio Client quickstart, so if you haven’t completed that it is recommended you do so now. Of course, these concepts could be ...
Deploying and Running Angular ASP.NET Core Video Chat Applications on Microsoft Azure
With Twilio Programmable Video you can add robust video chat functionality to web applications built with Angular and ASP.NET Core. With the Microsoft Azure App Service you can host your video-enabled apps on a fully managed, enterprise-grade cloud platform. Deployment and configuration are easy and take just minutes.
You will learn how to publish your application to the Azure App Service, and securely configure the app on Azure to use the Twilio Video Chat API with the App Service settings. You’ll be able to try out the production applications’ video chat features and verify that it’s ...
How to Implement Account Verification and Login by Phone in Laravel
At times, you might want to create an app that uses a phone number/password pair as a means of authentication, as opposed to the normal email/password pair. In some other cases, you are not necessarily using phone numbers as a means of authentication, but having a phone number is critical to your app. In such situations, it is very important you verify that the phone numbers your users provide are valid and functional. One way to do this is to give them a call and tell them a code that they will have to provide to your app. If you use Gmail, then you are probably familiar with the voice call verification it uses. In this article, I will be showing you how to achieve that using Laravel and Twilio’s excellent service. Let’s get to it.
For this tutorial we’ll assume the following ...
How to use Authy for Offline, Transaction Specific, PSD2 Compliant Authentication
One of the best features about using Soft Tokens or Time-based One Time Passwords (TOTP) for authentication is that they are available offline. The European Payment Services Directive (PSD2) regulation requires Strong Customer Authentication (SCA) for all transactions over €30 by September 2019. Part of the regulation requires that SCA ties transaction-specific information to the authentication, called Dynamic Linking.
This post will show you how to use a new feature of the Authy API and application to implement a compliant offline solution for your application. For more detail on PSD2, SCA, and dynamic linking, check out this post. You can also build SCA with push authorization or SMS, which we show in this blog post.
To code along with this post, you’ll need:
- A Twilio account
- An Authy Application which you can create in the Twilio console. I named mine "Example Transactional TOTP"
- A recent version of ...
Programmable Video adds support for Safari 12.1
Today, we are proud to announce that Twilio Programmable Video provides support for Safari 12.1 VP8 codec on iOS and macOS. This will help you serve your real-time video users with enhanced interoperability and experience.
Using Programmable Video in Safari 12.1
Safari has an estimated 15% share of the browser market and is the default and most widely used solution on iOS. This makes its support essential for any real-time video communications platform. In Safari 11, the only supported video codec was H.264. This made the creation of interoperable Group Rooms applications challenging given that the developers needed to choose between two options:
- To force all Group Room participants to use the H.264 codec.
- To accept that Safari 11 users will not be capable of rendering video tracks coming from Firefox or Chrome users.
The first limits interoperability and restricts developer freedom to select the most ...
How to send WhatsApp Media Messages with Python
WhatsApp is a messaging service used by people all over the world. With Twilio's Messaging API you can programmatically send WhatsApp messages. Let's walk through how to use Python to send a media message over WhatsApp.
Development Environment Setup
Make sure we have the right software installed and set up that we'll need to use for the rest of this post. Throughout this post, you will need:
- Python 2 or 3 installed (do this first if you haven't already)
- A free Twilio account with an activated WhatsApp Sandbox
- The Twilio Python library
Here is a good guide to follow in general if you are going to be doing more with Twilio and Python.
Sign up for Twilio and activate the Sandbox
Using SendGrid as Your SMTP Relay in Laravel PHP
Laravel is one of the most famous PHP MVC frameworks with a great community. It provides all the features that are required to create your project, whether it is for personal or enterprise use. Laravel supports a wide range of SMTP providers by default, but at this time SendGrid is not available for us out-of-the-box.
This tutorial will help you to implement SendGrid to send emails over SMTP. After we’ve finished, you will have a running Laravel application that allows you to send emails to registered users using SendGrid. An added benefit is, we will be able to check out whether your email is read or opened by the user.
Set Up a New Laravel Project
If you don’t have Laravel installed in your system, install it first from the Laravel Official Documentation. A ...