Open Whatsapp Windows app directly from python program using url

0 votes

According to this FAQ page of Whatsapp on How to link to WhatsApp from a different app

Using the URL

whatsapp://send?phone=XXXXXXXXXXXXX&text=Hello

can be used to open the Whatsapp app on a Windows PC and perform a custom action.

It does work when it is opened in a browser. The URL opens Whatsapp installed and composes the message(parameter:text) for the given contact(parameter:phone)

I want to open the Whatsapp application directly using python script without the intervention of browser in between

I have tried using request and urlib, but they don't consider it as a valid schema for URL as it does not have a http:// or https:// instead it has whatsapp://.

requests.exceptions.InvalidSchema: No connection adapters were found for 'whatsapp://send'

Is there a library in python that would open the associated applications directly based on the URL.

P.S. I know the page is for Iphone but the link works perfectly on windows browser. Just need to know if that can be used.

Working with Python 3.7.9 on Windows 10

Apr 18, 2022 in Python by Edureka
• 13,620 points
918 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Python

0 votes
1 answer

How to get text label from SAP using pywinauto[python]

Hi. Can you please tell me what ...READ MORE

answered Jun 28, 2018 in Python by Nietzsche's daemon
• 4,260 points
2,761 views
0 votes
1 answer

When I create and remove files rapidly on windows using python I get WindowsError (Error 5)

Here's the short answer: disable any antivirus or ...READ MORE

answered Aug 31, 2018 in Python by charlie_brown
• 7,720 points
1,898 views
0 votes
1 answer

I'm using Python 2.7 to convert an XML response (from a REST call to Atlassian Fisheye) into an HTML table.

You don't have a template matching tabularQueryResult in your ...READ MORE

answered Oct 4, 2018 in Python by Priyaj
• 58,100 points
1,415 views
0 votes
1 answer

How do I convert a Python program to a runnable .exe Windows program?

Understand that every 'freezing' application for Python ...READ MORE

answered Oct 13, 2018 in Python by SDeb
• 13,300 points
1,432 views
0 votes
1 answer

Open multiple files using with open() in Python?

Just replace and with , and you're done: with open('a', 'w') as ...READ MORE

answered Oct 31, 2018 in Python by Priyaj
• 58,100 points
8,613 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,394 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP