
Nonetheless, at the time of writing, I found this library that hides these details from us. This means that we are going to build the HTTP request ourselves (which is very simple, as we will see below). Please note that we are not going to be using any Twilio library to take care of the HTTP details. Here, for simplicity, we will use a method from the Arduino core that only receives the username and password and takes care of the details. In the mentioned tutorial we build the header ourselves, which gives a more detailed view of what is done under the hood.
Twilio send sms http post how to#
Adding Basic Authentication to a HTTP request: Explains how to add basic authentication when performing a HTTP request from the ESP32.Although, for simplicity, we are not going to use any certificate in our code, it is a good ideia to provide one in a real scenario, due to security reasons. Sending HTTPS Requests: Covers how to perform HTTP S requests from the ESP32 and how to provide a CA certificate.Sending HTTP POST Requests: Explains the basics on how to perform HTTP POST requests from the ESP32, such as initializing the request, adding headers and doing the actual request.You can check the SMS API documentation here.Īlthough the code section details most of the steps we will be doing to be able to reach Twilio’s API and send the SMS, you may consult these previous ESP32 posts for more details about some parts of the code: We are assuming the usage of the trial account for this tutorial. Although being a paid service, Twilio offers a trial account that we can use to do some testing of the features its platform offers. Twilio is a Cloud communications Platform as a Service company that, among many other features, offers an API that allows to programmatically send SMS.

In this tutorial we are going to learn how to use Twilio’s API to send a SMS from the ESP32, using the Arduino core.
