Home / Companies / Twilio / Blog / January 2021

January 2021 Summaries

36 posts from Twilio

Filter
Month: Year:
Post Summaries Back to Blog
Two Factor Authentication (2FA) is an added layer of security that requires a user to provide some extra information, such as a One Time Token or password, in addition to their username and password to access their account. In this tutorial, we implemented 2FA using Twilio's Verify API for a CakePHP application, which sends a token as an SMS to the user's phone number at the login stage. The user is then required to provide the token to access the secure area of the app. We also implemented a second layer of authentication that requires the user to verify the token via SMS before accessing the secured area. To prevent bypassing the verification stage, we created a custom middleware called `SMSVerificationMiddleware` that redirects the user back to the token verification page if they try to access a permitted route without providing a valid One Time Token. The entire codebase for this tutorial is available on GitHub, and we hope you found this tutorial helpful in implementing 2FA for your CakePHP application.
Jan 29, 2021 4,133 words in the original blog post.
The application in this tutorial is a simple browser-to-browser messaging system that uses WebRTC's data track feature to send and receive messages between instances of the application. The application consists of two parts: a Flask backend that generates access tokens for the front end, and a vanilla JavaScript frontend that connects to the Twilio Programmable Video service using an access token. The application allows users to type their names in a text entry field and click a "Ping" button to send messages to other instances of the application. The messages are received by other instances and displayed in a list below the text entry field. The application also sets up event handlers to be notified when new participants join or leave the room, allowing for real-time communication between instances of the application.
Jan 29, 2021 2,761 words in the original blog post.
The Programmable Messaging API by Twilio provides different types of SIDs, each with unique characteristics and uses. The Message SID is the recommended SID to use for any actions taken on a single message, as it has become the standard in the latest version of the API. The SMS and MMS SIDs are deprecated and may not work with newer versions of the API. The Messaging Service SID is used to group together common senders and share functionality and configuration, while the Account SID serves as a credential that acts as a username and should be kept hidden. Understanding these SIDs can help developers set up Status Callback URLs and use the Programmable Messaging API effectively.
Jan 29, 2021 1,038 words in the original blog post.
The Twilio Programmable Video API is used to create a robust video chat application, and in this tutorial, the dominant speaker detection feature is added to it. The dominant speaker detection feature highlights the loudest participant in a call with multiple participants. To run the application, Python 3.6 or newer, a free or paid Twilio account, and a compatible web browser are required. The application uses vanilla JavaScript, HTML, CSS, and Flask as its backend framework. The tutorial provides step-by-step instructions on how to set up the Twilio account, install the necessary dependencies, and run the application. The updated index.html file includes a form for participants to join the video call and a div element to display the participants' name tags. The participantConnected function is used to create a unique ID for each participant's name tag. The connect function is modified to capture and handle dominant speaker change events from Twilio Group Rooms with 2 or more participants. The handleSpeakerChange function is called every time a dominant speaker changes, and it removes the highlight from the previous speaker and adds it to the current dominant speaker. The setLabelColor function is used to set the background-color of a label element.
Jan 29, 2021 2,186 words in the original blog post.
Muting and unmuting in video calling apps is crucial for user experience. The Twilio Programmable Video App with React.js allows developers to add this functionality, enabling users to mute or unmute their audio or video tracks. By using the Twilio CLI, a free account, and Node.js v10+, developers can configure their backend and frontend to work together seamlessly. The AVControl component is used to manage the different icons that represent the on/off state of each track, while the Track component handles the actual muting and unmutting process. With this setup, users can see their own mute/unmute icons and control their audio or video tracks accordingly. This tutorial provides a step-by-step guide for developers to implement muting and unmuting in their React video chat apps using Twilio Programmable Video.
Jan 29, 2021 2,236 words in the original blog post.
Twilio's Superb Owl Awards recognize employees who have made an outsized impact on the company through innovative solutions, programs, and contributions to its mission, with a focus on diversity, equity, and inclusion. The 2020 award recipients included teams from various departments such as Compass, People Enablement, Black Twilions Employee Resource Group Leads, Contact Tracing, Signal Virtual Experience, HIPAA, COVID-19 Response Team, and Sales Engineering Leadership, who demonstrated exceptional teamwork, creativity, and dedication to delivering outstanding results in the face of challenges posed by the pandemic.
Jan 29, 2021 1,275 words in the original blog post.
This article guides readers through building a development version of a video chatting application using TypeScript and Twilio Programmable Video. Readers learn how to manage participant connection logic without worrying about authentication and identity management. They set up a Parcel project with TypeScript, install required dependencies, and configure the project by generating access tokens for testing. The application is built, including creating an HTML structure and adding TypeScript logic to connect to a room, manage tracks, and handle events. Readers learn how to attach remote tracks, subscribe to track events, and unsubscribe from tracks when necessary. The article concludes with running the application, which allows users to join a room, see their webcam stream in a preview window, and share video streams with other participants.
Jan 28, 2021 3,733 words in the original blog post.
To build a voicemail system with Twilio and Ruby, start by setting up a new Rails project, installing the necessary gems, and configuring the environment variables. Create an initializer for the Twilio client and define routes for answering incoming calls, handling unanswered calls, and recording messages. The `initial_answer` method returns TwiML to answer the call and redirect it to your cell phone number, while the `handle_unanswered_call` method plays a message and starts recording if the line is busy or the caller doesn't answer. The `recordings` method sends an SMS notification with a link to listen to the recorded message after it's finished. To serve the application publicly, use ngrok to create a tunnel to your localhost server and configure the Twilio phone number to call the `/initial-answer` endpoint when there is an incoming call.
Jan 28, 2021 2,036 words in the original blog post.
You want to receive a call notification when someone is detected by your Google Nest security camera, but the built-in feature does not allow this. To solve this problem, you can use Twilio and CloudMailin to create a system that alerts you via phone call whenever a person is detected by the camera. The process involves configuring the Nest notifications, creating a Twilio project with a custom TwiML response, setting up a CloudMailin account, forwarding GMail notifications to the CloudMailin mailbox, and finally testing the entire integration.
Jan 28, 2021 1,021 words in the original blog post.
In this article, you will learn how to develop a functional website to authenticate your users and protect their identity and access to the site using Twilio Verify. The tutorial requires Python 3.6 or newer, Flask framework, python-twilio package, and environment variables. To start, create a project directory, set up the environment, create a database file of eligible users, plan the logic of the project, and design the user login page. The flow of logic for the project includes sending a one-time passcode to the user's phone number after the user enters their email on the website homepage. The user is then prompted to enter the verification code they received from their phone to verify their identity. If the verification code is correct, the user is redirected to another route where they can view their account information.
Jan 27, 2021 2,485 words in the original blog post.
The article describes how to build a simple call center using Twilio Programmable Voice and Python. The call center allows customers to wait in a conference with other waiting customers until an agent is available to connect them. If the customer hangs up, they are removed from the queue. The system uses Flask as the microframework and handles incoming calls by adding the caller's phone number and CallSid to two queues: CUSTOMER_QUEUE and AGENT_QUEUE. When an agent calls in, their phone number is added to the AGENT_QUEUE, and if there is a customer available, they are connected immediately. Otherwise, they wait in a conference with other customers until one hangs up or an agent is available. The system also includes a CustomerRedirect Thread that handles redirecting customers to agents after the agent has been connected. The call center can be tested by navigating to the ngrok URL and calling the Twilio number.
Jan 26, 2021 1,906 words in the original blog post.
The project involves using Twilio Programmable SMS with Python and Flask to build a bot that accepts a text message containing a location, country code, and date, and responds with a satellite image for that time and location via NASA's Earth APIs. The bot uses the HERE Location Services API for forward geocoding and the NASA API to obtain an image URI. The project requires creating a Flask application, setting up Twilio and Ngrok, and implementing functions to parse and validate the incoming message, geocode the location, fetch the satellite image URI, and respond to the user with the image URL. The bot can be tested by sending a text message to the configured phone number, and it may take some experimentation to find dates that work for specific locations due to NASA's rate limits on demo keys.
Jan 26, 2021 2,230 words in the original blog post.
This tutorial describes how to build a chess progress monitor using Twilio Serverless and SMS. The project uses the chess.com API, which provides public data such as player profiles, game data, and club or tournament information. To get started, users need to create a Twilio account, install Postman and Node.js, and make a chess.com API request to retrieve a user's profile information. Next, they use the Twilio Serverless Toolkit to create a new project, install required dependencies, and make a Twilio Function with JavaScript that sends a text message containing the user's rapid chess record information. Finally, users configure their function with a Twilio phone number and share it with friends, allowing them to track their progress on chess.com.
Jan 25, 2021 1,014 words in the original blog post.
This script creates a real-time bank account monitor that sends SMS alerts for debit transactions using the TransferWise API and Twilio SMS API. The application retrieves profile IDs, balances, and statements from the TransferWise API and formats them into an SMS message using the Twilio API. It also schedules recurring jobs to run on a server every five minutes using CRON or launchd/ScheduledTasks, depending on the operating system. This allows the monitor to act quickly in case of suspicious activity, such as fraudulent debit transactions. The script uses Python, requests, and Twilio libraries, and requires a TransferWise account, a server with low CPU power, and environment variables for authentication and phone numbers.
Jan 25, 2021 2,284 words in the original blog post.
In PHP, every script has a 30-second time limit to complete, which can cause server timeouts if API requests, database transactions, and data processing take too long. To measure script execution time in sending an SMS with Twilio Programmable Messaging, developers need to use the microtime() function to record start and end times of the process, calculate the time difference, and display the results. By doing so, they can make more performant decisions about their application's performance and avoid leaving users waiting for too long.
Jan 22, 2021 889 words in the original blog post.
A Chrome extension can customize the browsing experience by adding functionality such as blocking ads and popups, formatting JSON, editing grammar, helping with vocabulary, designing, and programming. To create a Chrome extension, developers need to know HTML, CSS, and JavaScript, and use the manifest.json file to provide essential information about the extension. The extension's UI elements, including options pages and UI components, are created using web development technologies like HTML, CSS, and JavaScript. The chrome_url_overrides key is used to override the default new tab page with a custom HTML file. To store data in the Chrome storage API, developers need to declare their intent in the permissions field of the manifest.json file and use the set() and get() methods to update and retrieve the stored data. By applying these concepts, developers can build Chrome extensions that enhance the browsing experience.
Jan 21, 2021 2,878 words in the original blog post.
Twilio has announced the general availability of its Studio REST API v2, which provides full support for publishing Flows via the REST API, Twilio’s helper libraries, and the Twilio CLI. This update enables developers to automate Flow deployments, templatize Flows, integrate with CI/CD pipelines, update Studio Flows as part of a larger deployment, move flows between sub-accounts and projects, and create custom front-end UIs. The new API allows users to programmatically control their Studio flows by manipulating the underlying JSON object, making it easier to automate testing, deploying, and updating Flows. This development is expected to simplify the process of publishing and deploying Flows, providing more flexibility and power for developers building complex communication workflows.
Jan 21, 2021 563 words in the original blog post.
During a year marked by significant change, including the COVID-19 pandemic, email has become an essential connection between businesses and their customers, with engagement increasing by 200%. Twilio SendGrid played a crucial role in reliably processing over 1 trillion emails, a feat that would line up end to end for 173 million miles. This milestone was made possible by customers like DonorsChoose, PetDesk, and Luma Health, who built email programs with Twilio SendGrid to engage their user-base and deliver critical information. These organizations leveraged the flexibility of Twilio SendGrid's Email API to personalize their experiences, automate promotional emails, and scale their sending capabilities, resulting in significant increases in engagement and open rates. As companies continue to grow and send millions of emails, it's essential for senders to implement strategies like IP warmup to ensure reliable delivery, making Twilio SendGrid a trusted partner for businesses looking to build and optimize their email programs.
Jan 21, 2021 915 words in the original blog post.
This tutorial has provided a comprehensive guide on how to add emoji reactions to video calls using Twilio's Data Track API. The application was built using Flask, Python, and JavaScript, with a focus on enhancing the user experience through real-time emoji sharing between participants. The code covered various aspects of the project, including setting up a Twilio account, creating a virtual environment, installing dependencies, designing the user interface, overlaying emojis over video feeds, sending and receiving data tracks, and adding CSS animations to create a smooth transition effect. The application now allows users to send and receive emojis in real-time, making it a unique and engaging feature for video conferencing applications.
Jan 20, 2021 3,030 words in the original blog post.
This summary provides an overview of building a voicemail system using Twilio and Java with Spring Boot. The system allows for answering incoming calls, playing a message when the line is busy or unanswered, recording the caller's message, and sending an SMS notification with a link to listen to the recording. The system consists of three main endpoints: initialAnswer, handleUnansweredCall, and handleRecording, which are handled by the VoicemailHandler class annotated with @RestController. The system also requires configuration to handle real phone calls, including setting up Twilio's webhook for incoming calls and authenticating a Twilio client for sending SMS notifications.
Jan 20, 2021 2,176 words in the original blog post.
The PSTN, or Public Switched Telephone Network, is a circuit-switched telephone network that has been in use for nearly 150 years. It works by using underground copper wires to connect homes and businesses to switching centers, where calls are connected to each other. The process involves dialing a number, which is routed through the PSTN to the recipient's phone. The PSTN uses traditional methods such as area codes, exchanges, and toll offices to route calls, but has been largely surpassed by more modern communication solutions like VoIP. Businesses often use private branch exchange (PBX) systems or hosted PBX solutions, which offer features like auto-attendants and scalability, making the PSTN less necessary for their needs.
Jan 20, 2021 1,110 words in the original blog post.
The Texas Regional Advisory Council and the Texas Division of Emergency Management partnered with Twilio to use Flex as a hybrid hotline and phone system for COVID-19 vaccine distribution logistics. They needed to provide 24/7 inbound calls about vaccination logistics, as well as direct inward dial (DID) capabilities for emergency responders to coordinate with healthcare providers on personal numbers. The team deployed a solution that handled several thousand calls in one day, using Flex's TaskRouter workflow to match incoming calls to the right agent based on their DID phone number. They created a Twilio Studio flow to handle inbound calls from DID numbers and assigned phone numbers to TaskRouter workers through SSO syncing. Finally, they developed a Flex plugin to enable agents to make outbound calls from their own DID numbers, with customizable caller ID and display of agent's number in the interface.
Jan 20, 2021 2,250 words in the original blog post.
Twilio Video JS Logger is a tool that allows developers to capture and process logs generated by the Twilio Video JS SDK in real-time, providing visibility into their application's behavior. The logger can be integrated with the loglevel module, which provides a lightweight logging library for modern browsers and NodeJS environments. By intercepting logs, developers can filter them based on specific components, send them to remote servers, and monitor their frontend applications' behavior in production. The loglevel-plugin-remote module supports sending logs to a server with minimal configuration, enabling easy monitoring of frontend applications.
Jan 20, 2021 1,061 words in the original blog post.
The Twilio Sync API is a key component of the programmable contact center, connecting different APIs and synchronizing data across distributed applications. It powers contextual communication, statistics, call states, and delivers powerful use cases such as canned responses, scheduled SMSes, disposition codes, curbside pickup, and directory services. The API enables businesses to build scalable applications from scratch, without relying on new features, by storing and accessing a wide range of data efficiently. To build secure scalable applications with Sync, it's essential to follow best practices, such as building proper backend services, avoiding large production apps, and implementing exponential backoff retry logic. Additionally, the API includes several hard limits, including a limit of 20 read/writes per second, and should be used for short-term and relevant data only.
Jan 19, 2021 1,416 words in the original blog post.
WePledge 1% is a movement that encourages individuals to advocate for human rights by supporting organizations that promote dignity, equality, and justice worldwide. The organization highlights the importance of human rights, particularly during crises like the COVID-19 pandemic, which disproportionately affects marginalized communities, including women, LGBTQ+ individuals, and people of color. To make a difference, WePledge 1% invites volunteers to support various causes, such as Amnesty International, Missing Maps, UN Online Volunteering, Equality Now, Save the Children, Free and Equal UN, The Center for Justice and Accountability, and NAACP Legal Defense Fund. By committing 1% of their time or resources to do good, individuals can collectively build positive change globally and create a world where human rights are enjoyed by all.
Jan 18, 2021 880 words in the original blog post.
React is an open-source JavaScript UI library that helps developers build user interfaces with minimal stress, using a tree-like structure for organization. By comparing it to Flask, a Python microframework, this article shows how to translate a simple Flask web application to React. The process involves creating a new React application, rewriting the code in React, and adding components and props to make the UI more dynamic. The article also covers the use of CSS in React, including inline styling and separate CSS files. With these skills, developers can build scalable and maintainable applications with React.
Jan 15, 2021 1,959 words in the original blog post.
The GraphQL API allows users to message each other, creating new messages and retrieving existing ones. The server pushes new messages to subscribed clients in real-time using subscriptions. The API uses an asynchronous server built with Uvicorn, a Python library that supports ASGI, and Ariadne, a Python package for building GraphQL APIs. It also uses asyncio.Queue to manage the subscription queues. The client can subscribe to messages for specific users, receiving new messages as they are created. The API includes features such as user authentication, message sending, and receiving, making it suitable for real-time communication applications.
Jan 15, 2021 3,684 words in the original blog post.
To enable participants to mute and unmute themselves in a Twilio Programmable Video app built with the JavaScript SDK, developers can attach local participant tracks to the DOM and provide interactive elements for muting and unmuting. When a user interacts with these elements, the corresponding track is disabled or enabled, emitting an event that can be listened for on the UI to update accordingly. By attaching listeners to the `disabled` and `enabled` events of each track, developers can respond to changes in real-time and update their app's UI to reflect the current state of audio and video tracks.
Jan 14, 2021 922 words in the original blog post.
You can check your Twilio account balance using Python by first setting up the necessary environment variables with your account SID and Auth Token. Then, you can use the Twilio Python Helper library to initialize a client instance and fetch your account balance. The balance is returned as a string, so it's converted to a float for easier usage. You can also retrieve the currency used in your account. Finally, you can integrate this into a simple script that prints out your current account balance when run from the command line.
Jan 14, 2021 831 words in the original blog post.
The tutorial explains how to generate access tokens for Twilio services using Python and the Flask framework, allowing for secure authentication of web applications running in browsers. The server-side component is responsible for generating an access token for a user after verifying their identity through a username and password. The generated token is then returned to the client as a JSON Web Token (JWT) with a specified validity period and grants for specific Twilio services, such as Programmable Video or Conversations.
Jan 13, 2021 2,323 words in the original blog post.
Home Assistant is an open source home automation system that allows users to control Internet of Things devices like smart bulbs, smart switches and sensors. To receive alerts from Home Assistant via Twilio SMS, users need a Twilio account, a working Home Assistant installation with some sensors connected, Linux familiarity, and enough comfort editing configuration files. Users can set up their Twilio credentials, create a helper script to send SMS messages, add numbers to the Home Assistant secrets file, and define a custom shell command service to call the helper script. This allows users to automate sending SMS alerts when certain conditions are met, such as when water is detected on a sensor, providing an added layer of convenience and notification for home automation tasks.
Jan 12, 2021 1,402 words in the original blog post.
When it comes to choosing between VoIP (Voice over Internet Protocol) and traditional landline phones for business use, there are several key considerations to keep in mind. Pricing is a major factor, with VoIP often being significantly cheaper due to lower setup fees and pay-as-you-go pricing plans. Call management features such as auto-attendants, call forwarding, and recording are also more readily available on VoIP systems, which can be set up at no additional cost. Device flexibility is another advantage of VoIP, allowing users to make and receive calls from multiple devices with ease. However, landlines still have an edge when it comes to emergency services, as they are easily traced to a specific location. Call quality and reliability also depend on the strength of your internet connection for VoIP, but this can be mitigated with proper equipment. Finally, VoIP is generally easier and more affordable to scale up or down, making it a more cost-effective solution in the long run.
Jan 11, 2021 1,485 words in the original blog post.
Ask Your Developer`, a playbook for unleashing developer power, from Twilio CEO Jeff Lawson, highlights the critical need for businesses to evolve their culture and organization to support developers in designing and building custom experiences that meet unique business needs. As COVID-19 accelerated digital transformation, companies realized that boxed software solutions didn't fit their needs, leading to an increased focus on developing a culture where developers can thrive and tackle real business challenges. The book emphasizes the importance of recognizing this shift and investing in developer talent, as well as creating an environment that tolerates failure, keeps developers close to customers, and assigns problems rather than tasks. By doing so, business leaders can unlock their full potential and build a more diverse community of builders to fill the demand for skilled developers.
Jan 11, 2021 539 words in the original blog post.
A Private Branch Exchange (PBX) is a business telephone system that handles inbound and outbound calls for an organization. It traditionally uses copper landlines but has evolved into hybrid and cloud-based systems utilizing Voice over Internet Protocol (VoIP). There are several types of PBX systems, including PABX, IP PBX, and hosted PBX. Each type offers unique benefits and drawbacks, such as increased flexibility, scalability, and reliability with IP PBX systems, while hosted PBX provides a cloud-based solution with minimal maintenance costs. Understanding the differences between these options is crucial for businesses to choose the best fit for their needs.
Jan 07, 2021 1,162 words in the original blog post.
A data layer is a JavaScript object used to collect and manage data from a website in a standardized way, ensuring consistent data across various tools such as analytics and marketing platforms. It acts as a central repository for data collected from visitors, allowing seamless integration with tools like Google Analytics and Google Tag Manager. This centralized approach prevents data inconsistencies that may arise from changes in a website’s design or toolset, ensuring reliable data collection and analysis. The implementation of a data layer requires collaboration between developers and marketers to define the necessary data and naming conventions, forming a unified strategy for data collection and enhancing data quality. It also provides flexibility, enabling businesses to adapt their data strategy as needs evolve, while maintaining data integrity across different tools and changes in website structure. The establishment of a data layer is a complex and ongoing process, involving initial planning and regular updates to ensure that the data collected remains relevant and useful.
Jan 07, 2021 2,546 words in the original blog post.
Here's a neutral and interesting summary of the text: Packet loss occurs when data packets do not make it to their destination, often caused by network congestion, outdated hardware, overloaded devices, software bugs, or security breaches. Understanding how data packets are broken down into smaller chunks called packets is crucial to grasping packet loss. The Transmission Control Protocol/Internet Protocol (TCP/IP) breaks down data into packets for easier transfer, but this can lead to packet loss if the packets do not arrive at their destination on time. TCP and UDP protocols handle data transmission differently, with TCP being more reliable but slower due to its need to establish a connection and resend packets, while UDP is faster but less reliable due to its lack of error correction. To fix packet loss, one can try restarting devices, turning off Bluetooth devices, switching to a wired connection, increasing bandwidth, configuring QoS settings, updating software, or setting up a VLAN for voice traffic. Proactively tracking packet loss and latency can help resolve issues before they become problems.
Jan 05, 2021 1,558 words in the original blog post.