Send SMS updates to mobile phone using python
If you are running any python script and want to send regular updates from your script to mobile phone through SMS, you can use SinchSMS API to send SMS.
Approach :
Create a app on Sinch and get the key and secret of the app and use these credentials in the following script to send SMS to your mobile.
Limitation of Sinch :
If you don’t have any credits(you have to pay for credits), you can only send SMS to the registered mobile numbers on Sinch.
You can use way2sms to send sms to any number(I will be discussing how to use way2sms in another article), but without purchased credits, on way2sms also, you can’t send more than 100 SMS per day.
# python script for sending message update import time from time import sleep from sinchsms import SinchSMS # function for sending SMS def sendSMS(): # enter all the details # get app_key and app_secret by registering # a app on sinchSMS number = 'your_mobile_number' app_key = 'your_app_key' app_secret = 'your_app_secret' # enter the message to be sent message = 'Hello Message!!!' client = SinchSMS(app_key, app_secret) print("Sending '%s' to %s" % (message, number)) response = client.send_message(number, message) message_id = response['messageId'] response = client.check_status(message_id) # keep trying unless the status retured is Successful while response['status'] != 'Successful': print(response['status']) time.sleep(1) response = client.check_status(message_id) print(response['status']) if __name__ == "__main__": sendSMS() |
For execution of script, edit the number, app_key and app_secret fields and then simply run the script.
I have written complete script for sending SMS updates to mobile phone using sinchSMS and way2sms by fetcing latest updates from our placement website(aitplacements.com). GitHub link : stayUpdated
Exercise : Create a python script which updates you on your mobile phone if price of a particular product lowers down to certain price on amazon.com
Recommended Posts:
- Python | Send SMS using Twilio
- Send mail from your Gmail account using Python
- Send mail with attachment from your Gmail account using Python
- Send unlimited Whatsapp messages using JavaScript
- How Google Updates Itself!
- Number of primes in a subarray (with updates)
- Implement a Phone Directory
- Maximum elements that can be made equal with k updates
- Traditional wireless mobile communication
- Getting Started with Cross-Platform Mobile Application using Flutter
- Analyzing Mobile Data Speeds from TRAI with Pandas
- Introduction to Xamarin | A Software for Mobile App Development and App Creation
- Common Sense tips for Mobile Security for End Users
- Important differences between Python 2.x and Python 3.x with examples
- Reading Python File-Like Objects from C | Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



