The short answer (for developers): there are two usual ways for an application to hand SMS to a provider. With an HTTP API, your code makes one web request per send, with an API key, and gets back a message ID; the status arrives later by callback (a webhook to a URL of yours) or by asking. With SMPP (Short Message Peer-to-Peer), your program opens a TCP connection that stays open, logs in once (the bind) and sends and receives binary packets over that same connection: it is the protocol SMS centres (SMSC) and aggregators speak to each other. For most websites the HTTP API is enough. SMPP pays off when the provider offers it and the application sends all the time, needs replies on the same channel, or wants to switch providers without rewriting the integration.
The differences that matter
| Aspect |
HTTP API |
SMPP |
| How it connects |
One HTTPS request per send; nothing stays open in between. |
A TCP connection that stays open for hours; you log in once (bind). |
| Where it can run |
Anywhere that can make outgoing HTTPS requests: shared hosting, a VPS, cloud functions. |
In a program that is always running: a VPS or server, as a service. |
| Format |
JSON or form fields, different for every provider. |
Standard packets (PDUs): submit_sm, deliver_sm and others. Version 3.4 is the most widespread. |
| Delivery reports |
A callback to a URL of yours, or a provider endpoint you query. |
A deliver_sm on the same connection, with the receipt inside. |
| Replies from recipients |
A webhook to your URL, if the provider supports it. |
A deliver_sm on a receiving bind (receiver or transceiver). |
| Switching provider |
Rewrite the integration. |
Mostly change host, port, credentials and a few parameters. |
| Effort |
Low: cURL and a few lines. |
Higher: connection state, windows, reconnects, encodings. |
How to choose and where to start
| 1 |
Ask the provider first what it offers. Many only have an HTTP API; others have both. An SMPP account usually needs the provider to allow your server IP and, sometimes, a separate agreement.
|
|
| 2 |
If you send from a website (sign-up codes, order notices, reminders), pick the HTTP API: from PHP it is a cURL request, as in calling a web API with cURL.
|
|
| 3 |
Pick SMPP if you send continuously and the provider recommends it, if you want replies and receipts without exposing a public URL, or if you want to move between several providers that speak SMPP.
|
|
| 6 |
Test with your own number first, with and without accents in the text, before sending to customers: GSM-7 or Unicode.
|
|
|
Never call the SMS provider from the browser (JavaScript). The API key would be visible to every visitor, and anyone could send SMS at your expense. Sending always starts on your server.
|
|
An open-source gateway can sit in the middle. Programs such as Kannel or Jasmin hold the SMPP connection to the provider and give your application a simple HTTP interface. Useful when you want SMPP without writing the protocol handling, but it is one more service to look after on the VPS.
|
|
Need help preparing the VPS that will hold the connection to your SMS provider? The SMS account is with the provider; the server we can look at with you.
Open a support ticket
|
In our plans
An SMPP client is a program that stays running and keeps one connection open, so it needs a server of its own, not shared hosting. Our VPS plans run on KVM with full SSH access, so you can install the client and keep it running as a service. A client that only holds a connection and sends messages is light, so VPS1 (1 vCPU, 2 GB RAM, 40 GB NVMe) is a reasonable start; size up if your volume or the rest of the application needs it, up to VPS6 (32 vCPU, 64 GB).
We do not state here whether a given outbound port is open. Test it from the VPS: try to connect to the provider's SMPP host and port (for example with nc -vz). If it does not answer and the provider says it should, open a ticket with the host, the port and the result.
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from ₦9.900,00/mo (3-year plan, with coupon) See plans |