Completing this tutorial will require the following:
- Basic knowledge of Laravel
- Laravel Installed on your local machine
- Composer globally installed
- Twilio Account
Create a new Laravel project using the Laravel Installer. If you don’t have it installed or prefer to use Composer, you can check out how to do so from the Laravel documentation. Run the following command in your terminal to generate a fresh Laravel project:
$ laravel new twilio-authy
Next, you will need to set up a database for the application. For this tutorial, we will make use of MySQL database. If you make use of a database administrator like phpMyAdmin for managing your databases then go ahead and create a database named
twilio-authy and skip this section. If not, install MySQL from …
When a personal crisis strikes — whether it's an LGBTQ teen experiencing bullying, a war veteran who is suffering from PTSD, or a child who is the victim of abuse — access to the right help at the right time can make all the difference.
Globally, the number of acute personal crises are growing. There has been a 31% increase in the overall suicide rate since 2001, and a doubling of drug overdose deaths in the last decade. This disturbing trend underscores that it’s more important than ever for people to have access to effective crisis intervention services.
While the weight of these crises can feel overwhelming, the people leading nonprofits that provide help to people in crisis give us tremendous hope. We wanted to take some time to highlight some of our heroes in crisis response and prevention - nonprofit leaders who are using technology to ensure that people …
Today we are thrilled to announce that SIP Refer from Twilio is now generally available for call centers looking to transfer calls from Twilio to their SIP infrastructure. This enables call centers to save money on their calls by removing Twilio from the call path. When used in conjunction with SIP UUI Headers, a feature released this summer, context from Twilio can be passed along with the SIP Refer.
Call Centers can use SIP Refer and SIP UUI Headers to transfer calls from Twilio to their internal SIP infrastructure, while maintaining call context, in order to transfer the call back to their IP infrastructure and handle sensitive information internally.
Transfer the call back to your IP infrastructure
When a customer calls into a contact center through Twilio to speak with Agent 1, Agent 1 can now transfer the call and pass relevant information to Agent 2 through their internal SIP …
RQ (Redis Queue) is a Python library that uses Redis for queueing jobs and processing them in the background with workers. It has a much lower barrier to entry and is simpler to work with than other libraries such as Celery.
RQ, and task queues in general, are great for executing functions that are lengthy or contain blocking code, such as networking requests.
Using RQ is as simple as creating a queue, and enqueueing the desired function along with the arguments you want to pass to it, according to the code in their “Hello World” example:
from redis import Redis from rq import Queue from my_module import count_words_at_url q = Queue(connection=Redis()) result = q.enqueue(count_words_at_url, 'http://nvie.com')
Let’s walk through how to use RQ to execute a function that grabs data from the Mars Rover API.
Setting up your …
Slim is an excellent PHP micro-framework. Out of the box it gives you compatibility with PHP standards (PSRs), PSR-11 for the container, PSR-7 for HTTP messages and PSR-15 for middleware. Its lightweight design gives you the bare minimum to get started with your web application; routing, a middleware dispatcher, error handling and a container. You need to wire up the additional services needed to handle requests and return responses.
But where do we start? Let's take a look at installing a clean installation of Slim from a community skeleton, and add our first component to it; the Twig templating engine.
Starting with Slim
Slim provides a skeleton application that lets you get started quickly, but it's designed more with an API in mind than a web application. I prefer to start with a more lightweight skeleton from Slim maintainer Rob Allen. Rob’s starter comes with PHP-DI dependency …
Online shopping doesn’t wait for Cyber Monday. Walmart started dropping prices on October 25th, a full month before Black Friday — the day after Thanksgiving — and consumers were ready for them: 45% of respondents in a recent survey said they already made plans to start holiday shopping before November. In fact, 54% of those surveyed said they intend to shop online during the five days between Black Friday and Cyber Monday.
The popularity of Cyber Monday, combined with the availability of public Wifi and the simplicity of one-touch mobile transactions, gives cybercriminals and hackers with bad intentions a perfect opportunity to take advantage of unsuspecting consumers. As with every year, there are sure to be plenty of bogus websites and phony emails intent on separating you from your money — or worse — your identity. So, if you’re planning on post-Thanksgiving shopping from your laptop or mobile device …
- Node.js and npm installed
- A free SendGrid account - sign up here
- At least two email addresses, to test things out and make sure they’re working. You can sign up for (multiple) free Gmail addresses here. Or you can try the old hack of adding a + to your existing Gmail address. Caveat: we ran into some deliverability issues there.
Setting up your environment
First, create your API key from the …
When your application sends emails it is useful to know what happens to those emails, like whether it has been delivered or opened. Or, sometimes more importantly, whether it bounced. The Twilio SendGrid email API doesn't just send emails, it can also send you events via webhook that tell you what happened to your emails.
In this post we'll build a small application using Ruby on Rails to send emails and update their status based on the Twilio SendGrid event webhooks.
What you'll need
In order to build this application along with this post, you will need:
- Ruby and Bundler installed
- ngrok - my favourite way to tunnel webhooks to my local machine
- A Twilio SendGrid account (if you don't have one, you can sign up for a free SendGrid account now)
If you have all of that, then you're ready to get building.
Preparing the example application
In a previous post you learned how to take a fresh application and deploy it to a Kubernetes cluster. While it’s great to start with a new application, most of us don’t get that luxury. Usually, you’re going to start off with something older and have to refactor and then migrate it.
This tutorial will show you how to take an existing application, refactor it using cloud-native principles, and deploy it to Azure Kubernetes Services. By the time you’re done, you will know how to move your own applications to the cloud.
Cloud Migration Patterns
When migrating applications to the cloud, there are a handful of different patterns you can follow. Which pattern you choose will depend on what you are trying to migrate and how much time you want to spend migrating them. Each of these patterns has different tradeoffs, so it’s good to understand them all when looking …
You're sending emails from your Python app with the Twilio SendGrid API and you want to attach files to your emails? The Twilio SendGrid API makes it very straightforward to include attachments to your emails. In this post, we’ll attach a pdf document to an email sent via SendGrid. If you have not sent your first email with SendGrid, my colleague Sam has written a post about it. We’ll be picking up where that post ended.
Before we begin, make sure you have the following setup:
- Python 2 or 3 installed (do this first if you haven't already)
- A Free Twilio SendGrid Account
- The Twilio SendGrid Python Library installed in your project