Build the future of communications.
Start building for free

Node posts

  • By Miguel Grinberg
    Verify Your Users on WhatsApp with JavaScript and Twilio Verify Your Users on WhatsApp with JavaScript and Twilio

    Twilio Verify is an easy to use service for user verification. This service now includes support for WhatsApp one-time passcodes (in public beta, as of June 2022). In this tutorial you’ll learn how to implement a WhatsApp user verification flow in a JavaScript application, using Node.js and Express.

    Verification code sent to WhatsApp


    To work on this tutorial you will need the following items:

    Create a Twilio Verify service

    To use Twilio Verify in an application, a Verify service must be created first. Open the Twilio Console in your web browser, type verify in the navigation bar’s search box, …

    Read More
  • By Dhruv Patel
    Receive SMS Alerts for Email Opens and Clicks with Twilio SendGrid and Node.js SMS alerts for email opens and clicks header image (2)

    When it comes to messaging applications, read receipts are a common feature that allow you to know if your recipient has read your message. For email applications, this feature is very uncommon; however, when sending marketing and especially important emails, it's sometimes vital to know and keep track of whether your recipients have opened and read your email.

    When using Twilio SendGrid, keeping track of email engagement is seamless through Event Webhooks. Event Webhooks not only track the delivery status of your emails but also engagement events such as if an email has been opened or a link within an email has been clicked. Pairing open and click tracking for emails with Twilio’s Programmable SMS API will ensure you’re up to date on the status of your important emails.

    In this tutorial you’ll learn how to track and send SMS alerts for open and click events for your …

    Read More
  • By Krista Goralczyk
    How to Add Custom Attributes to Twilio SMS Campaigns KG - How to Add Custom Attributes to Twilio SMS.png

    This post covers how to add custom attributes (AKA metadata) to an SMS message. This allows your team to receive data on SMS campaigns sent to your customers, log activity, and more! The examples below are written using Twilio’s Node.js helper library.

    Custom attributes provide a system to categorize various digital marketing and feature campaigns. If you want to get fancy with personalization, metadata can also track variants within a single test. Even with the absence of a formal metadata parameter on the programmable SMS endpoint, we can still add attributes for campaign managers to track customer analytics. And, really, someone’s boss asked for a consumer trends report for the third time.

    Basically, tech experts want to learn what features work and what features flop. If you run digital campaigns through SMS or Voice (or were the lucky recipient of the Jira task to add this feature), you’re …

    Read More
  • By Phil Nash
    Twilio SendGridとNode.jsを使用してメール問い合わせフォームを構築 How to build an email contact form with SendGrid and Node JP

    この記事はPhil Nashこちらで公開した記事(英語)を日本語化したものです。


    本稿では、Twilio SendGridベースの開発プロジェクトの一例として、ウェブサイト上で問い合わせフォームを構築し、メールアドレスを公開することなく問い合わせのメールを受け取れるようにする方法を説明します。

    プロジェクトはTwilio Functionsも使って構築しますが、本稿でご紹介するコードはあらゆるNode.js環境での使用に対応しています。


    ユーザーがお問合せフォームを送信した際は、お問合せフォームを入力した人のメールアドレスを送信元とするメールがウェブサイト運営者に送信されることがよくあります。しかし、メール送信に関する信頼性を維持するため、Twilio SendGridは単一送信元として検証されたアドレス、または認証済みのドメインからの送信しか許可しません。

    そのため、提供されたメールアドレスをfromアドレスとして使用する代わりに、reply-toアドレスに設定できます。この方法であれば、Twilio SendGridは認証済みメールアドレスからメールを送信する一方で、受信 …

    Read More
  • By Dhruv Patel
    Twilio SendGridとNode.jsで登録者にメール通知を送信 Send Email Notifications to Subscribers with SendGrid and Node.js Header JP

    この記事はDhruv Patelこちらで公開した記事(英語)を日本語化したものです。



    本稿では、メールによる価格通知システムを構築する方法を学びます。Sneaks APIを使用してスニーカーの価格を追跡し、特定のスニーカーの価格が下がるとTwilio SendGridのメールアラートを配信するシステムです。




    このセクションでは、まずTwilio SendGridアカウントを設定し、メール通知システムのベースを構築することで、環境設定を行います。

    Twilio SendGridのAPIキーを作成

    まず、Twilio SendGridのアカウントにログインし、管理コンソールの [API Keys] 画面に移動します。右上の [Create API Key](APIキーを作成)ボタンをクリックします。


    APIキーの名前を指定し、[Create & View](作成と表示)ボ …

    Read More
  • By Dhruv Patel
    Twilio SendGridでNode.jsを使いEメールを簡単に送信(SMTP編) Send Email in Node.js Using SMTP with Twilio SendGrid JP

    この記事はDhruv Patelこちらで公開した記事(英語)を日本語化したものです。

    アプリケーション開発におけるメールサービスに関して言えば、Twilio SendGridなどのクラウド側でホストされているメールAPIを使用し、ニーズに合わせて設定をカスタマイズするとよいでしょう。ただし、既存のプラットフォームでSMTP(Simple Mail Transfer Protocol)がすでに有効な場合は、広く普及しているメール標準であるSMTP経由でメールを送信する方法を採用したい場合もあるでしょう。幸いなことに、Twilio SendGridではSMTPリレーサービスを提供していますので、自前のサーバーをセットアップする必要はありません。また、これまでどおり、詳細なメトリクス、分析のトラッキング、優れた配信率の恩恵を受けることができ、X-SMTPAPIヘッダーを介してSendGridの多くの機能も利用できます。

    このチュートリアルでは、Node.jsとTwilio SendGridのSMTPリレーを使ってメールを送信する方法について説明します。

    SendGridとの連携にWeb APIとSMTPリレーのどちらを使用するかを選択できる場合は、できるだけWeb APIを使用してください。SMTPでは、サーバーとクライアントの間で必要となるプロトコル処理が多いため、遅延が大きくなり、障害点が複数発生する可能性があります。詳細については、Se …

    Read More
  • By Dhruv Patel
    How to Send SMTP Emails in Node.js With SendGrid Send Email in Node.js Using SMTP with Twilio SendGrid

    When it comes to email services in application development, a hosted email API – such as Twilio SendGrid – is the way to go as it offers ways to customize the setup to your needs. However, you may want to send emails through SMTP (Simple Mail Transfer Protocol) if it is already on your existing platform and since it is an email standard that's used universally. Luckily, Twilio SendGrid offers an SMTP Relay service without having to set up your own server. You’ll also still have access to in-depth metrics, analytics tracking, increased deliverability rates and even more SendGrid features through the X-SMTPAPI header.

    In this tutorial, you’ll learn how to send out emails through Twilio SendGrid’s SMTP Relay in Node.js.

    If you have the option and are still deciding whether to integrate SendGrid through our API or SMTP Relay, we highly recommend using our Web API. SMTP …

    Read More
  • By Miguel Grinberg
    Build a Serverless Video Chat Application with JavaScript and Twilio Programmable Video Build a Serverless Video Chat Application with JavaScript and Twilio

    In this article you are going to learn how to build a basic video conferencing solution using Twilio Video. The system is going to run on desktop and mobile web browsers, so participants will not need to download or install any software on their computers to join a call.

    The application will be coded in JavaScript, with some HTML and CSS. It will be deployed to the Twilio Serverless platform, so that you can use it to connect with family, friends or colleagues anywhere in the world without having to worry about complicated hosting solutions.

    Do you want to see what you’ll build before you start? Here is a screenshot.

    Project screenshot

    By following this article, you can learn how to create this project in small incremental steps. If you prefer to download the complete project instead of building it step-by-step, you can find the code in this GitHub repository: …

    Read More
  • By Vanshika Rana
    Receive Daily News Emails in Node.js with Twilio SendGrid Daily News Updates Node.js Sendgrid Header


    There is so much going on around the globe every day, sometimes, it’s hard to keep up with it all. As life gets busier and busier, you are left with very little in the daytime to read the news. What if you could have the latest news sent to your inbox every day?

    In this article, you will learn how to automate and receive daily news updates in Node.js using Twilio SendGrid and News API .


    Before proceeding, you will need the following:

    Configure the Environment

    Before you begin writing code, you must first prepare the environment to meet the needs of your …

    Read More
  • By Dominik Kundel
    Working With Environment Variables in Node.js Working With Environment Variables in Node.js

    With just a few lines of code, you can simply run a Node.js application straight from the terminal and use Twilio to send and receive text messages with Twilio Programmable SMS.

    The basics of environment variables in Node.js

    Node.js is one of the most talked about frameworks in the web development community since Rails. While still very young, Node.js has shown itself to be fast, highly-scalable, and efficient. The reason for this is due to its event-driven, nonblocking input/output structure.

    Combining it with Twilio makes building awesome telephony apps really easy. So if you wanted to send an SMS, for example, you’ll need to install Node.js and the Twilio Node.js module.

    Another great feature of the Node.js language (and its modules) is that it has a neat way of working with environment variables, which many cloud hosts (such as Heroku, Azure, AWS,, etc.) use. This opens up an …

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