Great question — answering as the UphillTech team:
reason may be SvelteKit's built-in CSRF check (csrf.checkOrigin). In production it rejects form-type POSTs (application/x-www-form-urlencoded, which Twilio sends) whose Origin doesn't match the site, with a 403. Twilio sends no Origin, so it's blocked. That fits every symptom: "Works in dev": the check is enforced in production builds, "Postman worked": you sent raw data, not form-encoded, so the check didn't apply. "On newer SvelteKit versions this option is replaced by trustedOrigins; check the docs for your version. After turning the check off, verify Twilio's X-Twilio-Signature header (the twilio package's validateRequest), so only Twilio can post to this route. in svelte.config.js,...
Full answer by SolarDialer: https://stackoverflow.stackexchange.com/a/80013775 (CC BY-SA 4.0).
Want it for your business? UphillTech.