Skip to main content

Set Up Your WhatsApp Channel with WhatsApp Cloud API

Hoory AI supports the official WhatsApp Business API. You can connect the phone number and start managing your WhatsApp customer queries from Hoory AI. Follow the steps given below to enable your WhatsApp channel with WhatsApp Cloud API.

Prerequisites​

1. Configure your Facebook Developer App​

First, you need to create a Meta app with the WhatsApp product enabled. Go to the WhatsApp Cloud API Get Started guide and follow the steps to create a new app with the Connect with customers through WhatsApp use case and connect it to your WhatsApp Business account.

Once you finish this step, you can configure your phone numbers in the WhatsApp → API Setup section of your app. There you can find the Phone number ID and WhatsApp Business Account ID as shown in the screenshot below. Hoory AI will require these values for creating the WhatsApp channel.

WhatsApp Section Developer App

2. Create a System User and Generate a Permanent Access Token​

Create a system user in your Meta Business settings and generate an access token for it. This token is the API key Hoory AI uses to send and receive messages. See Meta's guide on creating a system user and generating a permanent access token for details.

Step 1. In Business settings, go to Users → System users, click Add and create a new system user.

Step 2. Select the system user and click Assign assets:

  • Select your app and enable Manage app under Full control.
  • Select your WhatsApp account and enable Manage WhatsApp Business accounts under Full control.
  • Click Assign assets.

Add System user

Step 3. Click Generate token, select your app and add the following permissions:

  • business_management
  • whatsapp_business_management
  • whatsapp_business_messaging

Generate Token

Copy the token and store it in a secure place.

tip

Do not use the temporary access token from the WhatsApp API Setup page. It expires quickly and your channel will stop working when it does. Always use the system user token.

Refer to this video for detailed steps.

Set Up the WhatsApp Channel in Hoory AI​

Step 1. Open your Hoory AI dashboard. Go to Settings → Channels and click Create New Channel.

Add Channel

Step 2. Click the "WhatsApp" icon.

Select Channel

Step 3. Choose "WhatsApp Cloud" as the API Provider and fill in the channel details.

Choose Provider

InputDescription
Channel NameChoose a name for your channel, e.g. your business name.
Phone numberThe phone number you have configured in the Facebook Developer app. Enter it in E.164 format, starting with a + sign and without spaces (for example, +14155550100). A phone number can be connected to only one channel.
Phone number IDThe phone number ID obtained in the prerequisites.
Business Account IDThe WhatsApp Business Account ID obtained in the prerequisites.
API keyThe system user's access token obtained in the prerequisites.

Click Create WhatsApp Channel. Hoory AI checks your credentials with Meta before creating the channel, so if any of the values are wrong you will see an error and the channel will not be created.

Step 4. Add agents to your channel. Select at least one agent in the Agents field. Only the selected agents will have access to this channel.

Step 5. Your channel is ready! The final screen shows the Webhook URL and the Webhook Verification Token for your channel. Hoory AI generates the verification token for you. Copy both values, as you will need them in the next step.

Enable the Webhook​

In the App Dashboard, open your app and go to WhatsApp → Configuration. In the Webhook section, set up the following:

  • Callback URL: the Webhook URL shown at the end of your Hoory AI channel creation. It will look like https://app.hoory.com/webhooks/whatsapp/+{phone_number}.
  • Verify token: the Webhook Verification Token shown at the end of your Hoory AI channel creation.

Click Verify and save. Then, under Webhook fields, subscribe to the messages field. Without this subscription you will not receive incoming messages in Hoory AI.

Once you finish all the steps, the section should look like the following screenshot.

Webhook Section

You can find the verification token again at any time: go to Settings → Channels, click the ⚙️ icon next to your WhatsApp channel and open the Configuration tab. The same tab lets you update the API key if you generate a new access token.

FAQ​

How to configure multiple numbers under a single Facebook app?​

The Facebook app allows configuring only a single webhook endpoint. So, create channels in Hoory AI for all the numbers, as required. You only need to configure the Webhook URL and verification token of one of these channels in the Facebook app. Hoory AI routes each incoming message to the right channel using the phone number in the message.

Additional Channel Settings​

Your freshly configured WhatsApp channel should now appear in your list of channels. To see it and to make additional settings in your WhatsApp channel, go to Settings → Channels → click the gear icon on the associated WhatsApp channel.

All the additional settings available are the same as those in your Facebook channel. We recommend going through this link to understand the same.

24-Hour Messaging Window and Templates​

WhatsApp only lets businesses send free-form messages within 24 hours of the customer's last message. After that, agents can only send an approved message template. Hoory AI shows a banner in the conversation when the window has closed.

  • Hoory AI syncs your approved templates from your WhatsApp Business account when the channel is created, and then automatically every few hours. New or edited templates may take a few hours to appear.
  • To send a template, click the WhatsApp Templates icon in the reply box, pick a template and fill in its variables.
  • Only templates with text content are available. Templates with an image or video header are not shown.

To create or edit templates, use WhatsApp Manager.

Supported Message Types​

Hoory AI receives text, image, sticker, audio and voice, video, document, location and contact messages, as well as button and list replies. Reactions and disappearing (ephemeral) messages are not supported and will not appear in Hoory AI.

Supported Media Types​

Supported extensionsEnd userAgent Dashboard
Audio
audio/aacSupportedSupported
audio/mp4SupportedSupported
audio/mpegSupportedSupported
audio/amrSupportedSupported
audio/oggSupportedSupported
Document
text/plainSupportedSupported
application/pdfSupportedSupported
application/vnd.ms-powerpointSupportedSupported
application/mswordSupportedSupported
application/vnd.ms-excelSupportedSupported
application/vnd.openxmlformats-officedocument.wordprocessingml.documentSupportedSupported
application/vnd.openxmlformats-officedocument.presentationml.presentationSupportedSupported
application/vnd.openxmlformats-officedocument.spreadsheetml.sheetSupportedSupported
Image
image/jpegSupportedSupported
image/pngSupportedSupported
Video
video/mp4SupportedSupported
video/3gpSupportedNot Supported
Sticker
image/webpSupportedNot Supported