{"id":19798,"date":"2026-11-19T01:49:13","date_gmt":"2026-11-18T20:19:13","guid":{"rendered":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/"},"modified":"2026-11-19T02:03:38","modified_gmt":"2026-11-18T20:33:38","slug":"iot-sms-alerts-esp32","status":"publish","type":"post","link":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/","title":{"rendered":"Send SMS alerts from ESP32, Arduino or Raspberry Pi with the Fast2SMS API"},"content":{"rendered":"<p>You can send SMS alerts from an ESP32, a Wi-Fi Arduino board or a Raspberry Pi with one HTTPS request to the Fast2SMS DLT SMS API. The device reads a sensor, and when a value crosses your limit it calls the API with your approved DLT template. Two things decide whether this works well: the message must use a <strong>DLT template<\/strong> approved for your business, and your <strong>API key must never sit in code you share<\/strong>.<\/p>\n<p>This guide is for makers and small teams building tank-level, temperature, power-cut or door alerts. It covers the DLT set-up, safe ways to store the key, and working code for ESP32 and Raspberry Pi.<\/p>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Send alerts from your device<\/strong><p>Create a Fast2SMS account, add your DLT alert template and send SMS from any device that can make an HTTPS request.<\/p><\/div><div class=\"f2s-cta__actions\"><a class=\"f2s-cta__btn f2s-cta__btn--primary\" href=\"https:\/\/www.fast2sms.com\/\"><span>Sign up free<\/span> <span class=\"f2sh-btn__arrow\" aria-hidden=\"true\">&rarr;<\/span><\/a><a class=\"f2s-cta__btn f2s-cta__btn--ghost\" href=\"https:\/\/www.fast2sms.com\/meet\/\" target=\"_blank\" rel=\"noopener\">Book a free meeting<\/a><\/div><\/aside>\n<h2>Before you start<\/h2>\n<ul>\n<li>A Fast2SMS account with wallet balance.<\/li>\n<li>DLT registration, an approved sender ID and an approved alert template, added in <strong>DLT Manager<\/strong>. An alert like &#8220;Alert from Demo Traders: {#var#} reading is {#var#}. Please check. &#8211; Demo Traders&#8221; fits a <a href=\"\/help\/dlt-template-types-transactional-service-promotional\/\">Service Implicit<\/a> (transactional) template, so it also reaches <a href=\"\/help\/dnd-numbers-sms-delivery\/\">DND<\/a> numbers.<\/li>\n<li>The template&#8217;s <strong>Message ID<\/strong> from its card in <strong>DLT Manager<\/strong> &gt; <strong>Content Template<\/strong>. The API uses this number, not the 19-digit DLT Template ID.<\/li>\n<li>Your API key from <strong>API Key<\/strong> in the panel.<\/li>\n<li>A board with internet: ESP32, ESP8266, an Arduino board with Wi-Fi, or a Raspberry Pi. A plain Arduino Uno has no network of its own.<\/li>\n<\/ul>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/sms-dlt-template-sample-code-hd-10-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"Sample Code popup for a DLT template showing a cURL request with sender_id, message, route=dlt, numbers and variables_values\"><figcaption>The Sample Code button on a template card shows the exact request for that template.<\/figcaption><\/figure>\n<h2>Keep the API key off shared code<\/h2>\n<p>Your API key can send any of your approved templates and spend your wallet balance. Anyone who sees it can use it. Devices and their code get shared a lot: GitHub repositories, forum posts, a board given to a friend. Pick one of these two set-ups.<\/p>\n<div class=\"f2s-facts\">\n<table>\n<thead>\n<tr>\n<th>Set-up<\/th>\n<th>Where the key lives<\/th>\n<th>Good for<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Relay (recommended)<\/td>\n<td>On your own server. The device calls your server with its own device token, and the server calls Fast2SMS.<\/td>\n<td>Many devices, devices at customer sites, any code you publish<\/td>\n<\/tr>\n<tr>\n<td>Direct<\/td>\n<td>In a separate secrets file on the device that is never committed or shared<\/td>\n<td>One or two devices you own and keep with you<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<ul>\n<li>Never paste the key into the main sketch or script. Keep it in <code>secrets.h<\/code>, an environment variable or a config file listed in <code>.gitignore<\/code>.<\/li>\n<li>If the key may have leaked, open <strong>API Key<\/strong> and click <strong>Reset<\/strong>. The old key stops working at once, and you confirm with an OTP.<\/li>\n<li>With a relay server on a fixed public IP, turn on <strong>API Security<\/strong> and whitelist only that IP. Calls from any other IP then fail with <a href=\"\/help\/error-414-ip-blacklisted\/\">error 414<\/a>. This does not suit devices on home or mobile internet whose public IP changes.<\/li>\n<\/ul>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-hd-33-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"API Key page with the masked Authorization Key, View and Reset buttons and the API Access switch\"><figcaption>Reset the key here if it was ever shared by mistake.<\/figcaption><\/figure>\n<h2>ESP32 code (Arduino IDE)<\/h2>\n<ol class=\"f2s-steps\">\n<li>\n<h3>Create secrets.h<\/h3>\n<p>Add a tab named <code>secrets.h<\/code> and list it in <code>.gitignore<\/code>. For HTTPS, paste the root certificate of www.fast2sms.com in PEM format. You can export it from your browser: open the site, view the certificate, select the top certificate in the chain and export it as Base-64. Update it if requests later fail with a TLS error.<\/p>\n<pre><code class=\"language-cpp\">\/\/ secrets.h - keep this file out of git and never share it\n#define WIFI_SSID   \"your-wifi-name\"\n#define WIFI_PASS   \"your-wifi-password\"\n#define F2S_API_KEY \"YOUR_API_KEY\"\nstatic const char F2S_ROOT_CA[] =\n\"-----BEGIN CERTIFICATE-----\\n\"\n\"...paste the root certificate here...\\n\"\n\"-----END CERTIFICATE-----\\n\";<\/code><\/pre>\n<\/li>\n<li>\n<h3>Add the sketch<\/h3>\n<p>This sketch reads an analog sensor every 5 seconds. When the value is above the limit, it sends one SMS and then waits at least 15 minutes before it tries again, so a stuck sensor cannot drain your wallet.<\/p>\n<pre><code class=\"language-cpp\">#include &lt;WiFi.h&gt;\n#include &lt;WiFiClientSecure.h&gt;\n#include &lt;HTTPClient.h&gt;\n#include \"secrets.h\"\n\nconst int SENSOR_PIN = 34;                           \/\/ analog input\nconst int ALERT_LEVEL = 3000;                        \/\/ your limit\nconst unsigned long GAP_MS = 15UL * 60UL * 1000UL;   \/\/ one SMS per 15 minutes at most\nunsigned long lastTry = 0;\nbool triedOnce = false;\n\nbool online() { return WiFi.status() == WL_CONNECTED; }\n\nbool sendSmsAlert(int reading) {\n  WiFiClientSecure client;\n  client.setCACert(F2S_ROOT_CA);\n  HTTPClient https;\n  if (https.begin(client, \"https:\/\/www.fast2sms.com\/dev\/bulkV2\") == false) return false;\n  https.addHeader(\"authorization\", F2S_API_KEY);\n  https.addHeader(\"Content-Type\", \"application\/json\");\n  char body[256];\n  snprintf(body, sizeof(body),\n    \"{\\\"route\\\":\\\"dlt\\\",\\\"sender_id\\\":\\\"FSTSMS\\\",\\\"message\\\":\\\"111111\\\",\"\n    \"\\\"variables_values\\\":\\\"Tank 1|%d\\\",\\\"numbers\\\":\\\"9999999999\\\"}\", reading);\n  int code = https.POST((uint8_t*)body, strlen(body));\n  String resp = https.getString();\n  https.end();\n  Serial.printf(\"HTTP %d %s\\n\", code, resp.c_str());\n  return code == 200 &amp;&amp; resp.indexOf(\"\\\"return\\\":true\") &gt;= 0;\n}\n\nvoid setup() {\n  Serial.begin(115200);\n  WiFi.begin(WIFI_SSID, WIFI_PASS);\n  while (online() == false) delay(500);\n}\n\nvoid loop() {\n  int reading = analogRead(SENSOR_PIN);\n  bool gapOver = (triedOnce == false) || (millis() - lastTry &gt; GAP_MS);\n  if (reading &gt; ALERT_LEVEL &amp;&amp; gapOver &amp;&amp; online()) {\n    lastTry = millis();\n    triedOnce = true;\n    sendSmsAlert(reading);\n  }\n  delay(5000);\n}<\/code><\/pre>\n<p>Replace <code>FSTSMS<\/code> with your approved sender ID (exact case), <code>111111<\/code> with your template&#8217;s Message ID and <code>9999999999<\/code> with the numbers to alert, separated by commas. The values in <code>variables_values<\/code> fill the template&#8217;s variables in order, separated by <code>|<\/code>, and each value is cut to 40 characters.<\/p>\n<\/li>\n<li>\n<h3>Check the first send<\/h3>\n<p>Open the Serial Monitor. A successful call returns <code>\"return\":true<\/code> with a request ID. Then open <strong>API Logs<\/strong> in the panel to see the request and its result, and <strong>Delivery Report<\/strong> to see delivery.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-logs-hd-10-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"API Logs list with BULKV2 requests, HTTP codes, IP addresses and Success or Failed status\"><figcaption>Every API call from your device appears in API Logs with its IP.<\/figcaption><\/figure>\n<\/li>\n<\/ol>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Get your alert template ready<\/strong><p>Add your DLT alert template in Fast2SMS DLT Manager and copy its Message ID and sample code.<\/p><\/div><div class=\"f2s-cta__actions\"><a class=\"f2s-cta__btn f2s-cta__btn--primary\" href=\"https:\/\/www.fast2sms.com\/\"><span>Sign up free<\/span> <span class=\"f2sh-btn__arrow\" aria-hidden=\"true\">&rarr;<\/span><\/a><a class=\"f2s-cta__btn f2s-cta__btn--ghost\" href=\"https:\/\/www.fast2sms.com\/meet\/\" target=\"_blank\" rel=\"noopener\">Book a free meeting<\/a><\/div><\/aside>\n<h2>Raspberry Pi code (Python)<\/h2>\n<p>On a Raspberry Pi, keep the key in an environment variable, for example in the systemd service file that runs your script, not in the script itself.<\/p>\n<pre><code class=\"language-python\">import os, time, requests\n\nAPI_KEY = os.environ[\"F2S_API_KEY\"]\nGAP = 15 * 60          # one SMS per 15 minutes at most\nlast_try = 0\n\ndef read_sensor():\n    return 0           # replace with your sensor reading\n\ndef send_alert(value):\n    r = requests.post(\n        \"https:\/\/www.fast2sms.com\/dev\/bulkV2\",\n        headers={\"authorization\": API_KEY},\n        json={\"route\": \"dlt\", \"sender_id\": \"FSTSMS\", \"message\": \"111111\",\n              \"variables_values\": f\"Tank 1|{value}\", \"numbers\": \"9999999999\"},\n        timeout=15,\n    )\n    data = r.json()\n    print(r.status_code, data)\n    return data.get(\"return\") is True\n\nwhile True:\n    value = read_sensor()\n    if value &gt; 3000 and time.time() - last_try &gt; GAP:\n        last_try = time.time()\n        send_alert(value)\n    time.sleep(5)<\/code><\/pre>\n<h2>Relay server example<\/h2>\n<p>For devices you do not fully control, let them call your server instead. This small Flask app checks a device token and then calls Fast2SMS with the key that stays on the server.<\/p>\n<pre><code class=\"language-python\">import os, hmac, requests\nfrom flask import Flask, request, abort\n\napp = Flask(__name__)\nF2S_KEY = os.environ[\"F2S_API_KEY\"]\nDEVICE_TOKEN = os.environ[\"DEVICE_TOKEN\"]\n\n@app.post(\"\/alert\")\ndef alert():\n    token = request.headers.get(\"X-Device-Token\", \"\")\n    if not hmac.compare_digest(token, DEVICE_TOKEN):\n        abort(401)\n    reading = str(request.json.get(\"reading\", \"\")).replace(\"|\", \"\")[:40]\n    r = requests.post(\n        \"https:\/\/www.fast2sms.com\/dev\/bulkV2\",\n        headers={\"authorization\": F2S_KEY},\n        json={\"route\": \"dlt\", \"sender_id\": \"FSTSMS\", \"message\": \"111111\",\n              \"variables_values\": f\"Tank 1|{reading}\", \"numbers\": \"9999999999\"},\n        timeout=15,\n    )\n    return r.json(), r.status_code<\/code><\/pre>\n<p>The numbers to alert are fixed on the server, so a stolen device token can only trigger your own alert to your own numbers.<\/p>\n<h2>Common problems and fixes<\/h2>\n<div class=\"f2s-facts\">\n<table>\n<thead>\n<tr>\n<th>Response or symptom<\/th>\n<th>Cause<\/th>\n<th>Fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>status_code 412, Invalid Authentication<\/td>\n<td>Wrong or reset API key<\/td>\n<td>Copy the current key from API Key into your secrets file<\/td>\n<\/tr>\n<tr>\n<td>status_code 414, IP is blacklisted<\/td>\n<td>API Security is on and the device IP is not whitelisted<\/td>\n<td>Whitelist the IP, or send through a relay with a fixed IP<\/td>\n<\/tr>\n<tr>\n<td>status_code 406, Invalid Sender ID<\/td>\n<td>Sender ID not approved or wrong case<\/td>\n<td>Use the sender exactly as in <a href=\"\/help\/dlt-manager-entity-sender-template-guide\/\">DLT Manager<\/a><\/td>\n<\/tr>\n<tr>\n<td>status_code 424, Invalid Message ID<\/td>\n<td>You used the DLT Template ID, or the template is not linked to that sender<\/td>\n<td>Use the Message ID from the template card<\/td>\n<\/tr>\n<tr>\n<td>HTTP 200 but &#8220;return&#8221;: false<\/td>\n<td>Usually low wallet balance (status_code 416)<\/td>\n<td>Always check &#8220;return&#8221;, not only the HTTP code<\/td>\n<\/tr>\n<tr>\n<td>Dozens of SMS in a few minutes<\/td>\n<td>No cooldown, or the device retries on every loop<\/td>\n<td>Keep a minimum gap between alerts, as in the code above<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<section class=\"f2s-faq\">\n<h2>Frequently asked questions<\/h2>\n<h3>Can an ESP32 send SMS without a GSM module?<\/h3>\n<p>Yes. Over Wi-Fi, the ESP32 calls the Fast2SMS API over HTTPS and Fast2SMS delivers the SMS. No SIM or <a href=\"\/help\/gsm7-character-set-table\/\">GSM<\/a> module is needed on the board.<\/p>\n<h3>Do I need DLT to send IoT alerts?<\/h3>\n<p>Yes for the DLT SMS API. The alert text must match a template approved on DLT and added in DLT Manager, sent from your approved sender ID.<\/p>\n<h3>Is it safe to keep the API key on the ESP32?<\/h3>\n<p>Only for a device you own and never share, with the key in a separate secrets file. For anything else, use a relay server so the key stays off the device.<\/p>\n<h3>Can I send to more than one number?<\/h3>\n<p>Yes. Put several 10-digit numbers in the numbers field, separated by commas.<\/p>\n<h3>Can I use GET instead of POST?<\/h3>\n<p>Yes, the API accepts both. Keep the key in the authorization header, not in the URL, because URLs end up in logs.<\/p>\n<h3>How do I stop repeated alerts from one fault?<\/h3>\n<p>Add a cooldown, like the 15-minute gap in the examples, and send a second alert only when the value goes back to normal and crosses the limit again.<\/p>\n<\/section>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Build your first SMS alert<\/strong><p>Sign up for Fast2SMS, get your API key and send your first device alert today.<\/p><\/div><div class=\"f2s-cta__actions\"><a class=\"f2s-cta__btn f2s-cta__btn--primary\" href=\"https:\/\/www.fast2sms.com\/\"><span>Sign up free<\/span> <span class=\"f2sh-btn__arrow\" aria-hidden=\"true\">&rarr;<\/span><\/a><a class=\"f2s-cta__btn f2s-cta__btn--ghost\" href=\"https:\/\/www.fast2sms.com\/meet\/\" target=\"_blank\" rel=\"noopener\">Book a free meeting<\/a><\/div><\/aside>\n<h2>Related guides<\/h2>\n<ul>\n<li><a href=\"\/help\/dlt-sms-api-guide\/\">Fast2SMS DLT SMS API: send SMS with your DLT template (route=dlt)<\/a><\/li>\n<li><a href=\"\/help\/python-sms-api\/\">Send SMS and OTP in Python with Fast2SMS API<\/a><\/li>\n<li><a href=\"\/help\/api-security-ip-whitelist\/\">API security and IP whitelist<\/a><\/li>\n<li><a href=\"\/help\/api-key-find-reset\/\">Find or reset your API key<\/a><\/li>\n<li><a href=\"\/help\/avoid-duplicate-sms-api-retries\/\">Avoid duplicate SMS and OTPs with the Fast2SMS API<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>You can send SMS alerts from an ESP32, a Wi-Fi Arduino board or a Raspberry Pi with one HTTPS request to the Fast2SMS DLT SMS API. The device reads a sensor, and when a value crosses your limit it calls the API with your approved DLT template. Two things decide whether this works well: the [&hellip;]<\/p>\n","protected":false},"featured_media":19627,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,13],"tags":[],"class_list":["post-19798","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-api","category-bulk-sms"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ESP32, Arduino and Raspberry Pi SMS Alerts | Fast2SMS<\/title>\n<meta name=\"description\" content=\"Send SMS alerts from an ESP32, Wi-Fi Arduino or Raspberry Pi with the Fast2SMS DLT SMS API. DLT template set-up, safe API key storage and working code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ESP32, Arduino and Raspberry Pi SMS Alerts | Fast2SMS\" \/>\n<meta property=\"og:description\" content=\"Send SMS alerts from an ESP32, Wi-Fi Arduino or Raspberry Pi with the Fast2SMS DLT SMS API. DLT template set-up, safe API key storage and working code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/\" \/>\n<meta property=\"og:site_name\" content=\"Fast2SMS\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Fast2SMS\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-18T20:19:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-18T20:33:38+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/sms-dlt-template-sample-code-hd-10-scaled.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fast2sms\" \/>\n<meta name=\"twitter:site\" content=\"@fast2sms\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/iot-sms-alerts-esp32\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/iot-sms-alerts-esp32\\\/\"},\"author\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"headline\":\"Send SMS alerts from ESP32, Arduino or Raspberry Pi with the Fast2SMS API\",\"datePublished\":\"2026-11-18T20:19:13+00:00\",\"dateModified\":\"2026-11-18T20:33:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/iot-sms-alerts-esp32\\\/\"},\"wordCount\":1240,\"publisher\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/iot-sms-alerts-esp32\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/sms-dlt-template-sample-code-hd-10-scaled.webp\",\"articleSection\":[\"API\",\"Bulk SMS\"],\"inLanguage\":\"en-IN\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/iot-sms-alerts-esp32\\\/\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/iot-sms-alerts-esp32\\\/\",\"name\":\"ESP32, Arduino and Raspberry Pi SMS Alerts | Fast2SMS\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/iot-sms-alerts-esp32\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/iot-sms-alerts-esp32\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/sms-dlt-template-sample-code-hd-10-scaled.webp\",\"datePublished\":\"2026-11-18T20:19:13+00:00\",\"dateModified\":\"2026-11-18T20:33:38+00:00\",\"description\":\"Send SMS alerts from an ESP32, Wi-Fi Arduino or Raspberry Pi with the Fast2SMS DLT SMS API. DLT template set-up, safe API key storage and working code.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/iot-sms-alerts-esp32\\\/#breadcrumb\"},\"inLanguage\":\"en-IN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/iot-sms-alerts-esp32\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-IN\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/iot-sms-alerts-esp32\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/sms-dlt-template-sample-code-hd-10-scaled.webp\",\"contentUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/sms-dlt-template-sample-code-hd-10-scaled.webp\",\"width\":2560,\"height\":1600,\"caption\":\"Sample Code popup in DLT Manager with a cURL request to dev\\\/bulkV2 using sender_id, message, route, numbers and variables_values\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/iot-sms-alerts-esp32\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API\",\"item\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/api\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Send SMS alerts from ESP32, Arduino or Raspberry Pi with the Fast2SMS API\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/#website\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/\",\"name\":\"Fast2SMS\",\"description\":\"Help\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"inLanguage\":\"en-IN\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\",\"name\":\"Fast2SMS\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#logo\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/Fast2SMS.png\",\"contentUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/Fast2SMS.png\",\"caption\":\"Fast2SMS\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#logo\"},\"email\":\"support@fast2sms.com\",\"telephone\":\"+91-6262778822\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Fast2SMS\",\"https:\\\/\\\/www.instagram.com\\\/fast2sms\",\"https:\\\/\\\/x.com\\\/fast2sms\",\"https:\\\/\\\/www.youtube.com\\\/Fast2SMSofficial\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/fast2sms\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ESP32, Arduino and Raspberry Pi SMS Alerts | Fast2SMS","description":"Send SMS alerts from an ESP32, Wi-Fi Arduino or Raspberry Pi with the Fast2SMS DLT SMS API. DLT template set-up, safe API key storage and working code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/","og_locale":"en_US","og_type":"article","og_title":"ESP32, Arduino and Raspberry Pi SMS Alerts | Fast2SMS","og_description":"Send SMS alerts from an ESP32, Wi-Fi Arduino or Raspberry Pi with the Fast2SMS DLT SMS API. DLT template set-up, safe API key storage and working code.","og_url":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/","og_site_name":"Fast2SMS","article_publisher":"https:\/\/www.facebook.com\/Fast2SMS\/","article_published_time":"2026-11-18T20:19:13+00:00","article_modified_time":"2026-11-18T20:33:38+00:00","og_image":[{"width":2560,"height":1600,"url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/sms-dlt-template-sample-code-hd-10-scaled.webp","type":"image\/webp"}],"twitter_card":"summary_large_image","twitter_creator":"@fast2sms","twitter_site":"@fast2sms","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/#article","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/"},"author":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"headline":"Send SMS alerts from ESP32, Arduino or Raspberry Pi with the Fast2SMS API","datePublished":"2026-11-18T20:19:13+00:00","dateModified":"2026-11-18T20:33:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/"},"wordCount":1240,"publisher":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/sms-dlt-template-sample-code-hd-10-scaled.webp","articleSection":["API","Bulk SMS"],"inLanguage":"en-IN"},{"@type":"WebPage","@id":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/","url":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/","name":"ESP32, Arduino and Raspberry Pi SMS Alerts | Fast2SMS","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/#primaryimage"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/sms-dlt-template-sample-code-hd-10-scaled.webp","datePublished":"2026-11-18T20:19:13+00:00","dateModified":"2026-11-18T20:33:38+00:00","description":"Send SMS alerts from an ESP32, Wi-Fi Arduino or Raspberry Pi with the Fast2SMS DLT SMS API. DLT template set-up, safe API key storage and working code.","breadcrumb":{"@id":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/#breadcrumb"},"inLanguage":"en-IN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/"]}]},{"@type":"ImageObject","inLanguage":"en-IN","@id":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/#primaryimage","url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/sms-dlt-template-sample-code-hd-10-scaled.webp","contentUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/sms-dlt-template-sample-code-hd-10-scaled.webp","width":2560,"height":1600,"caption":"Sample Code popup in DLT Manager with a cURL request to dev\/bulkV2 using sender_id, message, route, numbers and variables_values"},{"@type":"BreadcrumbList","@id":"https:\/\/www.fast2sms.com\/help\/iot-sms-alerts-esp32\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.fast2sms.com\/help\/"},{"@type":"ListItem","position":2,"name":"API","item":"https:\/\/www.fast2sms.com\/help\/api\/"},{"@type":"ListItem","position":3,"name":"Send SMS alerts from ESP32, Arduino or Raspberry Pi with the Fast2SMS API"}]},{"@type":"WebSite","@id":"https:\/\/www.fast2sms.com\/help\/#website","url":"https:\/\/www.fast2sms.com\/help\/","name":"Fast2SMS","description":"Help","publisher":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"inLanguage":"en-IN"},{"@type":"Organization","@id":"https:\/\/www.fast2sms.com\/#organization","name":"Fast2SMS","url":"https:\/\/www.fast2sms.com\/","logo":{"@type":"ImageObject","@id":"https:\/\/www.fast2sms.com\/#logo","url":"https:\/\/www.fast2sms.com\/Fast2SMS.png","contentUrl":"https:\/\/www.fast2sms.com\/Fast2SMS.png","caption":"Fast2SMS"},"image":{"@id":"https:\/\/www.fast2sms.com\/#logo"},"email":"support@fast2sms.com","telephone":"+91-6262778822","sameAs":["https:\/\/www.facebook.com\/Fast2SMS","https:\/\/www.instagram.com\/fast2sms","https:\/\/x.com\/fast2sms","https:\/\/www.youtube.com\/Fast2SMSofficial","https:\/\/www.linkedin.com\/company\/fast2sms"]}]}},"_links":{"self":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/19798","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/comments?post=19798"}],"version-history":[{"count":1,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/19798\/revisions"}],"predecessor-version":[{"id":20019,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/19798\/revisions\/20019"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media\/19627"}],"wp:attachment":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media?parent=19798"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/categories?post=19798"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/tags?post=19798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}