How To Send a WhatsApp Message in 30 Seconds with PHP
WhatsApp is considered to be one of the top messaging apps globally, with over 1.5 billion users and over 60 billion messages sent per day. It has proven to be secure and reliable over the years and now with recent surveys, online businesses are using it as a communication medium to reach their customers other than the traditional way of sending SMS. In this tutorial, I’m going to take you through how to integrate WhatsApp Messaging into your application using the Twilio API for WhatsApp messaging. Here’s a short 30-second video on how you can achieve this after setting up.
This tutorial assumes you have basic knowledge of PHP and Unix/Linux commands. If not, don't be discouraged. I will explain every concept in detail.
Ensure you have the following installed in your local development environment.
Registering a SIP Phone Directly to Twilio (and so much more...)
Twilio Programmable Voice SIP Domains, sometimes referred to as SIP Interfaces, allow you to place and receive voice calls using a standards based SIP endpoint by registering directly with Twilio.
Along with the ability to register directly with Twilio, you have the flexibility to choose the termination transport. This may include the traditional public switched telephone network (PSTN), another registered SIP device (often referred to as a SIP user agent [UA]), or even a Twilio Programmable Voice SDK endpoint. Connect all the things, indeed!
In this blog post we will:
- Register a SIP phone directly to Twilio
- Place and receive calls from a registered SIP phone
- Cover recommended design approaches
- Provide two different methods for delivering SIP Domain phone calls
- Discuss the benefits and current limitations using Twilio SIP Domains
Prerequisites to working with SIP Domains and Twilio
To accomplish the tasks in this blog post you will need the ...
Send SMS Notifications with CakePHP and Twilio Notify
Ever wanted to engage your app users with SMS notifications? Look no further, I have a solution for you. In this tutorial, you will learn how to use Twilio’s Notify API to send SMS notifications in a CakePHP app. Specifically, we will add SMS notifications to the user registration process.
For this tutorial you will need the following:
- A PHP 7 development environment via WAMP, LAMP, MAMP
- Global installation of Composer
- A Twilio account
- Basic knowledge of MySQL or PHPMyAdmin
Create a New App
Create a new CakePHP application with the following composer command:
$ composer self-update && composer create-project --prefer-dist cakephp/app cake-notifier
The above code will create a new folder named
cake-notifiercontaining your CakePHP app. If you navigate ...
Building Expedited Two-Factor Authentication into Angular Apps with Authy
Two-Factor Authentication (2FA) provides web applications with an important additional layer of security, but 2FA requires the user to perform an additional action each time they log in. This extra step can be wearying for users who sign into an application frequently. Is it possible to maintain the security provided by a second factor while making an application convenient for repeat visitors? It is with Angular, Node.js, and Twilio Authy.
Implementing a “remember me” checkbox on the login page is a convenient way for a user to indicate they are going to be a repeat visitor. Behind the scenes, an encrypted security cookie is a convenient mechanism for identifying a user who has previously checked the “remember me” box and logged in successfully from a specific machine.
How to Transfer Files and Data Between Angular Clients and Node.js Backends
Having a shared codebase for both the server-side and browser-side code of an Angular application aids the maintainability of a project. You can do that with Angular Universal and Node.js using the server-side rendering (SSR) concept. You can even use SSR to securely pass data, including files, between the application server (Node.js) and the Angular application running on it.
This post will show you how to create an application for uploading, storing, managing, and downloading files from a Node.js server using a single codebase. When you finish this project you’ll be able to:
- Create an Angular application
- Set up server-side rendering with Angular Universal and Node.js
- Implement file transfer operations
- Create a dynamic, in-memory list of files
To accomplish the tasks in this post you will need the ...
How to Send Bulk SMS with Twilio and Laravel PHP
There are times when you have a large number of users and you need to update or notify them simultaneously via SMS. Maybe you run a membership site or personal blog. Whatever the case this tutorial will provide an efficient and easy way to achieve sending bulk SMS via your web app.
For this tutorial we’ll assume you already know or have the following:
- A Terminal (Command Line)
- Composer installed
- Are familiar with PHP
- Are familiar with Laravel (5+)
- You have an existing Laravel (5+) project
- You have a Twilio account and your credentials ready
Just in case you don’t have a Laravel project setup, this guide will help you to create a new Laravel project locally.
Install and Configure the Twilio Laravel SDK
The first thing we need to do is install the Twilio Laravel SDK which will provide the needed functions to get our ...
Send an SMS When Your Build Fails on Travis CI
Every year just before Christmas, this tweet warning about holiday deployments resurfaces within Engineering circles. It is testament to the complications that could arise when we deploy changes to code. For this reason many companies have made the shift to Test Driven Development (TDD).
Developed by @KentBeck , TDD requires that you write tests before writing code. This guarantees that you get instant confirmation that your code behaves as it should. TDD together with Continuous Integration (CI) - the process of testing code and automating the build every time a team member commits changes to a shared repository - helps ensure that production code works as is expected.
In this tutorial, we will, using TDD, build a small Laravel/Lumen project and use Travis CI for Continuous Integration. We will also build a webhook that listens for failed build triggers. When the build fails, we will send a Twilio SMS to notify ...
Introducing Twilio Developer Evangelist Stefan Judis
It’s a Sunday morning in Berlin, and I’m standing in front of a local co-working space. With me, there’s a man in his fifties. He apologizes for leaving the free workshop I helped organize earlier. We chat about the weather, life, and Berlin. It turns out he’s a Math professor at a very well known German university. He changes the topic and starts asking me a few questions.
Why am I doing this? And how did I get here?
The professor was right — why am I doing this?
A few years back, my day job was to sit in front of large audio mixers. I was responsible for the sound of German television shows. It was a lot of fun ...
How we took Twilio Bootcamp global with WhatsApp
Bharat Murali is a Technical Lead on Twilio’s Growth Team. In his 5 years at Twilio, he has worked across multiple product stacks while also founding Twilio Bootcamp - a volunteer-led program that is now a part of Twilio’s employee onboarding experience.
Customer Empathy at Twilio
If you take a walk through the Twilio HQ in San Francisco, you may be surprised to find the occasional pair of shoes lining the walls and counters. This may seem like a peculiar taste in decor to most; but to Twilions, it serves as a constant reminder of one of our core values - to always “wear the customer's shoes”.
In Twilio’s early days as a fledgling startup, customer empathy came naturally. Employees wore multiple hats and worked directly with customers constantly - fully aware of their needs and their experience with our products. As the company grew and these roles became more ...
Building an Intelligent Coffee Order System with Twilio Autopilot
Wouldn't it be great if you could save daily a few, maybe awkward, interactions with other humans and let bots take care of it instead? However, often these bots are not too intelligent when it comes to interacting with you. In this blog post we'll learn how we can build a smarter SMS bot in just a few minutes.
In a previous blog post we talked about how we love to serve coffee at conferences and other events "Twilio-Style" by allowing attendees to order their coffee via SMS. If you haven't read the blog post, make sure to check out Serving Coffee with Twilio Programmable SMS and React. Unfortunately we had a fairly rudimentary way of handling the orders. Until now.
Let's see how we can upgrade this existing project using Twilio Autopilot to be truly intelligent.
If you would prefer to see how this works by watching a video ...