The TwilioContactable rubygem is a library of code that allows Ruby developers to automate the validation of phone numbers both by voice and SMS. This gem provides drop-in support to existing Rails/Sinatra/Rack apps allowing developers to ensure that their users, businesses, and clients own their phone numbers and can receive messages via voice or text message.
TwilioContactable is more than a useful gem. It is also the winner of our New API contest! Congratulations to Jack Danger Canty who has won $200 in Twilio credit and a Tom Bihn Checkpoint Flyer laptop bag!
Jack built TwilioContactable as part of the latest redesign of Cloops.com. Cloops needed to allow retail businesses to manage their sales in an entirely automated way. This required a unique phone number for each business location. To automate validating that these numbers are real, a call is placed using Twilio and the business owner enters a 4-digit code displayed on our site. Thanks to the TwilioContactable library, they only needed to add four lines of code to their application to make it all “just work”. The gem supports validation via SMS in addition to voice.
We asked Jack what his favorite new API feature was. Jack said, “The new Twilio API has such clear TTS that there’s no need to record your own ‘please enter the digits that appear on your screen’ anymore.”
“I think most Twilio Ruby apps will want to use this library. It solved a problem for my company beautifully and it’s been polished up so it should be very easy for most other developers to adopt it. I don’t want other folks having to scrape together the same poor validation logic I had to write before this.”
You can see the code and a very complete user’s manual on the project’s GitHub page.