Build the future of communications.
Start Building for Free

Functions posts

  • By Kelley Robinson
    Twilio VerifyとTwilio Functionsによるサーバーレス電話認証 Serverless Verify

    この記事はTwilioデベロッパーエバンジェリストのKelley Robinsonが執筆したこちらの記事(英語)を日本語化したものです。日本語化作業時点(2022年8月)の状況に合わせて記事内のコードを一部、変更しています。

    セキュリティは誰もが気になる項目でしょう。その中で電話認証はアプリケーションの保護やbotアカウントの防止に役立つ簡単な方法と言えます。そのため、ユーザーの電話番号にワンタイムパスワードを送信して所有番号の検証をするやり方は、製品の登録時や電話番号の初回登録時によく使われる方法です。

    ユーザーの電話番号を確認することで、不正の低減や通知の信頼性を高められます。今回は、TwilioのサーバーレスファンクションとTwilio Verify APIを使用してWebアプリケーションから電話番号を検証する方法を紹介します。

    クイックリンク:

    Twilio Verifyをアプリケーションに追加するための前提条件

    この記事に沿ってコーディングを行う際に必要なもの:

    Twilioコンソールで作成したVerifyサービスのService SID(先頭がVA)を控えておきます。

    Verify Service SID

    Twil …

    Read More
  • By Dainyl Cua
    Build a Hobby Recommender with Twilio Functions and the WikiMedia API Build a Hobby Recommender with Twilio Functions and the WikiMedia API

    In honor of National Anti-Boredom Month, I decided to build a bot that gives me suggestions for hobbies to pick up in the near future. Want to get hobby suggestions for yourself? Try texting any message to the number +1 (717) 942 - 9721, and see what you get!

    In this tutorial, you’ll see how I built the bot (aptly named HobbyBot) and learn how to build it yourself with Twilio Runtime, specifically Twilio Functions, and the WikiMedia API.

    Prerequisites

    To follow along to this tutorial, you will need:

    • A free or paid Twilio account. If you are new to Twilio, click here to sign up for a free Twilio account and get a $10 credit when you upgrade!
    • A Twilio phone number
    • A personal phone number

    Setting up your developer environment

    For this tutorial, you will only need to work with Twilio Functions. …

    Read More
  • By Hayden Powers
    How to Build a Low-Code SMS RSVP System with Airtable, Twilio Functions, and Twilio Studio How to build a low code SMS RSVP system with Airtable Twilio Functions and Twilio Studio

    Airtable is a great tool for prototyping applications that require a database. However, when using multiple API’s in an application, it can get complicated and tricky to juggle all the functions and parameters from different services.

    In this post, we will make a simple, serverless RSVP system with Twilio Functions and Twilio Studio that will scan an Airtable guest list for phone numbers, send a personalized message to each of them, and then update our Airtable records with the responses from each of the invitees as to whether or not they wish to confirm their attendance. Let’s get started!

    Prerequisites

    Before you begin, you will need a few things:

    Airtable setup and layout

    Let’s first start with what we need from …

    Read More
  • By Dhruv Patel
    How to Call an AI Friend using GPT-3 with Twilio Voice and Functions How to call an AI friend Header

    I always used to find myself getting into unwanted social situations that I could never get out of. As the engineer I am, I decided it’d be fun to build and publish a quick solution to this using my toolbelt here at Twilio: How to Escape Pesky Situations using Twilio Functions and TwiML Bins. This solution allowed me to text my “friend” Joanna – an Amazon Polly voice – a key phrase which would trigger Joanna to call me and respond as if there was an emergency using a human-like synthesized speech.

    This solution then made me wonder what other fun ways Joanna could help me out. Since it’s also National Anti-Boredom Month (July), I started focusing on ways to tackle boredom and pass time.

    Gif of bored kid on couch

    Whether it’s walking home from the subway or waiting in line at the store I always find myself needing to kill time. I could …

    Read More
  • By Dhruv Patel
    Build an SMS Service to Contact Your Local Representatives with Twilio and SendGrid Contact your Local Representatives through SMS with Twilio Studio and SendGrid

    Communicating with local and elected officials is the way to go when effectively raising public concerns and voicing your opinions. With Twilio and SendGrid, finding your local officials and contacting them can be made seamless.

    In this tutorial, you’ll learn how to leverage Twilio Studio, Functions, and Programmable SMS to create an SMS service to find and grab contact information of your local representatives. You’ll also learn how to integrate the service with Twilio SendGrid to directly email an official through SMS. Google’s Civic Information API will be used to fetch local representative info.

    Let’s get started!

    If you’re looking to build a similar SMS service but with C#/.NET, check out this Twilio blog: Find your U.S. Representatives and Congressional Districts with SMS and ASP.NET Core

    Prerequisites

    What you’ll need for this tutorial:

    Read More
  • By Anton Kushch
    Store Opt-Out data on Twilio with Functions and Sync Storing Opt-Out data on Twilio with Functions and Sync

    Staying compliant is an important part of your messaging strategy. It ensures that your senders have a high trust level from carriers and, as a result, experience lower filtering and lower risk of being blocked.

    Maintaining a clean opt-out list is one of the key pillars for compliant messaging. The Twilio platform helps you maintain customer trust via automated opt-out management (more here), and it's a great start, but under certain circumstances, opt-out information can be lost. Additionally, Twilio does not yet provide an API to retrieve opt-out data.

    All that's to say: we at Twilio strongly recommend you maintain and store opt-out data yourself. In this blog post, I'll show you how storing opt-out information can be done on the Twilio platform with Serverless Functions and Sync.

    Tutorial prerequisites

    Before we can get started building, you need to make sure you have an account with Twilio. …

    Read More
  • By Ashley Boucher
    How Your Nonprofit Can Accept Mobile Donations Using Twilio Copy of 04. Execboard member announcement (1200 x 630 px) (2)

    Mobile donations are one tool you can use to encourage support of your non-profit organization. Supporters can donate directly over the phone using an automated system, powered by Twilio Voice.

    In this article, you’ll be building an app that responds to incoming calls by asking callers to enter a donation amount and then their credit card information. This information will be captured by your payment processor to complete the charge.

    To start accepting mobile donations, follow along with this article.

    Prerequisites

    To get started with this tutorial, you’ll need the following:

    Read More
  • By Anton Kushch
    Build an Inactivity Timeout with Flex Conversations Build Inactivity Timeout Flex Conversations

    As you may know, Twilio has released Flex Conversations. This is a big step in making orchestration more reliable and straightforward within the Flex ecosystem. In a blog post here, you can learn more about Flex Conversations's new perks. Introducing Flex Conversations also opens up possibilities for new cool features to be implemented, as the Conversations API provides a broad spectrum of tools for managing participants, addresses, and the conversation lifecycle.

    One contact center feature that our customers often ask about is Inactivity Timeout. To keep your agents' productivity high, it's necessary to have an automated way to track abandoned tasks and clean them up. With the State Timers feature of the Conversations API along with Twilio Functions, it is possible now to implement an Inactivity Timeout in Flex. In this blog post, I will guide you through the configuration and code to achieve this.

    Tutorial prerequisites …

    Read More
  • By Lizzie Siegle
    SMS Notifications On Pageviews with Segment and JavaScript Copy of D03 Blog Image Round (2).png

    Twilio acquired Segment last year to help developers unify customer data across every customer touchpoint. I held off on using Segment for a while because I thought Segment was only for businesses, but I learned recently that I, an indie developer, have a use case for it. Read on to learn how to use Segment and Twilio Serverless to send SMS notifications when someone visits your website.

    Do you prefer learning via video more? Check out this TikTok summarizing this tutorial in two minutes!

    Prerequisites

    To follow along with this post, you need three things:

    Add a Segment Source

    First off, we need to add …

    Read More
  • By Jordan Hanley
    Dynamic Contact Center Opening Hours Powered by Twilio Studio and Google Places Dynamic Contact Center Opening Hours with Google Places

    The Problem

    One of the most frequent asks when building out an IVR for a contact center is for the IVR to change when the contact center is closed. To deliver a great customer experience, you may want to direct the customer online, give them different options to self-serve, send them to voicemail or simply ask them to call back at a different time.

    This kind of functionality can be built out relatively easily using Twilio Functions with Twilio Studio to lookup a spreadsheet or database and some kind of logic to decide if your business is currently open. However, this can become complex when managing public holidays, business downtime or other exceptions.

    How Can This Be Easier?

    In the online-first world that we live in, most businesses have a presence on Google, and some are even striving to be the most visible in their sector or region. As such, …

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