Socket
Socket
Sign inDemoInstall

python-orange-sms

Package Overview
Dependencies
5
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    python-orange-sms

Sending sms to orange api with python


Maintainers
1

Readme

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

  1. Go to https://developer.orange.com/ and login or create a new account

  2. Go to my apps

  3. Select your app or create a new app

  4. Get your Client ID

  5. Get your Authorization header

  6. Get your App Name

USAGE

from python_orange_sms import utils

SENDER_NAME = 'Name of your app' # Name of your app in dev console
AUTH_TOKEN = 'Authorization header' # Authorization header from dev console

message = "The sms message you want to send to the recipient" # Your message
recipient_phone_number='243xxxxxxxxx' # a Receiver phone number
dev_phone_number='243xxxxxxxxx' # Sender (your phone number)
#recipient_phone_number and dev_phone_number are international phone numbers without + or leading zeros:  format regex('^[1-9][\d]{10,14}$')

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) # SMS sent
else:
    print('SAME THING WRONG : ', res.text) # OOPS

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc