Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 794e3e3

Browse files
Merge pull request avinashkranjan#824 from Amit366/Amit2
SMS automation
2 parents c29c20d + 6e34fd6 commit 794e3e3

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

‎SMS Automation/Readme.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# <b>SMS Automation</b>
2+
3+
[![forthebadge](https://forthebadge.com/images/badges/made-with-python.svg)](https://forthebadge.com)
4+
5+
## SMS Automation Functionalities : 🚀
6+
7+
- First register in Twilio and also add the phone numbers to whom messages are to be sent.
8+
- On running the script and entering the api key and phone numbers the message will be delivered
9+
10+
## Setup:
11+
12+
- First register on Twilio.
13+
- Then verify your phone number from which you want to send the message.
14+
- Now add the phone number of the receiver and verify it.
15+
- Also allow the geo-location [permission](https://www.twilio.com/console/sms/settings/geo-permissions).
16+
17+
## Automation Instructions: 👨🏻‍💻
18+
19+
### Step 1:
20+
21+
Open Termnial 💻
22+
23+
### Step 2:
24+
25+
Locate to the directory where python file is located 📂
26+
27+
### Step 3:
28+
29+
Run the command: python script.py/python3 script.py 🧐
30+
31+
### Step 4:
32+
33+
Sit back and Relax. Let the Script do the Job. ☕
34+
35+
### Requirements
36+
37+
- twilio
38+
39+
## Author
40+
41+
Amit Kumar Mishra
42+

‎SMS Automation/script.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from twilio.rest import Client
2+
3+
api = input("Enter your ACCOUNT SID: ")
4+
auth = input("Enter your AUTH TOKEN: ")
5+
from_number = input("Enter number from which you want to send the SMS: ")
6+
message = input("Enter the massage: ")
7+
to_number = input("Enter comma separated numbers to which you want to send the SMS: ")
8+
lists = to_number.split (",")
9+
groupnum = []
10+
for i in lists:
11+
groupnum.append(i)
12+
13+
account_sid = api
14+
auth_token = auth
15+
client = Client(account_sid,auth_token)
16+
17+
for i in range(len(groupnum)):
18+
client.messages.create(from_=from_number,body=message,to=groupnum[i])
19+
20+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /