DOCS/CHANNELS~ 12 MIN READ

CHAPTER 03 Β· CHANNELS

Connect every channel
in one inbox.

Telegram, WhatsApp Cloud, Facebook Messenger and Instagram DM β€” wired end-to-end. Every step below is verified against the live Meta dashboards and the Telegram Bot API. Where Meta calls something one thing and we call it another, we say both.

Β§ 00What you'll need

Each channel takes 5–20 minutes to wire up. You'll do the work in two places: the channel's own developer console (Telegram's BotFather, Meta's Developer Dashboard) and the Channels screen inside your EasyLiveChat workspace at app.livechattools.com/channels.

All four channels share the same architecture in EasyLiveChat β€” one normalised Conversation per contact, one inbox, one reply box. The differences are in the credentials each provider requires and in their webhook signing scheme.

SHARED CONCEPTS

  • Webhook URL. EasyLiveChat generates one per integration: https://api.livechattools.com/api/channels/webhook/{channel}/{integration-id}. Lowercase channel name. You paste this URL into the provider's dashboard.
  • Verify token. The provider does a one-time GET handshake to your webhook URL with this token; we echo their challenge if it matches. EasyLiveChat auto-generates one when you create the integration β€” open Integration settings.
  • App Secret (Meta channels only). Meta signs every webhook POST with x-hub-signature-256 keyed on the Meta App's App Secret β€” not the verify token. You'll paste it once when creating the WhatsApp / Messenger / Instagram integration.

Β§ 01Telegram

The simplest channel to set up. Telegram doesn't need a developer app or a business account β€” just a bot. Bot tokens last forever and the entire integration takes about five minutes.

1. Create a bot with BotFather

Open Telegram and start a chat with @BotFather. Send /newbot, pick a display name and a username ending in bot. BotFather replies with a token shaped like 1234567890:ABCdefGHI…. Copy it.

2. Connect it in EasyLiveChat

In your workspace go to Channels β†’ Telegram Bot β†’ Connect. Paste the bot token. Pick any display name β€” it's only shown inside the inbox. Submit.

Open Integration settings on the newly-created row to reveal the Webhook secret and the integration's callback URL.

3. Point Telegram at our webhook

Telegram's Bot API has no UI for webhooks; you set them via setWebhook. Replace the placeholders below with your bot token, integration ID and webhook secret, then run it once:

bashregister Telegram webhook
curl -X POST "https://api.telegram.org/bot${BOT_TOKEN}/setWebhook" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://api.livechattools.com/api/channels/webhook/telegram/${INTEGRATION_ID}",
    "secret_token": "${WEBHOOK_SECRET}",
    "allowed_updates": ["message", "edited_message"]
  }'

Telegram responds {"ok":true,"description":"Webhook was set"}. . Verify with getWebhookInfo β€” β€” the pending_update_count should drop to 0.

4. Test

Open t.me/yourbot_username in Telegram, tap Start, send any message. It should appear in your EasyLiveChat inbox in less than a second with the sender's name and language code. Reply from the dashboard β€” it'll arrive on the visitor's Telegram a moment later.

Β§ 02WhatsApp Cloud

Meta Cloud API is the right choice for almost everyone β€” fully hosted, free for up to 1,000 service conversations a month, and the only WhatsApp transport that needs zero infrastructure on your side. Setup is heavier than Telegram because Meta requires a developer app and a verified business portfolio for production traffic.

1. Create a Meta developer app

Go to developers.facebook.com/apps β†’ Create App. Pick a name, an email, then on the next screen select the use case β€œConnect with customers through WhatsApp”. Attach a Business Portfolio β€” either an existing one or Meta's built-in Test Business for evaluation.

After the app is created, open Use Cases β†’ Connect on WhatsApp β†’ API Setup. You'll see a Phone Number ID (the test number Meta provides for free, or your own once added) and a button to Generate access token. Click it, approve, and copy the resulting token. Also copy the Phone Number ID.

