This repo shows how to implement & Deploy a Simple Python SMS Script on Heroku (http://heroku.com/). Send SMS from Python Script to any Mobile Number Via MSG91 API-> The Simple and Easy to Use Script. You can Use it to Create Your short SMS API.
To run this script clone this repo. You will need a MSG91 Account to run this Script. Sign up for a free account (you will get 100 Free Promotional SMS Credits) or Login if you already have a account on MSG91 then go to your dashboard then click on API Tab to get your credentials (AUTH KEY). Copy the Auth Key and paste it in the sms.py
Script in authKey Variable.
authKey = {YOUR MSG91 AUTH KEY}
- Python 3.3+
- macOS or Linux or Windows
- Flask
- Requests
- Gunicorn (Needed When you Deploy the Script on Heroku)
Run pip install -r requirements.txt
in the Command Prompt.
After installing the Dependencies run python sms.py
in Command Prompt (Only For Windows Users).
$ git clone https://github.com/mohd-baquir-qureshi/Easy-SMS-MSG91.git
$ cd Easy-SMS-MSG91
$ git init
$ git add .
$ git commit -m "First Commit"
$ heroku create
$ git push heroku master
$ heroku open
or
Make sure you have Python 3.3+ installed locally.
$ git clone https://github.com/mohd-baquir-qureshi/Easy-SMS-MSG91.git
$ cd Easy-SMS-MSG91
$ pip install -r requirements.txt
$ heroku local
Your app should now be running on localhost:5000.
Syntax => http://localhost:5000/{SENDER ID}/{MOBILE NUMBER}/{MESSAGE}
Ex. => http://localhost:5000/PYTHON/8888888888/Hello%20Python
Syntax => https://demo-app.herokuapp.com/{SENDER ID}/{MOBILE NUMBER}/{MESSAGE}
Ex. => https://demo-app.herokuapp.com/PYTHON/8888888888/Hello%20Python