← back to Butlr
sms: friendly GET handler on /twilio/sms-inbound (was 404 in browser)
6db47670d6daf3ec22355f377f0cadf4e7e17b26 · 2026-05-13 12:34:51 -0700 · SteveStudio2
Files touched
M routes/twilio-webhooks.js
Diff
commit 6db47670d6daf3ec22355f377f0cadf4e7e17b26
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date: Wed May 13 12:34:51 2026 -0700
sms: friendly GET handler on /twilio/sms-inbound (was 404 in browser)
---
routes/twilio-webhooks.js | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/routes/twilio-webhooks.js b/routes/twilio-webhooks.js
index 42d0822..bfee015 100644
--- a/routes/twilio-webhooks.js
+++ b/routes/twilio-webhooks.js
@@ -577,6 +577,23 @@ router.all('/voice-default', (req, res) => {
//
// Configure on Twilio side: Messaging Service → A message comes in →
// Webhook → https://butlr.agentabrams.com/twilio/sms-inbound
+
+// GET handler — friendly response when Steve (or anyone) opens the URL
+// in a browser to verify it's wired. Twilio uses POST; this just confirms
+// the route is mounted + alive.
+router.get('/sms-inbound', (req, res) => {
+ res.type('text/plain').send(
+ 'Butlr SMS inbound webhook (POST-only).\n\n' +
+ 'This URL is intended for Twilio Messaging Service inbound webhooks.\n' +
+ 'Configure in Twilio Console → Messaging Service → A message comes in → Webhook:\n' +
+ ' https://butlr.agentabrams.com/twilio/sms-inbound (HTTP POST)\n\n' +
+ 'When a customer texts STOP / UNSUBSCRIBE / CANCEL / END / QUIT, the\n' +
+ 'sender is auto-added to internal DNC suppression (see /admin/dnc).\n' +
+ 'START / UNSTOP re-opts them in.\n\n' +
+ 'Status: OK (route alive, POST handler ready).\n'
+ );
+});
+
router.post('/sms-inbound', express.urlencoded({ extended: true }), (req, res) => {
const from = String((req.body && req.body.From) || '').trim();
const bodyRaw = String((req.body && req.body.Body) || '').trim();
← 4e0a5bc sms: /twilio/sms-inbound STOP-keyword auto-suppression (TCPA
·
back to Butlr
·
admin: /admin/status — live health snapshot UI 03e71d2 →