Build the future of communications.
Start Building for Free

Code, Tutorials and Hacks

  • By Matthew Setter
    How to Detect a SIM Swap With PHP Before Sending an SMS OTP How to Detect a SIM Swap With PHP Before Sending an SMS OTP

    One-time passwords (OTPs) sent via SMS are often a great solution for helping people better protect access to their online accounts. However, it's not a perfect solution, because phones are vulnerable to SIM swap attacks.

    A SIM swap attack happens when a malicious actor convinces someone working for a cellular phone carrier to link a user's phone number to a new SIM under their control. This SIM can be a physical or a newer embedded SIM or eSIM.

    After the phone number is relinked, the genuine user loses control of their number. The malicious user is then able to receive all calls and SMS sent to the phone number, allowing them to receive any OTPs delivered via SMS.

    Twilio now offers SIM swap detection through the Lookup API, which reduces the possibility of SIM swap attacks.

    In this tutorial you will learn what SIM swap detection is and …

    Read More
  • By Diane Phan
    How to Set Up a MySQL Database in Java Spring Boot header - How to Set Up a MySQL Database in Java Spring Boot

    In this article, you will learn how to spin up a MySQL database and connect it to a Java Spring Boot project. You will also use Postman's desktop application to send requests to the application.

    Tutorial requirements

    Read More
  • By Niels Swimberghe
    Configure Twilio Webhooks automatically with Visual Studio dev tunnels during ASP.NET Core startup Configure Twilio Webhooks with Visual Studio dev tunnels during ASP.NET Core startup

    In a previous blog post, I showed how you can use Visual Studio dev tunnels to make your ASP.NET Core application publicly available and then use your public application to handle the Twilio SMS webhook.

    In this blog post, you will learn how to retrieve the tunnel URL from your ASP.NET Core application and use it to automatically update the Twilio SMS Webhook, so you don't have to do this manually whenever the tunnel URL changes.

    Prerequisites

    You'll need the following things to complete this tutorial:

    You can find details on how to do these steps …

    Read More
  • By Joseph Udonsak
    Make Spooky Automated Calls at Halloween With Twilio Voice and Go Make Spooky Automated Calls at Halloween With Twilio Voice and Go

    Automation is essential to improving the efficiency of any process. By harnessing technology solutions for monotonous tasks, human resources are freed up for use in more intricate aspects of the process. An excellent example of this is automating notifications and reminders using phone calls.

    In this article, I will show how to build a Go web application which, when provided with a phone number, will make an automated phone call to the provided phone number and play one of three pre-recorded audio files. But keeping with the spirit of the season the caller will be greeted with a spooky Halloween message.

    Prerequisites

    To follow this tutorial, you need the following:

    Set up the project

    The first thing you need to do is to create a …

    Read More
  • By Matthew Gilliard
    How to Send SMS with Twilio and Micronaut How to Send SMS with Twilio and Micronaut title card

    Micronaut is a framework for building JVM web and serverless apps, first released in 2018. It aims for fast startup and low memory overhead for your web applications, and supports Java, Kotlin, and Groovy, with an eye on Scala support in the future.

    You might be familiar with Spring Boot as a popular framework in this space, and Baeldung has an overview article comparing it with Micronaut.

    In this post I'll show how to set up a web app with Micronaut to handle Twilio webhooks for incoming SMS so your app can reply to them automatically. If you're interested in starting your Micronaut journey or looking to learn enough to start building your next Twilio app with it, then read on.

    You'll need:

    • A recent version of Java. I used Java 18 but anything from 11 onward will work
    • A Twilio account. Sign up here if you don't have …
    Read More
  • By Matija Vrzan
    Twilio Flex WhatsApp Integration Checklist Copy of A01 Blog Product

    With billions of users around the world and its lack of reliance on cellular networks, WhatsApp can be an important customer engagement channel for companies using Twilio Flex. But integrating Twilio Flex and WhatsApp might seem like a daunting task due to the amount of effort required to stand up the desired experience.

    In this blog post, I will provide a quickstart checklist that walks through standard implementation steps between Twilio Flex and WhatsApp. Completing this checklist will help you build a scalable WhatsApp integration that effectively reaches your audience.

    Prerequisites

    • Single or multiple Twilio accounts depending on the environment strategy (we provide some guidance around account setup below)
    • Identity Provider and Single Sign-On
    • Meta Business Manager ID (formerly known as Facebook Business Manager ID)

    Configuration Process

    The following steps are not the only configuration options available, but they do cover most of the necessary implementation steps to have …

    Read More
  • By Dainyl Cua
    Learn About Local Indigenous Groups with Native Land Digital's API and Twilio WhatsApp Tutorial Header

    While stories of indigenous people were shared in my classrooms growing up, I never truly understood just how many groups inhabited (and currently inhabit) the land we now know as the United States of America. Curious about the scale of things, I took a look at Native Land Digital and their API and was amazed at how many recognized territories there were across not only North America, but across the entire world.

    In honor of Indigenous Peoples’ Month, I built a simple mobile app that takes your mobile device’s geolocation and gives you details about the indigenous groups and territories that have been established near you. In this tutorial, you’ll learn how I built the app using Twilio’s WhatsApp API so you can discover indigenous groups and territories near you!

    Prerequisites

    For this tutorial, you will need:

    Read More
  • By Dotun Jolaoso
    How to Trigger a GitHub Actions Workflow Using Twilio SMS How to Trigger a GitHub Actions Workflow Using Twilio SMS

    GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate building, testing, and deploying your software projects. In this tutorial, we’ll be looking at how to conditionally trigger a GitHub Action workflow using Twilio’s Programmable SMS.

    This is useful for situations where you want to trigger a build or deployment pipeline manually. In this case, all you need to do is send an SMS to your Twilio phone number.

    Technical requirements

    To follow along, you’ll need the following:

    • A free Twilio account
    • Python Development Environment
    • Ngrok. This will make the development version of our application accessible over the Internet.
    • A GitHub account

    Creating a Python environment

    Let’s create a directory where our project will reside. From the terminal, run the following command:

    $ mkdir twilio_github_actions
    

    Next, cd into the project directory and run the following command to create a virtual environment.

    $ python …
    Read More
  • By Lizzie Siegle
    Pull Congressional Data via SMS with the Congress API and JavaScript blog header

    Congress recently came out with an official API so the public can "view, retrieve, and re-use machine-readable data from collections available on Congress.gov!" Read on to learn how to read congressional data using the Congress API, Twilio Functions, and the Twilio Serverless Toolkit.

    Text "bill", "amendment", or "summaries" to +12029337044 to receive data about a random bill or amendment!

    bill example

    Prerequisites

    1. A Twilio account - sign up for a free one here
    2. A Twilio phone number with SMS capabilities - configure one here
    3. A Congress.gov API Key – get one here
    4. Postman (you could alternatively make cURL requests from the command line)
    5. Node.js installed - download it here

    Make a congress.gov Requ …

    Read More
  • By Miguel Grinberg
    Three Reasons why OpenAPI is the Best Documentation Platform for your API Three Reasons why OpenAPI is the Best Documentation Platform for your API

    OpenAPI is a specification for a machine-readable description of HTTP web services. If you have never heard this name, maybe you are familiar with Swagger, which is how it was known in its early days.

    In this article I’m going to provide a brief introduction to OpenAPI, and give you the three main reasons why I think it can be a great addition to your API project.

    What does OpenAPI look like?

    To use OpenAPI in your project, you have to create a specification document that describes your API or web service. OpenAPI specifications can be written in JSON or YAML formats. The OpenAPI Specification page describes in detail what the contents of this document should be, but if you want to have a rough idea of the format, here is a fragment of a document:

    openapi: 3.0.3
    info:
      title: My Example API
      version: 2.3
    servers:
      - url: https://awesome.app.io/api/v2 …
    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.