Python | Send SMS using Twilio Last Updated : 18 Apr, 2019 Summarize Comments Improve Suggest changes Share Like Article Like Report As we know Python is a cool scripting language and can be used to write scripts to easify day-to-day task. Also, since python has large community support and lots of module/API available, it makes Python more versatile and popular among users. In this article, we will see how to use Twilio API to send SMS using Python. It will be a very quick and easy guide to doing this very interesting task. Firstly, we need to create an account in Twilio's official website to get the id and token. This is a paid service, but you will be credited with an initial amount to get you started. Steps to create Twilio account: Head to Twilio's registration page. Complete the registration by filling in with the required details. From the console(dashboard), copy the ACCOUNT SID and AUTH TOKEN. Install Twilio library using pip. pip install twilio Below is the Python implementation: Python3 # importing twilio from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com / console account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' auth_token = 'your_auth_token' client = Client(account_sid, auth_token) ''' Change the value of 'from' with the number received from Twilio and the value of 'to' with the number in which you want to send message.''' message = client.messages.create( from_='+15017122661', body ='body', to ='+15558675310' ) print(message.sid) In the above code, just replace the values of account_sid and auth_token with the values you receive from Twilio. Also, replace the body with the message which you want to send and bingo! Exercise: Extract emails from your account and forward the subject and receivers mail address as a text message to your mobile phone. You can even filter it by limiting it to forward only important mails. Comment More infoAdvertise with us Next Article Python | Send SMS using Twilio J JatinRanka Follow Improve Article Tags : Python Practice Tags : python Similar Reads Send SMS with REST Using Python In this article, we are going to see how we can send SMS with REST using Python. The requests library can be used to make REST requests using Python to send SMS. Approach:You need to first create a REST API KEY for sending SMS using Python Script. We have used Fast2SMS for creating API KEY.You can 2 min read 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 your mobile phone through SMS, you can use SinchSMS API to send SMS.Approach : Create an 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 2 min read Tweet using Python Twitter is an online news and social networking service where users post and interact with messages. These posts are known as "tweets". Twitter is known as the social media site for robots. We can use Python for posting the tweets without even opening the website. There is a Python library which is 3 min read Send Emails Using Python By using Python, you can send emails which can be a valuable skill for automation, communication, and data-driven processes. In this article, we will explore how to send mail from Gmail using Python. How can you send Emails using Python?Python offers a library to send emails- "SMTP" Library. "smtpli 4 min read How to send SMS alert using Python and MSG91 API In our college days we most often forget our daily classes, right? To keep track of classes every day, we can send a Notification (i.e, ) SMS Alert regards their classes to their mobile phones using Python. We need to use two functionalities: http module and MSG91 API for sending SMS. Python3 import 3 min read Like