For high, sustained throughput, bind over SMPP instead of the REST API. Here is how SMPP works with eSMS Africa.
import smpplib.client, smpplib.gsm
client = smpplib.client.Client("smpp.esmsafrica.io", 2775)
client.connect()
client.bind_transceiver(system_id="YOUR_ID", password="YOUR_PASSWORD")
parts, enc, _ = smpplib.gsm.make_parts("Hello over SMPP")
for part in parts:
client.send_message(
source_addr="MyBrand",
destination_addr="254712345678",
short_message=part,
data_coding=enc,
registered_delivery=True, # ask for a DLR
)Ask eSMS Africa for an SMPP bind. We provision a username, password, host and port, allow-list your IP and size the throughput (TPS) to your volume.
Bind as a transmitter (send only), receiver (receive DLRs / inbound) or transceiver (both) over SMPP 3.4.
Using a library such as smpplib:
import smpplib.client, smpplib.gsm
client = smpplib.client.Client("smpp.esmsafrica.io", 2775)
client.connect()
client.bind_transceiver(system_id="YOUR_ID", password="YOUR_PASSWORD")
parts, enc, _ = smpplib.gsm.make_parts("Hello over SMPP")
for part in parts:
client.send_message(
source_addr="MyBrand",
destination_addr="254712345678",
short_message=part,
data_coding=enc,
registered_delivery=True, # ask for a DLR
)With registered_delivery set, the operator returns a DLR over the same session as a deliver_sm. Handle it in your receiver to update message status.
Use SMPP for very high, sustained throughput (aggregators, banks, large senders). Use the REST API for most applications - it is simpler to integrate.
SMPP 3.4, with transmitter, receiver and transceiver binds and DLRs over the session.