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

Ruby posts

  • By Valeriane Venance
    Send a WhatsApp Message in 30 Seconds with Ruby how-to-send-whatsapp-message-ruby

    Do I need to introduce WhatsApp? If you are reading this article, you are probably familiar with it, but in case you don't, WhatsApp is a cross-platform centralized messaging and voice-over-IP service that allows people from all over the world to communicate via text and voice calls.

    In this tutorial, you will learn how to send your first WhatsApp message using the Ruby programming language and Twilio.

    A bit of configuration, 30 seconds of code and you’ll be done!

    Requirements

    To follow along with me, you will need:

    Getting started

    Create a new folder called ruby-whatsapp on your computer, this is where we are going to create our code files.

    Install dependencies

    We will need the following gems:

    • bundler for avoiding permissions error
    • twilio-ruby …
    Read More
  • By Valeriane Venance
    Send vCard with Ruby and Twilio send-vcard-twilio-ruby

    Have you ever sent contact information from a phone to another ? If so, you already have encountered vCard, the standardized format for Virtual Contact Files. These .vcf files are super helpful for contact imports.

    In this blog post we will create a vCard with Ruby and send it to our phones with Twilio Programmable SMS. By the end of this tutorial you will have a Ruby script that generates vCard files and another one that sends vCards to your contacts.

    I will generate my vCard and send it to my personal phone number. You can add me to your contacts by using your phone number or create your own vCard and send it to whoever you want.

    Requirements

    To follow along with me, you will need:

    Read More
  • By Valeriane Venance
    5 ways to make HTTP requests in Ruby 5 ways to make http requests in Ruby

    Hello and welcome in this article! Today I’m going to show you five different ways to do HTTP requests in Ruby.

    Before we start writing code I want to tell you how I’m happy I wrote this tutorial. Ruby on Rails is my favourite framework in the world and as every obsessive person I tend to always use the things I love.

    Taking a step back to simple things as HTTP requests made me write and execute simple .rb files and it felt great to unleash the power of Ruby with my simple hands and not all the Rails magic that often secludes us from the basics of the language.

    And what’s even better about the classics is they work in all the more complex environments so I’ll show you here how to do it with your own .rb file but this also works in any Ruby based framework.

    That …

    Read More
  • By Valeriane Venance
    5 façons de faire des requêtes HTTP en Ruby 5 façons de faire des requêtes HTTP en Ruby

    Bonjour et bienvenue dans cet article. Aujourd’hui nous allons voir ensemble comment faire des requêtes HTTP en Ruby de cinq façons différentes.

    Mais avant de nous plonger dans le code, je voulais juste prendre une minute pour partager avec vous ma joie d’avoir écrit ce tutoriel.

    Pour l’écriture de cet article, j’ai tout fait avec de simples fichiers .rbet je ne le savais pas mais ça m’avait manqué de m’éloigner de mon framework favori - RubyOnRails - et de toute sa magie et de revenir aux basiques de ce qu’est Ruby.

    Et le meilleur dans tout ça ? Les basiques fonctionnent aussi dans les cas plus complexes, donc je vous montrerai comment intégrer tout ça dans votre framework Ruby préféré en fin d’article.

    Prérequis

    Pour suivre ce tutoriel, vous aurez besoin de:

    • Ruby installé sur votre machine. J’utilise Ruby dans sa dernière version, actuellement 3.0.0 et je gère mes …
    Read More
  • By Valeriane Venance
    Créer un répondeur avec Twilio et Ruby on Rails Créer un répondeur avec Twilio et Ruby On Rails

    Une façon utile et répandue d’utiliser Twilio est de créer un numéro de téléphone qui redirige vers notre numéro de téléphone réel. On peut ainsi donner ce numéro à nos contacts professionnels et gérer nos appels business depuis notre portable. Notre numéro personnel est ainsi masqué derrière notre numéro Twilio.

    Dans ce post je vais vous montrer comment créer un système de boîte vocale qui s’activera si vous êtes déjà en communication ou que vous ne prenez pas l’appel. Ce répondeur diffusera un message préenregistré, prendra le message de l’appelant et vous enverra un SMS avec un lien permettant d’y accéder. Encore plus simple que de devoir appeler sa boîte vocale.

    Avant de commencer : Comment Twilio gère les appels

    Lorsqu’un appel est émis vers votre numéro de téléphone Twilio, une requête HTTP est envoyée à une URL qui pointe vers un serveur web. Le serveur web reçoit et traite …

    Read More
  • By Valeriane Venance
    Building Voicemail with Twilio and Ruby building-voicemail-twilio-ruby-on-rails

    One useful and common way to use Twilio is to create a phone number which forwards to your real phone. You can hand out the Twilio number to colleagues or customers and take business calls on your personal phone without worrying about handing out your real phone number. This also gives you a lot of options for how to handle these calls - you have the full power of Twilio at your disposal.

    In this post I'll show you how to create a voicemail system that will jump in when your cell number is busy, or when you don't answer the call. It will play a message to your caller, then record their message and text you a link to the recording when it's done.

    Primer: How Twilio Handles Calls

    When someone dials your Twilio number, an HTTP request is sent to a URL that you provide. The …

    Read More
  • By Valeriane Venance
    Coding a Rails lookup SMS app for my grandparents Coding a Rails lookup SMS app for my grandparents

    #GiftOfCode is almost over but it’s never too late to participate!

    You don’t have to create a heavy app with 2K handwritten lines of code to make someone happy and I’m gonna prove it to you now with a small SMS service for my grandparents.

    My grandparents often have phone calls from numbers they don’t know and they often call back in the case one of the family members would have changed their phone number and not told them. But sometimes they end up paying extra fees for that.

    My SMS service will use lookup functionality from Twilio with the Ekata Reverse Phone add-on to tell them if calling back a specific number may endup in extra billing.

    Warning before we go: you can follow this tutorial from anywhere in the world but the Ekata Reverse Phone functionality will work as expected only in the U.S.

    Requirements

    To …

    Read More
  • By Drew Baumann
    Generating Cooking Recipes with OpenAI's GPT-3 and Ruby Generating Cooking Recipes with OpenAI's GPT-3 and Ruby

    I enjoy cooking. When I decide to make a new recipe I typically go hunting for that perfect variation of a dish. Often this leads to food blogs. One of the things about food blogs that I find interesting is the need for the author to write a lengthy backstory on why a given recipe means so much to them. The enthusiasm for their recipes gave me the inspiration to make parody recipes using that same voice. The twist: let artificial intelligence do the heavy lifting.

    Sloppy Joe Waffles:

    What’s better than a sloppy joe? Sloppy joe waffles! These sloppy joe waffles are so so good! They’re almost like a cross between a sloppy joe and a classic waffle. They’re warm, hearty, and just all around delicious food meets breakfast food.

    I’m a bit obsessed with the idea of breakfast for dinner. I love to make breakfast foods and …

    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 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
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.