This folder contains Python scripts for integrating various SMS service providers to send text messages. Each script provides functions for sending SMS using different API clients.
Africa's Talking is a communication API platform providing SMS, voice, and USSD services primarily across Africa.
-
File:
africastalking_sms.py
-
Setup:
- Install
africastalking
library:pip install africastalking
. - Configure API key and username.
- Install
-
Example Usage:
from africastalking_sms import send_sms send_sms("recipient_number", "Your message here")
AWS SNS (Simple Notification Service) allows for sending SMS messages to users worldwide.
-
File:
aws_sms.py
-
Setup:
- Install AWS SDK:
pip install boto3
. - Configure AWS credentials with access to SNS.
- Install AWS SDK:
-
Example Usage:
from aws_sms import send_sms send_sms("recipient_number", "Your message here")
Azure Communication Services enables SMS messaging through the Azure cloud infrastructure.
-
File:
azure_sms.py
-
Setup:
- Install Azure SDK:
pip install azure-communication-sms
. - Configure Azure Communication Services connection string.
- Install Azure SDK:
-
Example Usage:
from azure_sms import send_sms send_sms("recipient_number", "Your message here")
Nexmo (now Vonage) provides APIs for SMS, voice, and messaging services.
-
File:
nexmo_sms.py
-
Setup:
- Install
vonage
library:pip install vonage
. - Configure API key and secret.
- Install
-
Example Usage:
from nexmo_sms import send_sms send_sms("recipient_number", "Your message here")
Twilio is a popular cloud communications platform, allowing you to send SMS, voice, and other messaging services.
-
File:
twilio_sms.py
-
Setup:
- Install Twilio SDK:
pip install twilio
. - Configure Twilio account SID, auth token, and messaging service SID or sender number.
- Install Twilio SDK:
-
Example Usage:
from twilio_sms import send_sms send_sms("recipient_number", "Your message here")
- Clone the repository and navigate to the
sms
folder. - Install any required dependencies as mentioned in each section.
- Configure your credentials for each SMS provider.
- Run the scripts to send SMS messages using the specified provider.
Contributions are welcome! If you’d like to add more SMS providers or enhance existing implementations, please submit a pull request with a detailed description of your changes.