Token lifetime. The Generate-button token is short-lived (about 24 hours). For production, create a System User in Business Settings β†’ Users β†’ System Users, assign the WhatsApp Business Account, and generate a never-expiring token with the whatsapp_business_messaging and whatsapp_business_management permissions.

2. Grab the App Secret

In the same Meta dashboard, open App settings β†’ Basic. The App Secret is hidden behind a Show button β€” reveal and copy. This is the HMAC key Meta uses to sign every webhook POST. Without it your inbound messages will be rejected as BAD_SIGNATURE.

3. Connect WhatsApp in EasyLiveChat

Channels β†’ WhatsApp Cloud β†’ Connect. Fill in the display name (free-form), the Phone Number ID, the Access Token, and the App Secret. Submit. Open the integration's settings to copy the auto-generated webhook secret and integration ID.

4. Configure Meta's webhook

Back in Meta's dashboard, go to Use Cases β†’ Connect on WhatsApp β†’ Configuration. Paste:

configWhatsApp webhook configuration in Meta
Callback URL : https://api.livechattools.com/api/channels/webhook/whatsapp/${INTEGRATION_ID}
Verify token : ${WEBHOOK_SECRET}

Click Verify and save. Meta sends a GET handshake β€” we echo their challenge if the verify token matches. On the same page, find the Webhook fields list and toggle messages to Subscribed. Without this toggle Meta accepts the webhook URL but never delivers anything to it.

5. Add a test recipient (sandbox only)

If you're using Meta's free test number, you must allow-list each recipient before you can send to them. In API Setup β†’ To, add the phone number you'll be messaging from β€” Meta SMSs a 6-digit OTP to verify. You can allow-list up to five test recipients. Real business numbers don't have this restriction.

Β§ 03Facebook Messenger

Messenger uses the same Meta App, App Secret and webhook plumbing as WhatsApp β€” but it talks to a Facebook Page instead of a phone number, and access tokens are Page Access Tokens, not WhatsApp Business tokens.

1. Add Messenger to your Meta app

In the same app you used for WhatsApp (or a fresh one), open Use cases β†’ Add use cases β†’ filter Business messaging β†’ Engage with customers on Messenger from Meta. Save. The app now has two products side-by-side.

2. Connect a Facebook Page

Open Messenger from Meta β†’ Messenger API Settings. Under Generate access tokens, click Connect next to No FB pages yet. Meta asks which Pages to grant access to β€” pick the one you want to receive messages on, accept the permissions, save.

The Page now appears with a one-click Page Access Token and a Page ID. Copy both. The Page ID is also the value you'll paste as pageId in EasyLiveChat.

3. Connect Messenger in EasyLiveChat

Channels β†’ Messenger β†’ Connect. Fill Page ID, Page Access Token and the same App Secret you used for WhatsApp. Submit and copy the new integration's webhook secret + ID.

4. Two-layer webhook subscription

Messenger has a quirk WhatsApp doesn't: it needs two subscriptions to deliver anything. First the app-level subscription β€” in Messenger API Settings β†’ Configure webhooks paste:

configMessenger app-level webhook config
Callback URL : https://api.livechattools.com/api/channels/webhook/messenger/${INTEGRATION_ID}
Verify token : ${WEBHOOK_SECRET}

Click Verify and save, then expand Webhook fields and toggle messages on. Then the Page-level subscription, which you can't do from the UI β€” run this curl:

bashsubscribe the Page to the app
curl -X POST "https://graph.facebook.com/v20.0/${PAGE_ID}/subscribed_apps" \
  -d "subscribed_fields=messages,messaging_postbacks,message_deliveries,message_reads" \
  -d "access_token=${PAGE_ACCESS_TOKEN}"

Without the Page-level subscribe, Meta returns {"success":true} on the app subscription but never actually fires the webhook. You can confirm everything is wired by querying:

