If you are building a product that needs to reach customers across Africa, sending bulk SMS via the Africa's Talking API is one of the fastest, most reliable channels you can integrate. SMS still delivers an open rate of around 98%, with the majority of messages read within three minutes of delivery (GSMA Mobile Economy reports), and Africa's Talking exposes a clean REST API that works across more than 20 African markets. This guide walks you through the exact steps — credentials, code, Sender IDs, delivery reports, costs, and compliance — and shows when a higher-level platform such as HelloDuty makes more sense than wiring the API yourself.
By the end you will know how to authenticate, send your first batch, register a branded Sender ID for Kenya, handle delivery callbacks, control throughput, and avoid the most common compliance traps that get sender IDs blacklisted by the Communications Authority of Kenya.
Why Africa's Talking is a popular choice for bulk SMS in Africa
Africa's Talking (AT) is a Pan-African communications platform that aggregates direct connections to mobile network operators across Kenya, Uganda, Tanzania, Rwanda, Nigeria, Ghana, South Africa, Malawi, Ethiopia and more. For developers, the appeal is straightforward:
- One API, many countries — the same HTTP endpoint and credentials work across all supported markets.
- Direct operator routes — messages travel over local interconnects rather than greylisted international SMPP, which improves deliverability.
- SDKs for popular languages — official libraries for Python, Node.js, PHP, Java, Ruby, Go and .NET.
- Local pricing — Kenya, for example, is priced around KES 0.80 per SMS on standard routes, with discounted rates on bulk and short-code traffic.
You can read the official documentation at developers.africastalking.com. Below we focus on the practical bits most teams trip over.
Step 1: Create an account and grab credentials
Sign up at africastalking.com, verify your email, and open the dashboard. You need two things to call the API:
- Your username — use
sandbox while you build, and your live username once you top up. - Your API key — found under Settings → API Key.
Top up your account in Kenyan Shillings via M-Pesa or card. The sandbox is free but only delivers to whitelisted test numbers — it is perfect for CI pipelines, but real customers must be on a live account.
Step 2: Send your first bulk SMS (code samples)
The bulk SMS endpoint is https://api.africastalking.com/version1/messaging/bulk. Here is a minimal Node.js example sending one message to a list of recipients:
const AfricasTalking = require('africastalking')({
apiKey: process.env.AT_API_KEY,
username: process.env.AT_USERNAME,
});
async function sendBulk() {
const result = await AfricasTalking.SMS.send({
to: ['+254700000001', '+254700000002', '+254700000003'],
message: 'Hi! Your HelloDuty verification code is 4821.',
from: 'HELLODUTY', // your registered Sender ID
});
console.log(JSON.stringify(result, null, 2));
}
sendBulk().catch(console.error);
And the equivalent in Python:
import africastalking, os
africastalking.initialize(os.environ['AT_USERNAME'], os.environ['AT_API_KEY'])
sms = africastalking.SMS
response = sms.send(
'Hi! Your HelloDuty verification code is 4821.',
['+254700000001', '+254700000002'],
'HELLODUTY'
)
print(response)
If you prefer raw HTTP, send a POST with form-urlencoded username, to (comma-separated MSISDNs in E.164), message, and optional from, plus headers apiKey: <your-key> and Accept: application/json. The response contains a SMSMessageData.Recipients array, where each entry has a statusCode, cost and messageId — store the messageId; you will need it to correlate with delivery reports.
Step 3: Register a Sender ID (and stay compliant)
In Kenya, Nigeria, Uganda and most other markets you cannot send marketing SMS from a random number — operators require an alphanumeric Sender ID (e.g. HELLODUTY, UBER, SAFBOOST). Africa's Talking lets you request a Sender ID per country from the dashboard. Approval typically takes 2 to 5 business days, and you must upload a letter on company letterhead plus sample messages.
Three rules that get senders blacklisted by the Communications Authority of Kenya (CAK):
- No promotional SMS outside 07:00–19:00 EAT. Transactional OTPs and service alerts are exempt.
- Every recipient must have opted in. Keep an audit log of consent — date, channel, IP if web.
- Every promotional SMS must include an unsubscribe path (e.g. SMS STOP to 22002).
Step 4: Handle delivery reports with a callback URL
To know whether each SMS actually arrived, configure a Delivery Report callback URL in the AT dashboard under SMS → Callback URLs. Africa's Talking will POST a payload like this to your endpoint each time the operator confirms or rejects a message:
{
"id": "ATXid_xxxxxxxxxxxxxxxx",
"status": "Success", // or Failed, Rejected, Buffered
"phoneNumber": "+254700000001",
"networkCode": "63902",
"failureReason": null,
"retryCount": 0
}
Store the message ID alongside your business record (order ID, user ID, OTP attempt) and update its status idempotently — AT may retry callbacks if your server returns non-2xx.
Step 5: Manage throughput, throttling and cost
AT does not impose a hard per-second rate limit on its bulk endpoint, but operator SMSC capacity does — practical throughput for Safaricom Kenya is in the low thousands of messages per minute on standard routes. For genuinely large campaigns (100k+ recipients):
- Batch recipients in groups of 500–1,000 per request rather than 50k in one call.
- Use a queue (BullMQ, SQS, Celery) so a single failure does not stall the campaign.
- Implement exponential backoff on HTTP 5xx — they almost always resolve within a minute.
- Cache your account balance check and stop early if you would run out mid-campaign.
At KES 0.80 per SMS, a 100,000-recipient campaign costs roughly KES 80,000 before any volume discount — budget accordingly. For frequent senders, AT offers tiered pricing once you commit to monthly volumes.
When the API is overkill: a no-code alternative for non-developers
The Africa's Talking API is excellent if you have engineering capacity. But if you are a marketing manager, SME owner, or operations lead who just needs to actually send the campaign — write copy, upload a contact list, schedule, and track delivery — wiring up Sender ID approvals, delivery callbacks and queuing is not the best use of your time.
That is where HelloDuty fits. We sit on top of direct operator routes (the same kind AT uses) and give you:
- A dashboard to upload contacts (CSV), compose, schedule and segment campaigns.
- Sender ID registration handled for you across Kenya, Uganda, Tanzania, Rwanda, Nigeria, Ghana and South Africa.
- Two-way SMS so customers can reply — see our guide on two-way SMS for businesses.
- WhatsApp, voice and USSD on the same contact, so you can fall back when SMS fails. We cover the combined approach in WhatsApp integration for better customer experience.
If you are an SME comparing options, our deep dive on cloud telephony in Africa explains where SMS fits in the broader stack.
Frequently asked questions
How much does Africa's Talking charge per SMS in Kenya?
Standard SMS to Safaricom, Airtel and Telkom subscribers is around KES 0.80 per message on the live API, with volume discounts available once you commit to monthly tiers. Sandbox traffic is free.
Do I need a Sender ID to send SMS in Kenya?
For promotional and most transactional messages, yes. Without a registered alphanumeric Sender ID, your SMS will either be delivered from a random short code or blocked entirely. Registration takes 2–5 business days and requires a letter on company letterhead.
What is the difference between bulk SMS and Premium SMS?
Bulk SMS is one-way outbound (you pay to send). Premium SMS uses a short code where the recipient is billed when they message in — used for subscription services, voting and donations. AT supports both, but Premium SMS requires CAK approval and a revenue-share agreement with the operator.
How do I avoid being marked as spam?
Use an opted-in list, send within legal hours (07:00–19:00 for marketing in Kenya), include an unsubscribe instruction, and keep your daily volume per sender ID predictable. Sudden 10x spikes from a new ID are the fastest way to get throttled.
Can I integrate Africa's Talking SMS with my CRM?
Yes — most teams call the API from a backend that already talks to their CRM. If you do not have engineering bandwidth, HelloDuty offers pre-built integrations with HubSpot, Zoho, Salesforce and Google Sheets so non-developers can trigger campaigns from the tools they already use.
Wrapping up
Sending bulk SMS via the Africa's Talking API is a strong choice if you have engineers, want fine-grained control over delivery callbacks, and are operating across multiple African markets. If you would rather skip the boilerplate — Sender ID paperwork, delivery callbacks, queueing, retries — and get straight to running campaigns that actually convert, talk to HelloDuty. We bundle SMS, WhatsApp, voice and AI-powered call handling on the same platform, so your team only manages one contact and one inbox per customer.
Ready to launch your first campaign? Book a 20-minute demo and we will set up your Sender ID, import your contact list and walk you through your first send — usually live within a week.