Table of contents

Official Content

Here you can learn how to setup Twilio in order to use Whatsapp as a messaging platform for the Chatbot generator.

Twilio Sandbox for WhatsApp allows you to prototype with WhatsApp immediately, without waiting for your Twilio number to be approved for WhatsApp.

Step 1 - Creating an account

First, create a new account at Twilio.


You'll be asked to verify your email:


Then, you'll be asked to verify your phone number:


Step 2 - Joining the sandbox

You'll have to go through some steps:



Here you can skip to dashboard:


Then go through  "All Product & Services" and select "Programmable Messaging". In a new window that appears, you have to select "WhatsApp" and it asks you if you want to activate the Sandbox.

To activate the sandbox, a page like this one appears:


Select a number from the available sandbox numbers:


There's a learn tutorial that you can follow easily.

The sandbox is pre-provisioned with a Twilio phone number.
Send “join <your sandbox keyword>” to your Sandbox number in WhatsApp to join your Sandbox.


After joining, you will receive a message from the sandbox:


See here for more details.

Step 3 - Configuring inbound message webhooks

When customers send you a WhatsApp message, Twilio sends a webhook to your application.

On the sandbox page you have to configure the URL that Twilio sends a webhook to for inbound messages.

The Chatbot generator creates a webhook (see HowTo: Integrate Chatbots using WhatsApp), under the instance's module. 

After building it, configure the URL as follows:

http://<server>/<baseURL>/<InstanceModule>.WhatsappWebhook.aspx (.NET) or http://<server>/<baseURL>/<InstanceModule>.WhatsappWebhook (Java)

This has to be configured by going through Programmable Messaging > Settings > Whatsapp sandbox settings. Note that the computer where the webhook is hosted, has to be visible from Internet:


Step 4 - Configuration Settings

In the console page, you have the Account SID and an Authorization Token. These credentials are needed to the interaction with Twilio

Account SID - Used to identify yourself in API requests
Auth Token  - Used to authenticate REST API requests



The Auth Token is the information needed when you send messages through Twilio. This is the information to be configured in the WebHook


If you joined your Sandbox > 24 hours ago, you will need to send a fresh inbound message to your WhatsApp number in order to then send yourself a media message. Otherwise, you'll get the "ERROR - 63016
Failed to send freeform message because you are outside the allowed window. Please use a Template."

Last update: November 2023 | © GeneXus. All rights reserved. GeneXus Powered by Globant