Note: WhatsApp url scheme

  1. The user has WhatsApp
  2. Unsure if the user has WhatsApp
  3. Web-based app

The user has WhatsApp

Only open WhatsApp

whatsapp://

Start a chat

whatsapp://send

Start chat to phone number. The number must be in international format without any symbols or spaces.

whatsapp://send?phone=1234

Start chat and prefill the text field

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

Leave out the phone number to display the contacts list.


Unsure if the user has WhatsApp

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

Only open WhatsApp

https://wa.me/

Start chat to phone number. The number must be in international format without any symbols or spaces.

https://wa.me/1234

Start chat and prefill text field

https://wa.me/1234/?text=Hello%20world

Leave out the phone number to display the contacts list.


Web-based app

Only open the webapp

https://web.whatsapp.com

Start a chat

https://web.whatsapp.com/send

Start chat to phone number. The number must be in international format without any symbols or spaces.

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

Start a chat and prefill the text field

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

Leave out the phone number to display the contacts list.

Like this article?
Buy me a coffee

Changelog
2019-12-02 – Added url to only launch the app. Rewrite text.

There is a new url ‘wa.me’ for the redirector. Right now it is still using the old one at ‘api.whatsapp.com’, but they don’t say if it is going to be replaced. Maybe ‘wa.me’ is going to be a universal link that it tightly connected with the app. When you have the app installed it will open immediately without the web redirect. And when you don’t have it the website opens. Time will tell.


Related stuff


Comments

5 responses to “Note: WhatsApp url scheme”

  1. Antoine Stocker

    Is it a way to send a message without opening the app and click on send on Whatsapp?

    I just want to enter the url and the message is send…

    1. Franklin

      I don’t believe there is a way to bypass the app using the URL schemes. The only way to directly talk to WhatsApp is by building your own solution using the Business API: https://www.whatsapp.com/business/api

  2. Arvinthsamy M

    I don’t want to send messages or do a call, I want to open whatsapp and that’s it. what will be the URL scheme for that.

    1. You can leave out the command section:

      whatsapp://

      Or

      https://api.whatsapp.com/

  3. pruthviraj zalake

    Nice

Leave a Reply

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