├── .gitignore
├── README.md
├── bulksms2.py
└── bulksms3.py
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | wheels/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 | MANIFEST
27 |
28 | # PyInstaller
29 | # Usually these files are written by a python script from a template
30 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
31 | *.manifest
32 | *.spec
33 |
34 | # Installer logs
35 | pip-log.txt
36 | pip-delete-this-directory.txt
37 |
38 | # Unit test / coverage reports
39 | htmlcov/
40 | .tox/
41 | .coverage
42 | .coverage.*
43 | .cache
44 | nosetests.xml
45 | coverage.xml
46 | *.cover
47 | .hypothesis/
48 | .pytest_cache/
49 |
50 | # Translations
51 | *.mo
52 | *.pot
53 |
54 | # Django stuff:
55 | *.log
56 | local_settings.py
57 | db.sqlite3
58 |
59 | # Flask stuff:
60 | instance/
61 | .webassets-cache
62 |
63 | # Scrapy stuff:
64 | .scrapy
65 |
66 | # Sphinx documentation
67 | docs/_build/
68 |
69 | # PyBuilder
70 | target/
71 |
72 | # Jupyter Notebook
73 | .ipynb_checkpoints
74 |
75 | # pyenv
76 | .python-version
77 |
78 | # celery beat schedule file
79 | celerybeat-schedule
80 |
81 | # SageMath parsed files
82 | *.sage.py
83 |
84 | # Environments
85 | .env
86 | .venv
87 | env/
88 | venv/
89 | ENV/
90 | env.bak/
91 | venv.bak/
92 |
93 | # Spyder project settings
94 | .spyderproject
95 | .spyproject
96 |
97 | # Rope project settings
98 | .ropeproject
99 |
100 | # mkdocs documentation
101 | /site
102 |
103 | # mypy
104 | .mypy_cache/
105 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # python-bulk-sms-api
2 | python bulk sms api
3 |
4 | Download Python send Bulk SMS API script
5 | Change ******* to Proovl https://www.proovl.com token and user ID (message and phone number )
6 | Open terminal (Apple mac) or cmd.exe (Command Prompt) for windows .
7 | Run script Python bulksms2.py or Python3 bulksms3.py
8 | Done!
9 |
10 | Video tutorial: Python SMS API. Send text messages using python Video
11 |
12 |
14 |
15 |
16 | Video tutorial: Termux SMS API for Bulk SMS
17 |
18 |
20 |
--------------------------------------------------------------------------------
/bulksms2.py:
--------------------------------------------------------------------------------
1 | import urllib
2 | import time
3 | # Proovl SMS API settings www.proovl.com / Script for Python 2
4 | user = "***********" # change ***** to your Proovl user ID
5 | token = "***********" # change ***** to your Proovl token
6 | from1 = "***********" # change ***** to your Proovl SMS number
7 | text = "Hello World" # text
8 | # Add numbers: format "44755555555" / one per line
9 | numbers = [
10 | "44755555555",
11 | "44755555555",
12 | "44755555555",
13 | "44755555555"
14 | ]
15 | messagesSent = 0
16 | host = "https://www.proovl.com/api/send.php?"
17 | for x in numbers:
18 | messagesSent += 1
19 | params = {
20 | "user": user,
21 | "token": token,
22 | "from": from1,
23 | "text": text,
24 | "to": x}
25 | query_string = urllib.urlencode(params)
26 | http_req = host + query_string
27 | f = urllib.urlopen(http_req)
28 | txt = (f.read().decode('utf-8'))
29 | z = txt.split(";")
30 | time.sleep(0.5)
31 | print("Progress: {}/{}") .format(messagesSent, len(numbers)), (x), (z[0])
32 | if z[0] == "Error":
33 | print("== Error. Text messages not sent ==")
34 | else:
35 | print("== Message has been sent! ==")
36 |
--------------------------------------------------------------------------------
/bulksms3.py:
--------------------------------------------------------------------------------
1 | import urllib
2 | import urllib.parse
3 | import urllib.request
4 | import time
5 | from urllib import request as urlrequest
6 | import ssl
7 | # Proovl SMS API settings www.proovl.com / Script for Python 3+
8 | user = "***********" # change ***** to your Proovl user ID
9 | token = "***********" # change ***** to your Proovl token
10 | from1 = "***********" # change ***** to your Proovl SMS number
11 | text = "Hello World" # text
12 | # Add numbers: format "44755555555" / one per line
13 | numbers = [
14 | "44755555555",
15 | "44755555555",
16 | "44755555555",
17 | "44755555555"
18 | ]
19 | messagesSent = 0
20 | host = "https://www.proovl.com/api/send.php?"
21 | hdr = { 'User-Agent' : 'Mozilla/5.0 (Windows NT 6.1; Win64; x64)' }
22 | for x in numbers:
23 | messagesSent += 1
24 | params = {
25 | "user": user,
26 | "token": token,
27 | "from": from1,
28 | "text": text,
29 | "to": x}
30 | try:
31 | _create_unverified_https_context = ssl._create_unverified_context
32 | except AttributeError:
33 | pass
34 | else:
35 | ssl._create_default_https_context = _create_unverified_https_context
36 | query_string = urllib.parse.urlencode(params)
37 | http_req = host + query_string
38 | req = urllib.request.Request(http_req, headers=hdr)
39 | f = urllib.request.urlopen(req)
40 | txt = (f.read().decode('utf-8'))
41 | z = txt.split(";")
42 | time.sleep(0.5)
43 | print("Progress: {}/{}".format(messagesSent, len(numbers)), (x), (z[1]))
44 | if z[0] == "Error":
45 | print("== Error. Text messages not sent ==")
46 | else:
47 | print("== Message has been sent! ==")
48 |
--------------------------------------------------------------------------------