This is how you can send a whatsapp message through python

--

As always I will be explaining the code in comments :)

import pywhatkit as pwk

# using Exception Handling to avoid unexpected errors
try:
# sending message in Whatsapp in India so using Indian dial code (+91)
pwk.sendwhatmsg("+91**********", "Hello how are you?", <time in hours>, <time in minutes>)

print("Message Sent!") #Prints success message in console

# error message
except:
print("Error in sending the message")

--

--

Drishan T Gupta
Drishan T Gupta

No responses yet