PYTHON ORANGE SMS GATE WAY
Orange provides API to send SMS to some countries around the world, but using the API may take you a few hours.
If you are a python developer, don't waste your time. Just use our package and save your time for other meaningful things.
INSTALL
pip install python-orange-sms
GET CREDENTIALS
-
Go to https://developer.orange.com/ and login or create a new account
-
Go to my apps
-
Select your app or create a new app
-
Get your Client ID
-
Get your Authorization header
-
Get your App Name
USAGE
from python_orange_sms import utils
SENDER_NAME = 'Name of your app'
AUTH_TOKEN = 'Authorization header'
message = "The sms message you want to send to the recipient"
recipient_phone_number='243xxxxxxxxx'
dev_phone_number='243xxxxxxxxx'
sms = utils.SMS(AUTH_TOKEN = AUTH_TOKEN, )
res = sms.send_sms(message=message,
dev_phone_number=dev_phone_number, recipient_phone_number=recipient_phone_number)
print(res)
if res.status_code == 201:
print('EVERYTHING RIGHT : ', res.text)
else:
print('SAME THING WRONG : ', res.text)