Have you guys ever thought of sending text message to your mobile? If yes, how will you do using a python script? Sending a sms using a script can be used as a notification in your project if necessary. It can be used only for the test using your own phone.
Creating Twilio Account
This can be done easily with an online API called twilio. If you dont have an account on it, register. Fill the details with your full name, your own company name (if exists), your mail id and 14 characters password. On product plan choose SMS, on buliding project choose Account Notifications, on language choose Python, on Monthly interactions choose Not a production app. Finally, click Get started.
On the next step, enter your personal phone number where you need to receive notifications. Verify it with One Time Password and click Submit.
Preparing to send SMS
Now as soon as you have registered, you are taken to the Console Dashboard where you can see your ACCOUNT SID and AUTH TOKEN under account summary. Copy and save it with your system. Now, click Programmable SMS module under All Twilio Products and click Get Started. You will see a new console, click Get a Number.
After Clicking Get a Number under ‘First let’s get a twilio phone number’. Twilio will give you a Phone number and click Choose this number.
Then it will give you a new Phone number and click Done. Save it to the other Twilio details in your computer. Now, you have your Account SID, Auth Token, Your Verified Phone Number, Your Twilio Phone number.
Open your command prompt and type >> pip install twilio. Create your python Script as like this say ‘message.py’.
Fill the areas with details and execute the script in your system (Internet Connection is needed). You will receive the SMS.
There you got your messages. Comment your try and don’t forget to share this with your friends. Also Check out How to convert .py to .exe and Python Code Sheet. Like if this helps you. Have a nice day.
Maria Irudaya Regilan J