Automate tasks with Whatsapp Business Cloud API
Send and receive messages using WhatsApp.
https://developers.facebook.com/docs/whatsapp/cloud-api/
Triggers
The trigger is the event that starts the automation.
-
Instantly if bot receives a text message
It is triggered every time a user sends a text mmessage to the bot.
-
Instantly if a user presses a button
It is triggered every time a user clicks on the buttons attached to the posts of a chat.
-
Instantly if a user select an option list
It is triggered every time a user selects an option from the list that accompanies a chat post.
-
Instantly if bot receives an image
It is triggered every time a user sends an image to the bot.
-
Instantly if bot receives a voice message
It is triggered every time a user sends a voice message to the bot.
-
Instantly if bot receives a video
It is triggered every time a user sends a video to the bot.
-
Instantly if bot receives a document file
It is triggered every time a user sends a document file to the bot.
-
Instantly if bot receives a location
It is triggered every time a user sends a location to the bot.
Actions
The action is what happens automatically, without you having to do anything else.
-
Send a text message
Send a text-based message to a phone number.
-
Retrieve media URL
Returns the URL corresponding to a received file.
-
Send a text message template
Send a text-based message template to a phone number.
-
Send a message template with buttons
Send a button-based message template to a phone number.
-
Send a template with image
Send a text-based message template with an image to a phone number.
-
Ask user
Send a message, an image/video/document or both to a specific chat and wait for the user's response before continuing.
- The following tags are currently supported in the messages: b, strong , i, em, u, ins, s, strike, del, a, code, pre.
- You can include URL Buttons and Callback Buttons in posts.
-
Ask the user for a location
Send a message, an image/video/document or both to a specific chat and wait for the user's response by sending a location.
- The following tags are currently supported in the messages: b, strong , i, em, u, ins, s, strike, del, a, code, pre.
Tutorials
Guide to obtain the credentials to automate WhatsApp Cloud API.
Frequently Asked Questions
Facebook shows the error 'You must provide a valid privacy policy URL to publish your app'
This error occurs when attempting to change the WhatsApp application from 'Development' mode to 'Live' mode in your Facebook panel (https://developers.facebook.com).
Before Facebook allows this change, you must first go to the 'Basic Settings' section on Facebook and provide the URL for the web page where your privacy policy is located.
You must have a web page with a privacy policy section in order for Facebook to accept the transition to 'Live' mode.
Facebook shows the error 'Invalid privacy policy URL'
This error means that the privacy policy URL that you have provided in Facebook, within the basic settings of the WhatsApp Business application, is not valid.
This is a requirement of WhatsApp to ensure that users of your bot have access to your company's privacy policy and can consult it before using it.
As a result, the application that you have created on Facebook to access the WhatsApp Cloud Business API cannot be activated, remaining in 'developer' mode, which prevents your bot from receiving messages from other users and processing them.
To solve this problem, you must indicate in Facebook, within the 'Basic Configuration' section of your application, the URL of your business website corresponding to the section or subsection where the privacy policy is explained.
How do I get 'Phone Number Id'?
Access to https://developers.facebook.com and enter the WhatsApp application that you have created. In the left column, click on the 'WhatsApp' section and in the 'Getting started' subsection.
The phone number Id will be indicated on the right with the name 'Phone number ID' label.
What does the 'Recipient phone number not in allowed list' error mean?
This error indicates that the phone number to which the bot is trying to send a message is not on the authorized recipients list on Facebook.
To fix this, you need to add the recipient's phone number to the authorized recipients list from the WhatsApp Cloud API settings section on Facebook.
To avoid having to add phone numbers in advance, put your Facebook application in 'Live' mode on the Facebook Developer Console, from https://developers.facebook.com.
How does the billing system for conversations on WhatsApp Cloud Business work?
WhatsApp Cloud Business bills each conversation between a bot and a user according to the corresponding category. The categories that WhatsApp currently handles are: utility conversations, authentication conversations, marketing conversations, and service conversations.
Rates may vary depending on the country where the service is being used. For up-to-date information on conversation categories and rates, it is recommended to visit the official Facebook pricing page.
My WhatsApp bot messages are appearing duplicated
If your bot is responding repeatedly or duplicating messages, it's generally because you have 2 or more WhatsApp applications with the same webhook in your Facebook developer account. Go to https://developers.facebook.com and ensure you have only one WhatsApp application.
How many bots or WhatsApp numbers can I register with Botize?
There is no limit to the number of bots or WhatsApp numbers you can register with Botize. This applies even with our free plan. The only limitation from Botize to keep in mind is the number of monthly operations you can perform across all your bots. This limit varies depending on the Botize plan you're subscribed to.
How can I see the conversations or chats my bot has with users?
WhatsApp does not provide any tools to view the conversations that a bot has with users. However, Botize does keep a copy of all conversations that bots have during the last few hours. You can check them here: https://botize.com/en/bots
What is the response window or duration of conversations?
The duration of the conversation window refers to the time a user has to respond to a message sent by a chatbot. In WhatsApp, this period is 24 hours, which means that if the bot does not receive a response from the user within this timeframe, the conversation is considered finished.
After this time, the bot will no longer be able to interact normally with the user. However, if necessary, the bot will be able to send WhatsApp-approved message templates. These templates allow the bot to maintain some communication with the user, although not interactively.
What is the difference between WhatsApp Cloud API and WhatsApp Business API?
WhatsApp offers two systems: WhatsApp Cloud API and WhatsApp Business API. WhatsApp Cloud API is the solution hosted on Meta's servers, while WhatsApp Business API requires its own infrastructure or external providers (BSPs) for operation. Botize only has access to WhatsApp Cloud API, and the process to connect it to Botize is available in our video tutorial.
Common Errors
No incoming WhatsApp messages found
To activate this task, send a message to the bot from your WhatsApp application.
In case you are sending messages from the WhatsApp application to the bot, and it is not responding, there are several reasons why the WhatsApp Business API may stop notifying the messages it receives to your Bot.
- Incorrect webhook: The webhook you need to specify is https://botize.com/callbacks/whatsapp
- Application in developer mode: Access https://developers.facebook.com and check that your application is in 'Active' mode. If, on the other hand, your application appears in 'Developer' mode, it means that WhatsApp will only take into account messages it receives from phone numbers you have expressly indicated in the configuration.
Put your application in 'Active' mode, and your automated tasks should respond to all messages.
If this is not the case, please contact us via email or Telegram so that we can review your case.