In this article, you’ll learn how to use WebSocket API with Spring Boot and build a simple status delivery application at the end.
WebSocket is a communication protocol that makes it possible to establish a two-way communication channel between a server and its client. Websockets are supported by most of the browsers that are commonly used today.
Create an Application
First, you need to set up your Twilio account and a suitable phone number.
- If you haven't yet, sign up for a free Twilio Account
- Purchase a phone number from the Console if you don't yet have one (you'll need one with SMS capability)
Here are the steps to generate a project using Spring Initializr:
- Go to http://start.spring.io/.
- Enter Artifact’s value as websocket-callback.
- Add Websocket in the dependencies section.
- Click Generate Project to download the project.
- Extract the downloaded zip file.
- Note: You will need Java 8 or …
Can a computer identify what's in an image? Development libraries like ImageAI make normally-complex Machine Learning tasks including object detection easier. This blog post will show how to build an image classification application using Python, Flask, and ImageAI. The application will receive inbound images with Twilio MMS and respond with a modified image segmented into detected objects and the model's detection confidence percentages.
- A Twilio account - sign up for a free one here
- A Twilio phone number with SMS capabilities - configure one here
- Set up your Python and Flask developer environment - Make sure you have Python 3 downloaded as well as ngrok.
- OpenCV, TensorFlow >= 1.4.0, and Keras 2.x
- ImageAI, an open source Python machine learning library for image prediction, object detection, video detection and object tracking, and similar machine learning tasks
- RetinaNet model for object detection supported by ImageAI. Download it here and …
PHP_CodeSniffer (PHPCS) is a tool that validates your code against a set of predefined standards and ensures that such standards are maintained across the team. This tutorial will walk you through automating those validations during development by setting up PHPCS on Sublime Text, Visual Studio Code, and PHPStorm.
Completing this tutorial requires the following prerequisites:
Installing PHP Code Sniffer
All of the editors below require PHPCS to be pre-installed, and since we plan to use it across projects, we will install it globally with the following command:
$ composer global require "squizlabs/php_codesniffer=*"
You can check your installation with:
Note: If you get an error similar to
command not found, …
There are plenty of opportunities for friction in the user experience when logging in, particularly while entering a two factor authentication code. As developers we should be building applications that support the need for account security but don't detract from the user experience. Sometimes it can feel as though these requirements are in a battle against each other.
In this post we will look at the humble
<input> element and the HTML attributes that will help speed up our users' two factor authentication experience.
The default experience
When you implement two factor authentication for a web application, perhaps with the Authy two factor authentication API, you will need a form for your user to input the one time password you are going to send them. You might create something similar to the following HTML:
<form action="/sessions/check-2fa" method="POST"> <div> <label for …
Today, we’re excited to share with you a new way to build Twilio apps using CodeExchange. It’s a searchable directory of customizable code samples, written by developers around the world, vetted by Twilio experts, and ready for you to use.
How CodeExchange Works
CodeExchange makes it easy to get started with any app.
Start by heading over to the Twilio CodeExchange page, and you'll be presented with a variety of code templates that span many use cases. You can either browse the directory of existing templates or, if you already have a use case in mind, you can search for that specific use case. Once you find the use case of your choice, pick a programming language you are comfortable with from the dropdown.
If you'd like to learn more about a particular template, click on the "Learn more" link for the use case of your choice, and you'll …
At Twilio, it’s important for us to share when there are changes to phone numbers that may affect you. This change is relevant to anyone who provisions regulated phone numbers via the IncomingPhoneNumbers provisioning API.
On February 12, 2020, when you provision new phone numbers through the /IncomingPhoneNumbers API, you will be required to include the proper documentation for regulated phone numbers. API calls to provision phone numbers that do not include a valid BundleSID / IdentitySID will fail with error code 21649. We will send you multiple communications to prepare you for this change. If you are using Console, this will not result in a change.
Additionally, there will be a brownout on January 15, 2020, during which the
IdentitySID parameter will be changed from
mandatory for the IncomingPhoneNumbers API to ensure all of our customers are prepared for the February …
SIGNAL, Twilio’s annual customer and developer conference, is coming up May 20-21 at Moscone West in San Francisco, and our call for papers is open now through January 31, for people interested in doing a breakout session.
SIGNAL breakout sessions show the power of communications implemented into everyday human interactions. For two days, speakers will have the chance to present to an audience of developers and business leaders who are interested in improving customer engagement.
People attending are looking to learn how to move their skill set, business or community to the next level by using communications.
Interested in speaking? This is what you need to know:
We’re looking for three types of sessions:
- Talk (~30 min) Educate the audience on your experiences, best practices and thought leadership on how to communicate and engage with your customers.
- In-depth technical workshop (~60 min) Dig deep into developing and deploying communication …
We’re excited to introduce you to our Twilio Startups team! If you’re a startup founder, you’ve probably bumped into one of us at an event, workshop or conference. Our mission is to serve startup founders all over the world through education, mentoring, and introductions. Feel free to reach out to us with questions, or apply to join the Twilio Startups Program.
Meet the Team
Tony Blank, Director of Twilio Startups
Location: Denver, Colorado
Tony is a noted speaker at industry events and has delivered hundreds of workshops, mentor sessions, and speaking engagements to help startups grow. Previously, Tony led the startup program at SendGrid, supporting a world-class team, helping over 5,000 startups find product/market fit and grow their first customers. Tony also draws on his technical expertise gained over the years at multiple startups, as a developer evangelist, and a software engineer. In his free time, …
PHP 7.4 has arrived, and it's shipped the usual raft of exciting features and improvements. For a recent live stream, we looked at all the features in the release notes and figured out what each one means in a coding sense. Let's take a look at some of the new features in PHP 7.4, and grade each one from A-F depending on how interesting they are, and my excitement to use them.
Note: This is my personal opinion based on my own unique experiences and opinions. You'll probably disagree with some of my grades, and that's good. Your opinions and experiences are different from mine. Let me know in the comments or on Twitter where you feel I went wrong.
We've been waiting for this feature since PHP 7.0 introduced scalar type declarations and return types, and I, for one, am very excited. We can now set …
Welcome to the Twilio Startups 7 (TS7, for short) where we feature exciting founders from around the world to share their inspiring entrepreneurial journeys through seven quickfire questions.
Today we would like to introduce you to Kemdi Ebi of Versus. Read on to learn more about how they built their international startup to help businesses gain actionable insights from big data. Check out their tips on hiring the right developer quickly, why finding investors is like finding a life partner, and taking calculated business risks, all while building a successful data company.
- Company Name: Versus
- Founder Name: Kemdi Ebi
- Industry: Software/Big Data & Analytics/Market Research
- Stage/Funding: Seed
- Location: Lagos, Nigeria, London, UK & Washington DC, USA
From the founder of Versus
We reached out to Versus to get insight into how they launched an international startup and what they’ve learned along the way.