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

"javascript" posts

  • By Chuks Opia
    Implementing real-time data visualization in Node.js with Twilio Sync real-time-data-viz-node-sync (1).png

    In today’s world, almost every existing application is a real-time app. From chat apps, online games, ride-hailing apps, to collaboration tools, users expect to see instant updates as other users interact with the application. This goes to show that application state synchronization is important in building modern and interactive applications.

    Twilio Sync offers a state synchronization API for managing synchronized application states at scale across multiple devices and users.

    In this post you will learn how to add real-time functionality to a Node.js application using Sync. You will be building a sports survey application that shows the results of the survey in real time.

    Prerequisites

    To build the case study project for this post you need to have the following development tools installed on your system:

    • Node.js JavaScript runtime environment
      (The Node.js installer includes the npm package manager, which is also required.)
    • Twilio account – Sign up for a free …
    Read More
  • By Chimezie Enyinnaya
    Add Media Uploads to a Laravel Vue.js Chat App Using Twilio Programmable Chat Add Media Uploads to a Laravel-Vue.js Chat App

    In my last tutorial, I showed you how to add chat to a Laravel app using Twilio Chat. In this tutorial, I’ll be showing you how to enhance the app by adding media support to it using Twilio Programmable Chat. That is, allowing users to send media files as message.

    Prerequisites

    In order to follow this tutorial, you will need the following:

    Getting Twilio Credentials

    Login to your Twilio dashboard and copy both your ACCOUNT SID and AUTH TOKEN.

    Twilio Account Credentials

    Before you can start using the Twilio Programmable Chat, you need to first create a chat service:

    Twilio Programmable Chat Dashboard

    Take note of your SERVICE SID.

    Twilio Programmable Chat Configuration

    Lastly, you need to create an API key:

    Twilio New API Key

    Also, take note of both your API SECRET and API SID.

    Getting Started

    To make …

    Read More
  • By Phil Nash
    Speech to text in the browser with the Web Speech API Speech to text in the browser with the Web Speech API

    The Web Speech API has two functions, speech synthesis, otherwise known as text to speech, and speech recognition, or speech to text. We previously investigated text to speech so let's take a look at how browsers handle recognising and transcribing speech with the SpeechRecognition API.

    Being able to take voice commands from users means you can create more immersive interfaces and users like using their voice. In 2018, Google reported that 27% of the global online population is using voice search on mobile. With speech recognition in the browser you can enable users to speak to your site across everything from a voice search to creating an interactive bot as part of the application.

    Let's see how the API works and what we can build with it.

    What you'll need

    We're going to build an example app to experience the API, if you want to build along …

    Read More
  • By Sam Agnew
    Web Scraping and Parsing HTML with Node.js and Cheerio Copy of Generic Blog Header 1.png

    The internet has a wide variety of information for human consumption. But this data is often difficult to access programmatically if it doesn't come in the form of a dedicated REST API. With Node.js tools like Cheerio, you can scrape and parse this data directly from web pages to use for your projects and applications.

    Let's use the example of scraping MIDI data to train a neural network that can generate classic Nintendo-sounding music. In order to do this, we'll need a set of music from old Nintendo games. Using Cheerio we can scrape this data from the Video Game Music Archive.

    Getting started and setting up dependencies

    Before moving on, you will need to make sure you have an up to date version of Node.js and npm installed.

    Navigate to the directory where you want this code to live and run the following command …

    Read More
  • By Alex Baban
    Using the Twilio Node.js Helper Library with AWS Lambda Layers Using the Twilio Node.js Helper Library with AWS Lambda Layers

    AWS Lambda is a serverless computing platform that enables you to run programs in response to events without having to configure and administer servers. The code that runs on AWS Lambda in response to an event is called a Lambda function.

    With AWS Lambda Layers you can separate your function code from its dependencies so you won't have to upload them on every change of your code. A Lambda Layer is a ZIP archive that contains libraries, a custom runtime, or other dependencies. With Layers, you can use libraries without needing to include them in your deployment package. You can share layers across multiple Lambda functions, and moving runtime dependencies into layers can drastically reduce the size of your deployment package.

    The Twilio Node Helper Library lets you write Node.js code to make HTTP requests to the Twilio API. Including the Twilio Node Helper Library in the code you deploy …

    Read More
  • 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 Lizzie Siegle
    Analyze Entities in real-time Calls using Google Cloud Language with Node.js Analyze Entities in Real-time Calls

    Businesses can better serve customers by determining how a phone call is going in real-time either with a machine learning model and platform, like TensorFlow, or with an API. This post will show how to perform entity sentiment analysis in real-time on a phone call using Twilio Programmable Voice, Media Streams, and the Google Cloud Speech and Language APIs with Node.js.

    Lizzo in terminal

    Prerequisites

    Document-Level versus Entity-Level Analysis

    Entities are phrases in an utterance or text that are commonly-known such as people, organizations, artwork, organizations, or locations. They're used in Natural Language Processing (NLP) to extract relevant information. This post will perform both document-level sentiment analysis where every word detected is …

    Read More
  • By Tilde Thurium
    QR Codes And Security: A Shallow Dive QR-codes-security-shallow-dive

    QR codes have been referred to as “robot barf.” Which is too bad, because they’re pretty fascinating if you take a closer look.

    In this post, you’ll learn about:

    • History and inner workings of QR codes
    • Use cases and risks
    • How to generate QR codes in your application
    • How QR codes are used for two-factor authentication

    QR codes 101

    QR code is an abbreviation for Quick Response code. They’re a type of two-dimensional, or “matrix” barcode which means that information is stored across both the horizontal and vertical axes.

    QR codes were invented in Japan during 1994. They were originally used for tracking automobile parts. QR codes could store more data than UPC barcodes (the kind you commonly see on grocery store products and such), so they started to catch on in other industries as well. Denso Wave, the company that invented QR codes, made the spec …

    Read More
  • By Maciej Treder
    Asynchronous JavaScript: Using RxJS Observables with REST APIs in Node.js Async JS RxJS Observables Node js

    ReactiveX is an electrifying programming concept. It’s widely adopted in popular programming languages, including JavaScript. ReactiveX programs can react to data as it is emitted from a source, rather than get the data from it. This is a convenient way of handling data from sources like web APIs or WebSockets.

    In this post you’ll get hands-on experience doing ReactiveX programming with RxJS: ReactiveX for JavaScript. You’ll learn how to perform REST API calls to retrieve data asynchronously, manipulate it as it arrives, and perform subsequent calls based on the emitted data. You’ll also see how to perform other actions whenever data is emitted by an Observable.

    This post focuses on how to utilize RxJS Observables with REST API calls. The previous post in this series on Asynchronous JavaScript explains RxJS fundamentals:

    Understanding the case study project

    In this post you will see how …

    Read More
  • By Aymen Naim
    Announcing Programmable Video Javascript SDK 2.0 Announcing Programmable Video JS SDK 2.0

     

    Example of Twilio video conference call

    We are proud to announce Programmable Video Javascript SDK 2.0 is generally available!

    With this new release, we introduce features to uplevel the quality of your Video applications which include, Track Priority and Network Bandwidth Profile API, Region selection, and Reconnection State & Events.

    Programmable Video JS SDK 2.0 gives you the building blocks and tools needed to build web based multi-party Video Chat applications. The SDK hides the inherent complexities of Voice, Video, and data communications, which comprise signalling, media exchange, and network traversal to let you focus on providing the user experience your customers will love.

    Just like the 1.x version, Programmable Video JS SDK 2.0 is based on WebRTC and is supported on the most popular desktop and mobile browsers including Chrome, Firefox, Safari, and Chrome Edge. Video JS SDK 2.0 supports the same features in 1.x including Dominant Speaker detection, Network quality …

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