Home > Tips & Tricks > Send WhatsApp Message Using Python

Send WhatsApp Message Using Python

Yes, you can send a WhatsApp message using two lines of code in python. It is very simple. You need to just install the python library and use it.

Install Library

Let’s install the library name is pywhatkit. This library comes in python and you need to install it with the pip command. Open your command prompt and use the below command to install this library.

pip install pywhatkit

When it’s installed, you get a success message. You can check here for more detail about this library.

Send WhatsApp Message with Python Using this Library

OK. So, we have installed the library “pywhatkit”. Now we will see how can send WhatsApp message with just two lines.

Let’s see the code below:

Run this above code and you will see the magic. It will send a message to a specific number at your provided time. In this example, we take four parameters as follows the mobile numbers, message, hours, mintues. You can change the value of these parameters accordingly.

Hope! you liked it. If you have a query ask me in the comment. Being Tricky 😉

Photo of author

About Aman Mehra

Hey there! I'm Aman Mehra, a full-stack developer with over six years of hands-on experience in the industry. I've dedicated myself to mastering the ins and outs of PHP, WordPress, ReactJS, NodeJS, and AWS, so you can trust me to handle your web development needs with expertise and finesse. In 2021, I decided to share my knowledge and insights with the world by starting this blog. It's been an incredible journey so far, and I've had the opportunity to learn and grow alongside my readers. Whether you're a seasoned developer or just dipping your toes into the world of web development, I'm here to provide valuable content and solutions to help you succeed. So, stick around, explore the blog, and feel free to reach out if you have any questions or suggestions. Together, let's navigate the exciting world of web development!

2 thoughts on “Send WhatsApp Message Using Python”

Leave a Comment