Integrate WhatsApp on your Application? | by Ayush Tibra | May 2022
How to link/redirect to WhatsApp from your web app?
Almost all business-related queries, customer support chats, order status, and promotions go through Whatsapp today. There are big players in the market who are building various integrated AI chatbots through WhatsApp which help us to increase our business sales.
And of course every company has their own website or app and we want to redirect users to WhatsApp for certain queries etc. from our app.
So how can we link WhatsApp to our apps?
Step 1 :- Find out the mobile number you want to redirect users to
Create a link in this format:-
Do not use : https://wa.me/+001-(555)1234567
Note:- This is called a universal link and it is a preferred method of linking to WhatsApp accounts as per their documentation.
Step 2 :- Attach this link to your event handler
There are different ways to attach this link to your app like a sticky WhatsApp icon on your website, a button on a page, etc.
As you can see in the code above, we’ve attached our universal
But, did you notice anything after the number?
Do you know what that means?
Step 3 :- Add a pre-filled message in a chat text field
WhatsApp provides us with a way to include a pre-filled message that will automatically appear in the text field of a chat.
Create a link in this format-
Where the WhatsApp phone number is a full international format phone number and the URL encoded text is the URL encoded pre-filled message.
And that’s all!
“This is the final URL, you can use to redirect users from your application to WhatsApp”.
To note:- Attention, when you send a pre-filled message, it must be
This type of message will work without encoding, but if your message consists of a single character like
@ etc., it will truncate that message before that special character.
https://wa.me/15551234567?text=butter & body
It will only send butter as a pre-filled message, as it is not encoded.