Solved Whatsapp Trunk

Status
Not open for further replies.

Mistral Versteeg

Silver Partner
Advanced Certified
Joined
Sep 18, 2023
Messages
13
Reaction score
1
Hi,

I've got a new question about a the whatsapp trunk.
I configured 3 phone numbers on facebooks end.

When I want to configure them to 3CX, how I view it is that I have to create a seperate trunk for each phone number, but the whatsapp application can only handle one Webhook.

How can I configure it so all 3 phone numbers will work at the same time?
I've got them working seperately. (one at a time)
 
Last edited:
If I understand correctly, you've configured three phone numbers on Facebook's end for WhatsApp messaging, and are encountering a limitation where the WhatsApp application in Meta for Developers only allows one Webhook URL. You're correct that you need to create a separate "trunk" in 3CX for each phone number.

The key to making all three phone numbers work simultaneously is to ensure that each WhatsApp phone number is associated with its own distinct WhatsApp Application within the Meta for Developers portal. The 3CX integration guide outlines the process for setting up a single WhatsApp number. To integrate multiple numbers, you will need to repeat this process for each number.

Here's how you can configure it so all three phone numbers work at the same time:

1. For each WhatsApp Phone Number, create a separate WhatsApp Application in Meta for Developers:
* Navigate to [https://developers.facebook.com](https://developers.facebook.com) and log in.
* Go to 'My Apps', click on "Create App", select "Business" for the app type, and click "Next".
* Give your application a unique display name (e.g., "WhatsApp Number 1", "WhatsApp Number 2", "WhatsApp Number 3") and select your business account. Click "Create app".
* Scroll down to WhatsApp and click "Set up".
* In the "Welcome to the WhatsApp Business Platform" section, click "Start Using the API".
* Use the drop-down menu to choose one specific phone number for this application. Copy its 'Phone number ID' and save it.
* Follow Step 3: Set up an Admin Role and Step 4: Generate a New Token from the 3CX WhatsApp configuration guide for this specific WhatsApp Application and phone number. Make sure to generate a new, permanent access token for each application.

2. Configure a separate WhatsApp Trunk in 3CX for each phone number:
* Log into your 3CX Web Client.
* Navigate to "Admin" > "Voice & chat" and then click on "+ Add WhatsApp".
* Edit the default name to reflect the specific WhatsApp number (e.g., "WhatsApp Trunk 1").
* Enter the WhatsApp account phone number (in international format, e.g., +447732456789) that you associated with the first WhatsApp Application in Meta.
* Copy the Webhook URL that 3CX generates for this specific trunk.
* Paste the Access Token you obtained for this specific WhatsApp Application.
* Enter the Phone number ID you obtained for this specific WhatsApp Application.
* Click "Save".

3. Configure the Webhook in the corresponding WhatsApp Application in Meta for Developers:
* Go back to the Meta for Developers portal and locate the specific WhatsApp Application you created for the first phone number.
* Navigate to "WhatsApp" > "Configuration" and paste the 3CX WhatsApp webhook URL you copied from the 3CX trunk configuration.
* Enter a random string of letters and numbers for the "Verify token". Click "Verify and save".
* In the "Webhook fields", switch the toggle to "Subscribed" for "messages".

4. Repeat steps 1-3 for each of your remaining WhatsApp phone numbers.
* For your second phone number, create a new, distinct WhatsApp Application in Meta for Developers.
* Associate the second phone number with this new application.
* Create a second WhatsApp trunk in 3CX, using the details (phone number, Phone Number ID, Access Token) from this second WhatsApp Application.
* Configure the webhook in the second WhatsApp Application with the unique Webhook URL generated by the second 3CX trunk.
* Do the same for your third phone number.

By following these steps, each of your three WhatsApp phone numbers will have its own dedicated WhatsApp Application in Meta for Developers, each with its own webhook configuration pointing to a unique 3CX WhatsApp trunk. This allows all three numbers to work simultaneously for messaging within your 3CX system.
 
Thank you for the information.
The thread can be closed.
 
  • Like
Reactions: KyriacosS_3CX
Status
Not open for further replies.