AI disclosure: this article was written with the help of AI and checked by a human before publishing.

Sending SMS gets all the attention. Receiving it is where apps get into trouble. The moment you send marketing or notification texts, people reply, and some of those replies are legal instructions: STOP means stop. Here is how I build the inbound side so it is correct from day one. (Related: Simple considerations for simple people building fancy ...)

When someone texts your number, the carrier hands the message to your provider, and your provider makes an HTTP POST to a webhook URL you set on the number. The body usually carries the sender in E.164, your number, the text, a message ID and a timestamp.

Rules differ by country, but these words are treated as opt-out or help requests almost everywhere I have shipped:.

In a recent development, match on the whole message after trimming and upper-casing. "Stop " with a trailing space is still STOP. "Please stop texting me" should also be treated as an opt-out by a sensible app, even if no rule forces you to.

How do you handle replies that are not keywords, such as "who is this?".

β†’ Read original article