Loading latest posts


Jerywin Bayawan
I use Semaphore for SMS in most of my projects. SMS integration gives an application a way to send short updates to users without requiring them to keep the application open.
This article explains what Semaphore does and where SMS can be useful. The examples below are possible use cases, rather than a record of features I have implemented or my specific reasons for selecting the provider.
Semaphore is an SMS gateway with an API that applications can use to send text messages to Philippine mobile numbers. Its documentation describes submitting messages with an API key, recipient number, and message text, then retrieving message information afterward. Source: Semaphore API documentation
In practical terms, an application decides when a notification is needed, and the SMS integration handles submitting that message to the provider. The application's own business rules still determine who should receive it and what it should say.
SMS can bring a short, relevant update outside the application. A user does not need to be signed in to read a standard text message, although mobile service and delivery conditions still matter.
That makes SMS useful as an additional communication channel alongside email and in-app notifications. It works best when the message answers a simple question: What happened, what is coming up, or what should I do next?
A notification should contain enough context to be useful without exposing sensitive information on someone's lock screen.
Here are possible examples, not claims about my completed projects:
For example, a pickup notification could say: "Your order is ready for pickup. Please check your account for the collection details."
The value is the connection between a meaningful application event and a clear next step for the user.
The API key should remain on the backend. Store it in server-side environment configuration or a secret manager, never in frontend JavaScript, a mobile application bundle, or a public repository.
A secure integration should also:
Hiding the key alone is insufficient if an unprotected backend endpoint allows anyone to send messages through it.
Application-level rate limiting helps control repeated sends, accidental loops, and abuse. Limits can apply per account, recipient, and action, with an overall sending cap where appropriate.
These controls are separate from provider limits. Semaphore documents endpoint-specific request limits and rate-limit response headers, so integrations should follow the current limits for the endpoints they use. Source: Semaphore API documentation
For background processing, a queue can help manage bursts. Retries should be bounded and account for duplicate-send risks: a timeout does not necessarily mean the original message was never accepted.
No. An accepted API request is not proof that a message reached the recipient's phone or was read.
Semaphore documents stages including Queued, Pending, and Sent. Crucially, its documentation defines Sent as delivery to the network. That should not be presented as confirmation of handset delivery or user acknowledgment. Source: Semaphore message status documentation
An application should retain the provider's message identifier, check subsequent status when needed, and display labels that accurately reflect the available evidence. For an important workflow, explicit user acknowledgment may still be necessary.
Yes. An application's scheduler or background worker can identify eligible reminders and submit messages. It should recheck the underlying record before sending so that cancelled appointments or completed actions do not trigger outdated reminders.
No. Reserve SMS for relevant updates, respect communication preferences, and avoid sending several messages about the same event. Routine detail can remain in the application.
SMS can complement them. Short alerts suit text messages, while longer explanations, documents, and detailed account information usually belong in another channel.
Keep sensitive details out of message bodies. Direct users to an authenticated page when they need to view private information, and never treat possession of a link alone as authorization to access an account.
My use of Semaphore is one part of the broader topic: connecting application events to useful communication. The practical value of SMS depends on relevant messages, appropriate timing, protected credentials, and honest delivery reporting.
For a project considering SMS, a useful starting question is: Which update would help the user most when they are away from the application?
Keep exploring
No related items yet.