Code, Tutorials and Hacks
Texting is one of the most common forms of communication in the modern age. Twilio provides a simple and easy-to-use interface for sending SMS text messages through their SMS API.
In this tutorial, you’ll be using the Twilio SMS API to create your very own API texting service using Python and the FastAPI framework.
Additionally, you’ll also learn about testing backend servers created with FastAPI, as well as how to deploy the API to Heroku using Docker.
If you're unfamiliar, FastAPI is a Python web framework for creating fast API applications. FastAPI also has default integration with Swagger documentation and makes it easy to configure and update.
Docker, on the other hand, is an industry staple in software engineering, as it is one of the most popular containerization softwares out there. Docker is used for developing, deploying, and managing applications in virtualized environments called containers.
The main selling point …
You can use the Twilio Programmable Messaging to send contact information in vCard format via MMS. If you have a business with many users and you must send contact information, you should consider sending it over MMS. You can also send vCards via WhatsApp, but using MMS will allow you to reach anyone even if they don't use WhatsApp. In this post, you will see how to generate and send vCards over MMS programmatically using C# .NET.
You will need the following for your development environment:
- a .NET IDE (Visual Studio, VS Code with C# plugin, JetBrains Rider, or any editor of your choice)
- .NET 6 SDK (earlier and newer versions should work too)
- A Twilio account (try out Twilio for free)
- ngrok CLI
What is vCard?
As consumers demand more access to apps and services, developers pursue new ways to make data structuring and querying more effective, in order to reduce response times.
This demand has inadvertently led to a migration from Structured Query Language (SQL) to Non-structured Query Language (NoSQL) for database interactions. For applications that require data to be stored in one place and accessed once without creating relationships, this leads to faster querying.
One of the most widely adopted versions of NoSQL is MongoDB, an open-source document-based database used for cross-platform document-oriented database programming.
In this tutorial, you will learn how to use MongoDB in a Laravel Lumen application, to store, edit, and read data.
In order to complete this tutorial you will need access to the following:
- Basic knowledge of PHP
- Basic experience with Laravel and Lumen
- Basic experience with MongoDB
- PHP 8.0 or higher, with the mongo-db extension
- A …
RTP, or Real-time Transport Protocol, is used by Twilio (and others) for transmitting audio information for SIP calls. SRTP is Secure RTP, or RTP that has been encrypted. By design, no one can listen to, intercept, or replay the encrypted RTP media except the parties that originally negotiated the SIP session.
In this post, we will discuss:
- How SRTP Works
- Why encrypted media is cool
- Overcoming potential obstacles and overhead
- How to set up SRTP with Twilio
- Implementation considerations
How does SRTP work?
If you understand HTTPS, then you will totally get SRTP. If not, let’s start by reviewing the basics.
SRTP employs TLS for encryption, which uses a ‘handshake’ that looks something like this:
The client and server exchange keys, which are unique to the current session, and use them to encrypt/decrypt the data that is being transferred between them.
SRTP uses Advanced Encryption Standard (AES) …
Are you looking for your next travel destination, but can't decide on where to travel to? For National Anti-Boredom Month, consider building this travel recommendation bot to make the decision for you.
In this tutorial, you will use Twilio's Programmable Messaging API, Python, Flask, and Airtable to build a travel recommendation bot. After messaging the bot, the bot will reply with an image and location of your next travel destination.
To continue with this tutorial, you will need:
- Python 3.6 or higher installed on your machine.
- A Twilio account. If you haven’t yet, sign up for a free Twilio trial.
- A Twilio phone number. After having an account, you will need to obtain a Twilio phone number. Learn how to search for and buy a Twilio phone number here.
- An Airtable account.
- ngrok installed on your machine. ngrok is a useful tool for connecting your …
Our world today can be described as smart. Smart houses, smartwatches, smartphones, smart cars and even smart foods 😜 is the talk of the day. These smart devices are made possible majorly due to advancements in the field of computer vision. This consists of object and text recognition, which opens doors for unimaginable technology that will certainly influence how humans live and learn in the coming times.
The Google Cloud Vision API gives access to powerful pre-trained machine learning models that can be employed via easy-to-use REST APIs. It promises to be an exciting project that you will be proud to show to your friends after you complete it.
This article provides insight into integrating object and text recognition features into your Java Spring Boot application. In the tutorial, you will learn how to use the Google Cloud Vision API to create a cool app that can analyse images …
In recent years, user authentication in web applications has become a serious concern. For example, one-time passwords (OTP) are utilized to verify a user's identity; the most frequent method for sending OTPs is via SMS to the user's registered cellphone number.
In this tutorial you will learn how to send one-time passwords to users over voice calls in PHP using Twilio's Verify Api. In doing so, you will create an OTP system that can be used as an additional security layer for specific operations in your application.
To follow this tutorial, you need the following:
- PHP 7.4 or higher with the PDO extension and PDO MySQL extension installed and enabled.
- Composer globally installed.
- MySQL and the MySQL command-line client (or an alternative database tool, such as DataGrip).
- A Twilio account. If you are new to Twilio, click here to create a free account.
Phone verification is an essential part of the user onboarding process: whenever you collect new contact methods from users you should make sure those are valid. You can also use a similar workflow to authenticate users on an ongoing basis with a one-time passcode (OTP) sent to the user's phone. This is a user-friendly way to do either primary or two-factor authentication (2FA).
This blog post will show you how to send an SMS OTP in Go using Twilio's Verify API. Best of all, once you implement the code you can send an OTP via WhatsApp, voice calls, and emails with one parameter change.
Prerequisites for sending an SMS OTP
To follow along …
For years, REST (Representational State Transfer) has been the de facto standard when designing APIs. That's quite understandable, as it's a very straight-forward structure: After sending a request to an endpoint, a JSON (or XML) response is returned to the client.
However, as applications became more complicated a recurrent theme started to emerge - multiple REST calls are required to populate a view. Enter GraphQL. With GraphQL, the sender of the request determines the structure of the response, thus providing more flexibility and efficiency to the frontend.
In this article, I will show you how to develop a GraphQL-powered API for an online book store with Symfony.
To get the most out of this tutorial, you need the following:
- A basic understanding of GraphQL
- Basic experience with PHP and Symfony
- PHP 8.0
- The Symfony CLI
Create a new Symfony application, and …
In this article, you will learn how to create a nicely formatted dynamic email using the Twilio Blog RSS feed as source data and send it via the SendGrid API. You will first look into creating the template with test data. Then you will learn how to parse RSS and HTML and send the emails with dynamic data.
You'll need the following things for this tutorial:
- A free Twilio SendGrid account. Sign up for a SendGrid account here to send up to 100 emails per day completely free of charge
- An OS that supports .NET (Windows/macOS/Linux)
- .NET 6.0 SDK (newer and older versions may work too)
- A code editor or IDE (Recommended: Visual Studio Code with the C# plugin, Visual Studio, or JetBrains Rider)
- SendGrid API key (See Manage SendGrid API Keys)
- A verified Sender email or domain to send emails from (See Adding a …