Currently, if a user is on a Mobile phone, one can create a link on a web-site as such (for Android)

<a href="whatsapp://send?text=Hello World">WhatsApp</a>

which, when clicked, will open WhatsApp app on the user's phone, ask them to select a contact/group and pre-fill the message box with "Hello World".

However, if the user is on a Desktop, I can link to WhatsApp web but I can't find a way to pre-fill the message box. For example,

<a href="http://web.whatsapp.com/send?text=Hello World">WhatsApp</a>

does not work.

Does anyone know of a way to do this?

1 Answer 1


Use https://api.whatsapp.com/send?text= and urlencode your text.

Example: https://api.whatsapp.com/send?text=I'm%20inquiring%20about%20the%20apartment%20listing

reference: https://faq.whatsapp.com/en/26000030/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.