bashverify both subscription layers
curl "https://graph.facebook.com/v20.0/${APP_ID}/subscriptions?access_token=${APP_ID}|${APP_SECRET}"

The response should list an object of type page with a non-empty fields array including messages.

Β§ 04Instagram DM

Instagram messaging rides on the same Messenger Platform pipes but adds two requirements: the Instagram account must be a Business account (not personal or Creator), and it must be connected to a Facebook Page in the same Business Portfolio. Once both are true, your Page Access Token is also your Instagram access token.

1. Convert the IG account to Business

On the Instagram mobile app: Settings β†’ Account β†’ Switch to professional account β†’ Business. Pick any category. The conversion is reversible.

2. Add the IG account to your Business Portfolio

In Meta Business Suite Settings β†’ Accounts β†’ Instagram accounts β†’ Add β†’ log in with the IG credentials. Meta confirms and shows the IG account's Instagram Business Account ID β€” a 17-digit number starting with 1784…. Copy it; this is your pageId for the EasyLiveChat integration.

3. Link IG to the Facebook Page

This is the most-missed step. Open the Facebook Page's Inbox in Meta Business Suite β€” business.facebook.com/latest/inbox?asset_id={page_id}. A banner reads β€œConnect to Instagram” with a Connect button. Click it, log into Instagram, grant the requested permissions, confirm. After this Meta's Graph API will start answering questions about the IG account scoped to the Page's access token.

4. Connect Instagram in EasyLiveChat

Channels β†’ Instagram DM β†’ Connect. Use the IG Business Account ID from step 2 as pageId, the same Page Access Token you used for Messenger as pageAccessToken, and the same App Secret as before.

5. Subscribe at both layers

Instagram uses object=instagram for app-level webhooks (Messenger used object=page. ). Add this curl on top of the Messenger subscription you already have:

bashsubscribe the app to Instagram messages
curl -X POST "https://graph.facebook.com/v20.0/${APP_ID}/subscriptions" \
  -d "object=instagram" \
  -d "callback_url=https://api.livechattools.com/api/channels/webhook/instagram/${INTEGRATION_ID}" \
  -d "verify_token=${WEBHOOK_SECRET}" \
  -d "fields=messages,messaging_postbacks,message_reactions" \
  -d "access_token=${APP_ID}|${APP_SECRET}"
Development-mode delivery rules. While your Meta app is unpublished, Meta only delivers Instagram webhook events from senders who are app admins, developers or testers. Random DMs from real users are silently dropped. To test with someone outside your team, add them as a Tester in App Dashboard β†’ Roles β†’ Roles and have them accept the invite. To accept any sender, you have to publish the app via App Review.

Β§ 05Troubleshooting

401 Β· BAD_SIGNATURE

Meta's POST signature didn't match. You almost certainly pasted the wrong value into the App Secret field β€” it must be the Meta App's App Secret from App settings β†’ Basic, not the verify token and not a Page Access Token. Open Integration settings in EasyLiveChat and check that the masked App Secret value is 32 hex characters.

404 Β· UNKNOWN_CHANNEL

The channel segment in the URL doesn't match a known adapter. Lowercase it ( /whatsapp/ not /WHATSAPP/) β€” although the route is case-insensitive, some intermediaries normalise differently.

handshake passes, no messages arrive

For Meta channels, run the subscriptions check above. If the relevant object (page or instagram or whatsapp_business_account) has an empty fields array, the app is registered but not subscribed to any events β€” re-toggle messages in the Webhook fields list.

access token expired (Meta)

Tokens from Generate access token in the Meta dashboard or from Graph API Explorer live about 24 hours. For anything beyond a demo, provision a System User and generate a non-expiring token with the right Page or WhatsApp Business Account permissions.

Telegram delivers nothing

Run getWebhookInfo β€” the response includes a last_error_message field. Common values: β€œ404 Not Found” (wrong integration ID in the URL), β€œSSL handshake failed” (proxy / certificate issue).

Was this article useful?

Suggest an edit β†—