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 Felistas Ngumi
    Track WhatsApp Message Status In Node.js and Twilio API for WhatsApp Track WhatsApp Message Status In Node Js and Twilio API for WhatsApp.png

    Over time, digital media outreach mediums have expanded from email and SMS to social media. It is estimated that the average user spends at least 2 hours and 22 minutes on social media and messaging platforms per day. In a world where almost everyone is connected, companies have jumped on this opportunity and used it to promote and campaign for their products and services. But what’s the point of sending promotional content if there is no way to track it? The Twilio API for WhatsApp recently added the read receipts feature where one can effectively measure if the recipient consumes the content sent to them. In this tutorial, I’m going to take you through on how you can obtain the status of a WhatsApp message sent via the Twilio API for WhatsApp.    

    Prerequisites

    To complete this tutorial you will need the following:

    1. Node.js Version 8 or above
    2. Twilio Account
    3. Mongo …
    Read More
  • By Felistas Ngumi
    How To Send Location Details on WhatsApp in Node JS How To Send Location Details on WhatsApp in Node JS

    WhatsApp is one of the most preferred mobile messaging applications in the world with over 1.5 billion active monthly global users. Since the introduction of WhatsApp business, companies have leveraged this API to engage with their customers to send order or payment notifications, appointment reminders, and shipping alerts among others. One of the key reasons for increased adoption and trust of WhatsApp for users and businesses is the secure end-to-end encryption. Users can share user contacts, documents, locations, and different types of media such as images, audio, and videos. The Twilio API for WhatsApp recently added support for read receipts and location messages. In this tutorial, I will take you through how to send location messages using the Twilio API for WhatsApp.

    Prerequisites

    To complete this tutorial you will need the following:

    1. Twilio Account
    2. Node Version 8 and above

    Getting Started

    In your preferred terminal, run the following commands to …

    Read More
  • By Felistas Ngumi
    Send Email Attachments Using Twilio SendGrid and PHP PHP Email Attachments with SendGrid

    Companies with a clear commitment to efficient communication rely heavily on email as a communication tool. At some point, this dependency requires sending email attachments to customers for transactions such as receiving their invoice after an online purchase, sending of travel itinerary and many more. These attachments can be images, videos, or even documents. Twilio SendGrind API provides a simple and efficient way of doing this. In this tutorial, I will take you through how to send email attachments with SendGrid and PHP.

    Prerequisites

    Ensure you have the following installed in your local development environment:

    1. PHP version 7.0 or higher
    2. Composer

    Also, head over to SendGrid and create a free account.

    Getting Started

    In your preferred terminal, run the following commands to set up the project:

    $ mkdir demo && cd demo
    $ touch email.php
    $ composer require sendgrid/sendgrid vlucas/phpdotenv
    

    The above commands created a folder called demo which …

    Read More
  • By Felistas Ngumi
    Send Serverless Emails using SendGrid and Twilio Functions Serverless Emails

    Software developers are moving away from the expensive, traditional, server-based architecture platforms and shifting towards the trendy serverless applications. This new way of developing applications is event-driven, cheaper in comparison to the operating costs of maintaining a server, offers a quick way of deploying functions and allows businesses to pay for only what they use.

    In this tutorial, you will learn how to send emails using Twilio Functions and SendGrid.

    Project Setup

    To complete this tutorial you will need the following:

    1. SendGrid Account
    2. Twilio Account
    3. Twilio CLI
    4. Node Version 8 and above.

    Getting Started

    After creating a free account on Twilio, install the Twilio CLI which enables you to  develop and deploy functions locally. To install the tool, run the following command in your console window.

    $ brew tap twilio/brew && brew install twilio
    

    NOTE: This command is specific to Mac users. If you are on a different platform, …

    Read More
  • By Felistas Ngumi
    Serverless SMS Messaging using JavaScript and Twilio Functions Serverless SMS Messaging using JavaScript and Twilio Functions

    Function As A Service is a solution that allows developers to develop, deploy, and run event-driven functions in the cloud that are fully managed. Without the need for maintaining infrastructure, "serverless" architecture is achieved. In this tutorial, you will learn how to send Twilio Programmable SMS using the new Twilio CLI.

    Project Setup

    You will need the following items in order to get started:

    1. A Twilio account
    2. Twilio CLI
    3. Node Version 8 and above.

    Getting Started

    First, install the Twilio CLI. I'm currently using version 1.8.1. Run the following command in your preferred terminal if on a Mac:

    $ brew tap twilio/brew && brew install twilio
    

    If you are on a different platform, you can find the setup instructions here.

    To confirm a successful installation of the CLI has occurred, type twilio in a new terminal session and the output below should appear.

    Twilio CLI console

    Login to your Twilio account by …

    Read More
  • By Felistas Ngumi
    Add Facebook Login to your Node.js App with Passport.js Add Facebook login to your Node.js app with Passport.js

    Almost all applications require users to create accounts on their websites in order to use certain services. This repetitive process of setting up new profiles and creating new passwords for every application is not only time consuming, but frustrating, and over time, account management becomes hard remembering credentials for every application.

    Thanks to OAuth, we can use popular social media applications such as Google, Facebook and Twitter to authenticate users. This process makes implementing authentication easier and increases adoption due to existing trust built with the social network. So why not integrate it into your application?

    In this tutorial, I will take you through how to integrate Facebook into your Node.js application.

    Prerequisites

    You will need the following dependencies to complete this tutorial:

    1. Node
    2. Facebook Developer account
    3. Mongo Db

    Getting Started

    Follow the instructions below in your preferred terminal in order to set up your development environment:

    $ mkdir …
    Read More
  • By Felistas Ngumi
    Add Querying and Pagination to a CRUD RESTful API in PHP with API Platform and Symfony 4 Add Querying and Pagination to a CRUD RESTful API in PHP with API Platform and Symfony 4.png

    Now that we have created a simple CRUD API, let's learn how to retrieve the data we want using query parameters, customize the pagination of the results, then create custom controllers and endpoints.

    NOTE: This tutorial is Part 2 of a 2-part series. If you haven't completed Part 1, it is available here.

    Adding Custom Operations to Your Endpoints

    API platform automatically creates CRUD operations when the resource is created. Custom operations can be assigned to specific routes if an operation is specified. There are two types of operations for collections and items. Collection operations are operations that act on a group of resources such as retrieving all bucket lists. Item operations are operations that act on a single resource such as retrieving one bucket list. For collection operations, the GET and POST routes are implemented with the GET operation being enabled by default. In item operations, the …

    Read More
  • By Felistas Ngumi
    How to Build a CRUD RESTful API in PHP with API Platform and Symfony 4 How to Build a CRUD RESTful API in PHP with API Platform and Symfony 4.png

    Introduction

    As per the official documentation, API platform is a “powerful but easy to use full-stack framework dedicated to API driven projects”. API platform helps developers significantly speed up their development process, building complex and high performance, hypermedia-driven APIs.

    It ships with Symfony 4, the Doctrine ORM, a dynamic Javascript admin created with React, and React Admin, Varnish Cache server, Helm Chart to help deploy the API in a Kubernetes cluster and a Progressive Web Application skeleton. It also includes a Docker setup for providing Nginx servers to run the API and JavaScript apps. Most inspiring is the ability of API platform to natively generate project documentation with support of OpenAPI!

    In this tutorial, I will take you through how to create a simple bucket list API with CRUD operations.

    Prerequisites

    1. PHP - Version 7.0 or higher.
    2. Docker
    3. Postgres

    Getting Started

    Follow the instructions below to setup your development environment: …

    Read More
  • By Felistas Ngumi
    How To Send Images on WhatsApp using PHP Copy of Photo blog Header 2.png

    Introduction

    WhatsApp is one of the most popular instant messaging applications used globally. It has over 450 million active users every day with an average user checking WhatsApp 23 times in a day. Modern businesses that have upheld online marketing tools in order to reach their customers have recorded tremendous growth in their sales and increased their customer base. In this tutorial, I’m going to take you through how to send WhatsApp messages with image attachments using PHP.

    Prerequisites

    Ensure you have the following installed in your local development environment.

    1. PHP
    2. Twilio Account activated with WhatsApp Sandbox Channel.
    3. Twilio PHP SDK

    Getting Started

    In your preferred terminal, run the following commands:

    $ mkdir demo
    $ cd demo
    $ touch twilioWhatsAppMessaging.php .env
    $ composer require twilio/sdk vlucas/phpdotenv
    

    The above commands create a folder named demo, in which the twilioWhatsAppMessaging.php and .env files are created inside of it. We have …

    Read More
  • By Felistas Ngumi
    How to Send an SMS When Your Cron Job Fails s_GWj3dUVosS0McoBNRkpQY9URIWuNU2TGYt2L9-FCZ0-5RQl88a4rfbWGAUiwaUh-RkPZiOk7uvoOOZgS-cXNBW6lsA05BHAuNkLLmvC6h55ADtw1s8DtpBPkHS8jiBI4wS85h3

    A modern-day business that relies heavily on tech to operate requires virtually no downtime at all. Case scenario would be an e-commerce business which needs to reconcile its sales every day through cron jobs that run at scheduled times of the day. Mitigating issues when the crons fail takes time since there is no way to alert the stakeholders. This may lead to huge losses or embarrassment to the company depending on the type of reports you are generating via cron.

    In this tutorial, we are going to learn how to use the Twilio Programmable SMS API to send text messages when a cron job fails. We will create a simple cron job that sends weekly emails to users then integrate with Twilio Programmable SMS API to send an SMS when the cron fails.

    Prerequisites

    Ensure you have the following installed in your local development environment.

    1. PHP - Version 7.0 …
    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.