Note to self.

Start chat with phone number

whatsapp://send?phone=1234

Prefill the text field

whatsapp://send?phone=1234&text=Hello%20world

These links may not work when the user is using the desktop app. To resolve this WA allows the use of their web proxy, which is basically a bit of javascript doing some checks and then request the url above to launch the app.

Start chat with phone number

https://api.whatsapp.com/send?phone=1234

Prefill text field

https://api.whatsapp.com/send?phone=1234&text=Hello%20world

To enforce the WA webapp, just replace api with web.

Related stuff

Categories: Code

Leave a Reply

Your email address will not be published. Required fields are marked *