Official SDKs
Python SDK
Official Python SDK for Notify Africa SMS API integrations.
Python
Install
pip install notify-africaSource
SMS Methods
| Method | SMS endpoint |
|---|---|
send_single_message(phoneNumber, message, senderId) | POST /api/v1/api/messages/send |
send_batch_messages(phoneNumbers, message, senderId) | POST /api/v1/api/messages/batch |
check_message_status(messageId) | GET /api/v1/api/messages/status/{messageId} |
Example
import os
from notify_africa import NotifyAfrica
client = NotifyAfrica(apiToken=os.environ["NOTIFY_SMS_API_KEY"])
result = client.send_single_message(
phoneNumber="255712345678",
message="Hello from Notify Africa",
senderId="MYBRAND",
)
print(result.messageId, result.status)