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
  • By Ashley Boucher
    Send an SMS with Svelte and Twilio Functions sveltesms.png

    In this article you’ll learn how to send an SMS from your Svelte app. Because Svelte is a client-side framework, you’ll need to have a backend server that can handle sending the message, otherwise your Twilio credentials would be exposed. For this, you’ll create an API using Twilio Functions.

    To demonstrate these concepts, you’ll build a Svelte app with a button. When the button is clicked, a POST request will be made to your API. The API will send a message and then return a response back to your Svelte app.

    Prerequisites

    In order to follow along with this tutorial, you’ll need these tools and technologies:

    • npm or yarn
    • Node.js installed on your machine
    • If you’re using VS Code, you might want to snag this Svelte extension
    • A free Twilio account (if you sign up with this link, we’ll both get $10 in Twilio credit when you upgrade!)
    • A …
    Read More
  • By Twilio
    Celebrating the Beauty of Black Families At Twilio Celebrating the beauty of black families at Twilio

    February is Black History Month – a month dedicated to educating and celebrating the significant achievements Black people have made to our nation and the rest of the world. While celebrating Black culture, heritage, and history, it is equally important that we share uplifting stories about Black Families' experiences who epitomize power, strength, and resilience - the backbone of healthy, thriving Black communities.

    This year's Black History Month national theme is the Black Family: Representation, Identity, and Diversity.The Association for the Study of African American Life and History chose this theme because of the Black families' centuries-long degradation in America. The negative portrayals of Black families have created a one-dimensional view that is too often widely accepted as the norm when there's so much more beauty and depth to the Black family.

    Telling our own story

    To celebrate Black History Month, the Black Twilions employee resource group put …

    Read More
  • By Diane Phan
    How to Use Wrappers in Typescript React header - How to Use Wrappers in Typescript React

    Learning React for the first time can be unnecessarily difficult. Like, seriously - how can React, a JavaScript UI library be such a challenge when it's widely used in the industry?

    You might have heard that React allows you to build custom components that can be reused throughout the project. In fact, after drawing a mockup of the web application you want to build – using boxes – you might notice some patterns or similarities between the components you create.

    With that said, how can you write code as efficiently and clean as possible while dealing with some components that might differ only slightly from another?

    In this article, you'll be exploring how to use wrappers for custom components in a basic Typescript React project so that you can practice writing clean code and reusing components efficiently.

    Tutorial Requirements

    • Node version 14.16.0 or above at the time that this article …
    Read More
  • By Josh Siverson
    Everything You Need to Know About Using Twilio Subaccounts Using Twilio Subaccounts

    This post will walk you through the benefits of using subaccounts and how to send messages via subaccounts. Subaccounts allow you to separate your usage, numbers, and settings while sharing a balance with your main account. They're a great way to segment your usage of Twilio.  

    Below are the main items we will work through in this post:

    Technical Requirements

    • A free Twilio Account - Sign up for one here through this link, you’ll get an extra $10 in credit when you upgrade.
    • A Twilio Phone number
    • A verified mobile number (for receiving SMS messages)
    • Familiarity with sending REST API requests. Here are helpful tips on running a cURL from bash or zsh or you can use a tool like Postman.

    What are Twilio subaccounts and why should you use …

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

    L'envoi de requêtes HTTP est une fonctionnalité de base des langues modernes et l'une des premières choses que de nombreux devs apprennent. En ce qui concerne Node.js, il existe un grand nombre de solutions à cette problématique, qu’elles soient intégrées de base dans le langage ou créées par la communauté. Examinons quelques-unes des plus populaires.

    Nous utiliserons L'API JSON de la NASA Image Astronomique du Jour, parce que l'espace, c’est juste trop cool.

    Avant de commencer, assurez-vous que vous avez des versions à jour de Node.js et npm installées sur votre machine.

    HTTP – la Bibliothèque Standard

    Le module HTTP par défaut de la bibliothèque standard est le premier de notre palmarès.

    L’avantage d’utiliser ce module est de ne pas avoir à installer de dépendances externes. L'inconvénient est qu'il n'est pas très convivial par rapport à d'autres solutions.

    Le code suivant enverra une demande GET à l'API de la …

    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 Miguel Grinberg
    Working with Environment Variables in Python Working with Environment Variables in Python

    Environment variables provide a great way to configure your Python application, eliminating the need to edit your source code when the configuration changes. Common configuration items that are often passed to application through environment variables are third-party API keys, network ports, database servers, and any custom options that your application may need to work properly.

    In this article I’m going to share some of the techniques and tools available in Python to work with environment variables.

    How to access environment variables from Python

    Using the os.environ dictionary

    In Python, the os.environ dictionary contains all the environment variables. The simplest way to retrieve a variable from inside your application is to use the standard dictionary syntax. For example, this is how you can access an environment variable named USER:

    >>> import os
    >>> user = os.environ['USER']
    >>> user
    'miguel'
    

    Using this method, if you try to import an environment variable …

    Read More
  • By Lizzie Siegle
    Detect Hair Color with AutoML, MMS, and JavaScript Detect Hair Color header image

    A few weeks ago, I hosted Anna Lytical on my weekly Twilio TV Twitch show, #GreatHairCodeShare, to talk about making tech more inclusive and accessible, their path to Google and drag, and more! Anna Lytical is the sickeningly entertaining and educating coding drag queen dedicated to engaging a more diverse audience with code and technology, especially the LGBTQ+ community. During working hours, they are an engineer at Google working on the developer experience for Google Cloud Platform.

    Together, we built a hair color detector using Google AutoML, Cloud Functions, Twilio MMS, and JavaScript to show off on Twitch. Read on to learn how to build it yourself and see it in-action by texting a selfie or image with hair to +18182757423!

    Steph Curry hair color

    What you need to get started

    To follow along with this post, you will need

    Read More
  • By Marcus Battle
    How to Send 1000 (or more) Text Messages in PHP Without Timing Out How to Send 1000 (or more) Text Messages in PHP Without Timing Out

    PHP developers of all experiences are painfully aware that your script may not execute if it takes longer than 30 seconds to process. There’s nothing worse than failing to do proper testing and finding that your code doesn’t scale in production.

    In a previous tutorial, I shared how you can calculate the script execution time of sending SMS messages. At the conclusion we discovered that each message takes about .33 seconds to send, meaning that PHP’s 30 second timeout will allow you to send 90 messages before failure.

    So what do you do when you want to send more than 90 messages? What about 1000?

    Unfortunately, if you want to send bulk SMS (or WhatsApp) messages using the standard Programmable Messaging API, it’s not going to scale in PHP. Great engineering practices would suggest that you break apart your requests and run batches asynchronously. However, Twilio engineering has …

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