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

Code, Tutorials and Hacks

  • By Sam Agnew
    How to Send Recurring Emails in Python with SendGrid 1.png

    Many applications have the need to send emails programmatically at specific times or regular intervals. In Python this is possible with the use of the Twilio SendGrid API for sending emails as well as Redis Queue and RQ Scheduler. Let's walk through how to schedule an email step by step.

    Prerequisites and dependencies

    Make sure you have the following before moving on:

    Here is a guide you can follow for setting up your development environment if you are going to be doing more web development with Python in general and are unfamiliar with things like virtual environments.

    Before writing code, you'll need to install some dependencies:

    Read More
  • By Felipe Mora
    Cómo transferir chats de WhatsApp de un BOT a Twilio Flex Cómo transferir chats de WhatsApp de un BOT a Twilio Flex

    Uno de los casos de uso más comunes en nuestra solución de Twilio Flex es habilitar el canal de WhatsApp, y generalmente lo que se hace es iniciar una conversación desde un flujo de conversación en Studio que luego dará paso a una conversación con un agente en Twilio Flex; para ello es necesario usar el Widget de “Send to Flex” en Twilio Studio.

    Este Widget generalmente requiere de configuración extra para que funcione.

    En este tutorial, vamos a listar el paso a paso para configurar el widget correctamente para transferir chats de WhatsApp desde un flujo de Twilio Studio a Twilio Flex, complementando los pasos descritos en Twilio Flex y WhatsApp en minutos, para casos de uso en los cuales se quiera implementar un BOT antes de transferir el chat a un agente humano en Twilio Flex.

    Adicionalmente, estos pasos resuelven el error "SendToFlexWidget is not supported for …

    Read More
  • By Rosario Corres
    Como transferir chats de WhatsApp para o Twilio Flex Como transferir chats de WhatsApp para o Twilio Flex

    Um dos casos de usos mais comuns na nossa solução de Twilio Flex é habilitar o canal de WhatsApp, e geralmente o que se faz é iniciar uma conversa desde um fluxo do Twilio Studio que permitirá fazer o transbordo para um agente no Twilio Flex utilizando apenas o Widget de Send to Flex no Studio, porém esse Widget geralmente requer uma configuração extra para funcionar.

    Nesse tutorial, vamos detalhar o passo a passo para configurar o Widget corretamente para transferir chats do WhatsApp para o Flex a partir de um fluxo do Twilio Studio, complementando os passos descritos em API para WhatsApp da Twilio com o Twilio Flex em Apenas Alguns Minutos para casos de uso nos quais precise implementar um chatbot antes de realizar o transbordo para um atendente no Twilio Flex.

    Adicionalmente, esse tutorial resolve a possível mensagem de erro SendToFlexWidget is not supported for this channel/trigger …

    Read More
  • By Kenneth Ekandem
    How to Use Multiple Authentication Providers in Lumen How to Use Multiple Authentication Providers in Lumen

    As we all know, authentication is a very important aspect of building an application because you want to ensure that users can only access routes and information that they're allowed to.

    Authentication takes many forms and a common one is tokenization which we will be focusing on in this tutorial.

    Tokenization replaces a sensitive data element, for example, user information such as user id's, names, and emails, with a non-sensitive substitute, known as a token.

    But how will issuing tokens be beneficial to multiple authentications? Well, since every user has a unique token, and they can be stored in separate database tables, the token can be queried across these tables to find a match, and based on which return a true, the route can be limited or opened for the user.

    In this tutorial, you will learn how to use multiple authentication providers in Lumen to limit access to routes, …

    Read More
  • By Robert Hockley
    Creating a Emergency Outage IVR Response in Twilio Studio Article Header

    If you are part of a team that ensures the smooth operation of a contact center, you may be tasked with planning for the unknown. Surprises or rapidly changing situations are times when the value of a cloud-based voice solution shows through. In the case of an emergency — such as a weather-related closure, a facilities problem, or a personnel challenge — you may need to remotely activate a temporary change to your voice responder.

    In this article, I will use Twilio’s IVR solution to create an emergency outage message that can play for incoming callers, notifying them of an unmanned queue. This message can save customers time and frustration and give you space to ensure the health and safety of your team. If you follow along with me through the steps I present here, you’ll have a working outage message for your selected Twilio phone numbers.

    Tutorial prerequisites

    To …

    Read More
  • By Elijah Asaolu
    Passwordless Authentication With PHP Using Twilio Verify Passwordless Authentication with PHP using Twilio Verify

    Passwordless authentication refers to an authentication method that does not require a password or any other knowledge-based secret to log a user into a system. This method of authentication adopts the means of authorizing users by sending a unique, one-time code (OTP) or magic link to the user via email, push notification, or text message.

    In this article, you'll learn how the infrastructure underlying passwordless authentication works, and create a small app that uses this authentication approach.

    How it works

    Most passwordless authentication implementations have a single entry point, i.e., a single page for both new users signing up and for existing users logging in to their accounts.

    In a typical implementation, both new and existing users are asked to enter their mobile phone number during either registration or login. After verifying the mobile number, the system checks if the user is an existing one or a new one. If …

    Read More
  • By Daizen Ikehara
    ローカリゼーションプラグインを利用しTwilio Flexのユーザーインターフェースを日本語にする方法 flex localization

    Twilio Flexは音声通話(電話)、SMS、Webチャットなど複数のチャネルからの問い合わせをブラウザから対応できるクラウドコンタクトセンターソリューションです。特別な電話回線や設備を導入する必要はありません。

    スキル・属性ベースのルーティングや自動音声応答(IVR)などをノーコードで設定できる強力なソリューションですが、ユーザーインターフェース(UI)のデフォルト言語が英語であるため、非英語圏のユーザーにとっては使い勝手が良くありませんでした。Flexが提供するプラグインモデルを利用し、UIの文字列を日本語などに変更するプラグインを自前で作成されている方もいるでしょう。

    今回、Twilioでコンサルティングやトレーニングを提供しているプロフェッショナルサービスチームが日本語を含んだ複数言語に切り替えることができるプラグインを開発し、GitHubで公開しました。Twilio Japanのチームメンバーも日本語文字列のレビュー・修正で貢献しています。

    GitHub - twilio-professional-services / plugin-flex-localization

    この記事ではplugin-flex-localizationプラグインをFlexに適用する方法について解説します。

    このFlexプラグインは製品サポートの対象となるものではないため、利用については自己責任となります。質問 …

    Read More
  • By Joseph Udonsak
    A Beginner's Guide to Test Driven Development With Symfony and Codeception - Part 2 A Beginner's Guide to Test Driven Development With Symfony and Codeception - Part 2

    Hey there! Welcome back!! In the first part of this series, we took a first look at Test Driven Development (TDD) and explained the need for it. We then got hands-on by setting up a new Symfony project which used Codeception as its testing library.

    Then, we used TDD to start building a P2P (Peer-to-peer) payment application. While building the authentication functionality, we uncovered some TDD gems such as the Red-Green-Refactor cycle and Sliming.

    In this part, we'll dive back into TDD and continue building our application, implementing funds transfer functionality. While we do that, we will also see how Codeception makes provisions for us to customise our test suite to add our own helper methods and assertions.

    The functionality we will build in this series has three parts:

    1. Authentication: This feature includes login and registration.
    2. Transfers: This feature allows one registered user to send money to another registered …
    Read More
  • By Prosper Ugbovo
    How to Manage Dates and Times in PHP Using Carbon How to Manage Dates And Times In PHP Using Carbon

    Date and time manipulation is one of a few frequently-experienced challenges of developing web apps in PHP. And one of it's most prevalent issues is identifying time disparities and making them readable, such as "one hour ago".

    However, handling dates and times, and issues such as this, is greatly simplified by using Carbon; it's a library which reduces lengthy hours of coding and debugging to only a few lines of code. This is because Carbon, created by Brian Nesbit, extends PHP's own DateTime class and makes it much simpler to use.

    If you've not heard of it before, it is self-described as:

    A basic PHP API extension for DateTime

    In this tutorial, you will learn Carbon's core features and capabilities, giving you the ability to far more easily manipulate date and time in PHP.

    Prerequisites

    To follow this tutorial you need the following components:

    • PHP 7.4 or …
    Read More
  • By Treasure Porth
    Send an SMS with Vue and Twilio Functions smsvue.png

    In this article you’ll learn how to send an SMS using Vue 3 on the front end and Twilio Functions on the backend. Because Vue is a front end framework, you’ll use Twilio functions to handle sending a message and to avoid exposing your Twilio credentials.

    To demonstrate these concepts, you’ll build a Vue 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 Vue application.

    Prerequisites

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

    Create your API with Twilio Functions

    Create a new Function Service

    Twilio Functions …

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