Here at Twilio we’re fans of using a second factor to protect user accounts, but that doesn’t mean we’ve forgotten the first factor. Encouraging users to pick strong passwords is still the first line of defence for their accounts.
After spending years collecting lists of passwords from publicly available data breaches at HaveIBeenPwned, Troy Hunt has made available an API to check whether a password has been used before. This post will show you how to encourage your users to use stronger passwords by checking against the pwned passwords API.
The Pwned Passwords API
In 2017 NIST (National Institute of Standards and Technology) as part of their digital identity guidelines recommended that user passwords are checked against existing public breaches of data. The idea is that if a password has appeared in a data breach before then it is deemed compromised and should not be …
In the burgeoning world of coffee, there are many varietals of coffee roasts from many regions of the world. Your boss has tasked you to create an application for them to Create, Read, Update, and Destroy (CRUD) different coffee roasts. They have also informed you that they want to be notified via SMS every time a new coffee roast is added to their website in order to prevent their competitors from putting in fake coffee roasts.
Today, we will create a very basic Rails 5 CRUD app entitled “Coffee Roasts” that will notify your boss via SMS whenever a new coffee roast is added to our website using Twilio’s SMS API.
Initializing Our Rails Project
First, let’s ensure that you have Ruby, Bundler, and Rails installed in order to set up a new project:
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 curl -sSL https://get.rvm.io …
I just couldn’t get online fast enough. You may know the feeling: someone or some business you follow posts a sale on Twitter and by the time you get online, you have either missed the tweet or the sale has ended. You could enable SMS notifications and get every tweet texted to you in a timely fashion, but this really doesn’t help as you start to tune out the texts when the volume exceeds several tweets within a short period of time. What if you could make an app that sends you an SMS notification only when the tweet matches a sale you are actually looking for?
This is where the Twilio SMS API comes to the rescue.
In my case, I am a big fan of Wes Bos (@wesbos). Wes is a developer who produces quality and fun online courses for learning web development, particularly in a …
If you’re building web applications with Ruby then you’re probably using Rails. Hanami is a young competitor focused on providing a full featured, modern web framework for Ruby developers that is fast, secure and flexible.
Hanami is a new web application framework for the Ruby community. It has been under development since 2014, initially under the name Lotus. Version 1 was released in April 2017 and version 1.1 was just recently released in October.
As the introduction to the Hanami guide says, “If you’ve ever felt you’re stretching against the ‘Rails way’, you’ll appreciate Hanami.” While this article isn’t a comparison of Hanami and Rails, as we build with Hanami you will see the ways in which they differ and be able to decide which approach you prefer.
Let’s investigate building a web application with Hanami with a tried and tested Twilio feature, receiving and responding to text …
September is here, the NFL has kicked off and the fantasy season is in full swing. Kareem Hunt is a beast, Zeke is gonna serve a 6 week suspension, there’s so much going on! In this post we’ll show you how to build a price tracker for your favorite daily fantasy sports website with Ruby. It will help you stay on top of the competition and receive price alerts as soon as they happen.
Tech-wise, we will use SQLite, an embedded database, and Sequel, a lightweight database toolkit for Ruby, to store all the data downloaded for easy accessing and querying. We will then setup a recurring task that downloads the CSV every “x” amount of time, like, say, two hours, and compares the entries with the ones received in the previous update. You will then receive a recap of all changes via MMS on your phone which …
If you ever need to contact your application’s users by phone then it’s good practice to verify that the phone number they enter is in fact theirs. Let’s see how to verify phone numbers in a Rails 5 application using the Authy Phone Verification API.
What you’ll need
To code along with this post, you’ll need:
- A Twilio account
- An Authy App which you can create in the Twilio console, you’ll need the API key
- Ruby and Rails installed, I am using the latest Rails 5.1.2 and Ruby 2.4.1
Create a new Rails application for this project:
rails new phone_verification cd phone_verification
We need to add a couple of gems that we’ll use in the project, open up the
Gemfile and add
envyable. Authy is going to be used for the phone verification, envyable to manage environment variables.
gem 'envyable' gem …
Today, we are excited to announce the general availability of our next-generation Ruby helper library.
The Ruby library offers new functionality and takes advantage of modern language features. We’ve rebuilt it from the ground up based on the developer feedback we received from you.
This release concludes the effort of updating our existing libraries to make the helper libraries more consistent, enable faster iteration, and improve the libraries by having a shared foundation across languages. The next-generation SDK family includes PHP, Java, .NET/C#, Python and Node.
Let’s take a deeper look at the new features of the Ruby library.
- Accessing resources: The new library makes Twilio API subdomains (Lookups, Conversations, Monitor, etc.) first-class citizens. You can now also pin a specific versions of the API.
- Listing resources: There are now two ways to get a list of resources—list and …
If a phone rings and there’s no one there to answer it, does it make a sound?
I mean, yes. Obviously. Why are you focusing on the sound issue? You should be asking who called and what they were calling about.
If you got a Slack notification every time a lead called, you probably wouldn’t miss that call. If that phone call popped into a Slack channel where any one of your co-workers could grab it, you definitely wouldn’t miss that call.
That was Netguru’s operating assumption when they built Callio, a Twilio-powered app that forwards your inbound calls to a Slack channel. Callio made it far easier for Netguru to track and manage client communications and inbound leads.
How Lukasz Built Callio from an Idea to a Production App in a Few Days
Now, Netguru’s team is spreading the wealth and sharing all their code. Head …
In May, Twilio set up a massive 40-foot video wall for their SIGNAL conference and handed out hackable wireless badges to every attendee. Once you activated your badge by placing it in one of the podiums in front of the display, you could send commands to a short code that would affect your personal block on the video wall.
As attendees began activating their badges, you could see squares of the display post their “Ahoy, World!” message and identify their location. It didn’t take long for shapes, words, and large patches of color to begin taking shape on the wall. As soon as I saw what was possible, I had to find a way to draw pixel art on the display.
Sorting Out SMS Short Code Delivery
Knowing that all I needed to do was send text messages in order to move and colorize squares on the display, and being …
In the world of Rails and Active Record, validating data and storing it in a database is easy. If you’d ever built a simple site that stores data in a Google Spreadsheet then you’d quickly learn that users can enter anything (or nothing). In this post we’ll see how to validate input using part of Active Record:
Spreadsheets can be databases too
In my last post we built a landing page for a new app using Sinatra and Google Spreadsheets as the database. The app needs one improvement though; users can enter any data they want in the form and it will happily submit. We need to guarantee we get some real data if we are going to contact our users when the app launches.
We should validate our input and ensure that
- We get at least a name and email address
- If we get an email …