What is the Opt-in process? ✍️

What is the Opt-in process?

As in other channels, like Facebook Messenger, users need to first give you their consent to be reached via WhatsApp.

⚠️ One important thing to note, is that it needs to happen in a third-party channel, and not in WhatsApp itself. ⚠️

For more information about the WhatsApp Terms of Services and the consequences of its violation, please click on this link!

When the user gives this consent we call it the Opt-in process. We have two options for the opt-in:

  1. It can happen via Snippet, a sort of "Form to give consent" that you can embed into your website:

⚠️ The snippet has to be contextual and explicit about its purpose as WhatsApp Terms of Use indicates ⚠️

“In order to send a WhatsApp message to a person, you must receive opt-in permission in-line and contextually during the relevant user flows. For example, to receive a receipt via WhatsApp, a person must opt in during a purchase flow. Opt-in obtained without context and in any manner not related to an action the user is already taking, does not comply with this policy.“ 

Click on this link to read more about Snippets and how to Get Subscribers!

  1. Or it can happen through a Web Bot:

As an example for this case, we can take our official WhatsApp Demo.

If you go to our WhatsApp API page: https://landbot.io/whatsapp

You'll see we have our Opt-in bot for the WhatsApp Demo.

In this web bot, we specify that "By clicking you are accepting to receive WhatsApp notifications", then we ask for the user's name and company, and most importantly, for their phone numbers.

Of course, all we need is the user's consent and their phone number to be able to send them messages in WhatsApp.

Once we have that, our system automatically sends a pro-active message or HSM Template to the user's WhatsApp.

If you want, this pro-active message will trigger a WhatsApp bot, in this case it's our Demo bot.

Read this article to know more about HSM templates and how to use them!

How do I build an Opt-in bot?

Let's have a look at our example of an Opt-in bot from the inside:

In the bot builder, after the welcome message, we ask for the user's name and company name, then we have a Phone Code Validation brick, which we use to validate the phone code and the phone numbers.

Want to learn more about Bricks? Read this article!

Then we have the most important block for the Opt-in: the Webhook block.

We need to set up the Webhook with:

  • URL: You can find the extended explanation of the URL below
  • Method: GET
  • Send param: yes
  • Variables: include all the variables you want to send to the WhatsApp channel

How to write the correct URL

We need a URL like this one:


W-2-BT7U5A00PX42W8HT is an Id that belongs to the WhatsApp channel.

You can find it in Channels > WhatsApp Business > Click on your WhatsApp business Channel > Get Subscribers > Click on a Snippet or Create a new Snippet

Once you pasted the Id into the URL, you have to know which variables you want to send to the WA channel.

Phone and name the basics variables that you need to have in the URL to realize the Opt-in.


👩‍💻 We're currently working on a Op-tin brick Template, ready to use in your web bots! 👨‍💻

How did we do?

Powered by HelpDocs

Powered by HelpDocs