# Messaging channels

URL: https://docs.assistantcore.com/en/messaging

Connect Telegram, Messenger, Instagram, WhatsApp, Zalo OA, or TikTok Shop so your assistant answers customers' messages, photos, files, and voice messages.

Messaging channels connect a bot, Page, or business account to your assistant. When a customer sends a private message, the assistant replies in the same app, using its knowledge base, memory, and tools.

| Channel | Account ID | Provider login |
| :--- | :--- | :---: |
| Telegram | Bot ID: read from the bot token | No |
| Facebook Messenger | Page ID | Yes |
| Instagram | Instagram professional account ID | Yes |
| WhatsApp Business | Phone Number ID | Yes (Embedded Signup) |
| Zalo OA | Official Account ID | Yes |
| TikTok Shop | Shop ID | Yes |

## Before you begin [#before-you-begin]

- You have the **Assistant Owner** role on the assistant. Messaging is available on every plan.
- You manage the bot, Page, or business account you want to connect.
- For manual setup, you have a developer app at the provider with messaging permissions.
- Each provider account can be connected to only one assistant.

<Callout type="warn">
Every reply uses the assistant owner's credits, at the same rates as other chats. When the owner runs out of credits, customers get a short apology instead of a reply. See [Credits](/en/billing/credits).
</Callout>

## What channels handle [#what-channels-handle]

- **Private chats only.** Telegram group chats are ignored. Replies are plain text; a tool's [result card](/en/tools-mcp/result-cards) is sent as its fallback text with links, without buttons.
- **Photos, files, and voice messages.** The assistant sees photos and reads documents of the types the [Web Widget](/en/web-widget) accepts (up to 10 MB per image, 25 MB per file). Voice messages are transcribed, which also uses the owner's credits. Stickers, shared locations, and links reach the assistant as a short note. Videos and other file types cannot be opened, and the assistant is told so. Photos and files are deleted after 30 days.
- **24-hour reply window.** Messenger, Instagram, WhatsApp, Zalo OA, and TikTok Shop only allow replies within 24 hours of the customer's last message. Telegram has no window. A message that can no longer be answered is **Skipped**; a new message from the customer opens the window again.
- **Telegram context.** Replies to earlier messages, quotes, forwarded messages, shared contacts, and the code in a `t.me/<bot>?start=<code>` link reach the assistant as a short note. Each topic in a private chat is its own conversation. A customer who blocks the bot is **Skipped** until they write again.
- **Telegram `/new` command.** A customer sends `/new` (listed in the bot's command menu) to start a new conversation. The bot confirms right away without using credits; later messages go to the new conversation, and the old one stays in **Conversations**. What the assistant remembers about the customer is kept.
- **Message bursts.** When a customer sends several messages before the assistant answers, they are answered together in one reply. The later events show **Answered with earlier message**.
- **Long replies** are split into several messages to fit the provider's length limit.
- **Conversations.** Each customer gets their own conversation in [Conversations](/en/conversations), labelled with the channel.
- **Tools.** To limit which tools the assistant can use here, set where each tool runs in **Tools** and clear **Messaging**. See [Tools and MCP](/en/tools-mcp).

## Connect a channel [#connect-a-channel]

Every new connection starts paused. It goes live in three steps shown on its card: **Connect the webhook**, **Check the connection**, and **Enable the channel**. Telegram has no webhook step: the check registers the webhook.

<Steps>
<Step>
### Add the connection [#add-the-connection]

1. Open the [Admin Panel](https://admin.assistantcore.com) and select the assistant.
2. Go to **Deploy → Messaging** and select **Add channel**.
3. Choose a channel. Channels with the **Login** badge can be connected by signing in at the provider.
4. Either sign in with the provider or enter credentials manually. See [Provider setup](#provider-setup) for what each channel needs.

Saving checks that the token belongs to the account ID, then shows the connection as **Setup incomplete**.
</Step>

<Step>
### Connect the webhook [#connect-the-webhook]

The webhook is how the provider forwards new messages to Assistant Core.

- **Connected with provider login:** nothing to do. The card says webhooks are delivered through the platform app.
- **Connected manually:** copy the **Webhook URL** from the card and register it at the provider.
- **Telegram:** nothing to do. **Check connection** registers the webhook with Telegram.
</Step>

<Step>
### Check the connection [#check-the-connection]

Select **Check connection**. The result has three lines:

| Line | Result |
| :--- | :--- |
| Account identity | **Passed** when the token works for this account. **Failed** shows the reason. |
| Permissions | **Passed** for Telegram. Other providers show **Confirm at provider**: check the permissions in their console. |
| Webhook | **Confirmed** once the provider verified the URL or sent a message. Until then, **Awaiting verification or inbound event**. For Telegram, **Confirmed** means Telegram kept the webhook the check registered. |
</Step>

<Step>
### Enable the channel [#enable-the-channel]

When the identity check passes (for Telegram, the webhook too), select **Enable** within 15 minutes. After 15 minutes, check again first.

Send a test message from a personal account and confirm that the reply arrives. The card now shows **Live**.
</Step>
</Steps>

Updating credentials pauses the connection, so check and enable it again afterwards.

## Provider setup [#provider-setup]

Open the tab for your channel. Manual setup forms also link to the provider's own guide. Credentials are never shown again after saving. The **Webhook verification secret** is a value you choose, at least 16 characters long, and enter both here and at the provider. Telegram doesn't need one.

<Tabs items={["Telegram","Messenger","Instagram","WhatsApp","Zalo OA","TikTok Shop"]}>
<Tab value="Telegram">
Telegram is connected manually.

1. In Telegram, open [@BotFather](https://t.me/BotFather), send `/newbot`, and copy the token it gives you.
2. In **Add channel → Telegram**, enter a **Connection name** and paste the token as **Access token**.
3. Select **Save connection**, then **Check connection** and **Enable** on the card.

The check also adds the `/new` command to the bot's command menu.

The bot answers private chats only. If the same bot is connected to another service, that service loses its messages when you check here, and the other service can take them back the same way.

Customer messages are answered by an AI model. Telegram requires a privacy policy for bots: set one in @BotFather that says so. Without it, Telegram's standard bot privacy policy applies.
</Tab>

<Tab value="Messenger">
**With login:** select **Continue with Facebook Messenger**, sign in, authorize the app, and choose the Page in **Authorized account**.

**Manually:** enter the **Page ID**, then:

- **Access token**: a Page access token.
- **Webhook verification secret**.
- **App secret**: from your Meta app.
- **Graph API version**, for example `v26.0`.

In your Meta app dashboard, set the callback URL to the card's **Webhook URL**, set the verify token to your webhook verification secret, and subscribe the Page to the `messages` and `message_echoes` fields. `message_echoes` lets the assistant see what staff write, for [staff handoff](/en/staff-handoff).
</Tab>

<Tab value="Instagram">
The account must be an Instagram professional account.

**With login:** select **Continue with Instagram**, sign in, authorize the app, and choose the account. The access token is renewed automatically.

**Manually:** use Instagram Login with the `instagram_business_manage_messages` permission. Accounts that don't have a role on your Meta app need Advanced Access. Enter the **Instagram account ID**, then:

- **Access token**.
- **Webhook verification secret**.
- **App secret**.
- **Graph API version**.
- **Current access token expires at (local time)**. Update credentials before this time.

Set the callback URL and verify token in the Meta app dashboard as for Messenger.
</Tab>

<Tab value="WhatsApp">
WhatsApp uses a Cloud API phone number. A number that also uses the WhatsApp Business App is not supported. Billing stays in WhatsApp Manager.

**With Embedded Signup:**

1. Select **Prepare WhatsApp signup**, then **Connect**, and finish signup in the Meta window.
2. In **Finish connecting**, choose the number and enter:
   - **Phone two-step verification PIN (6 digits)**.
   - **Human support address** that someone monitors: an `https://`, `mailto:`, or `tel:` address.
3. Confirm the business support use case and select **Save connection**.

**Manually:** enter the **Phone Number ID**, then **Access token**, **Webhook verification secret**, **App secret**, **Graph API version**, **WABA ID**, the human support address, and the business support confirmation. Token expiry is optional. Set the callback URL and verify token in the Meta app dashboard.

Every reply ends with a "Human support:" line that contains your support address.
</Tab>

<Tab value="Zalo OA">
Zalo only lets outside apps send and receive messages through its API for a verified OA on the **Growth** plan (2.5 million VND a year, VAT included, under the prices from June 1, 2026) or the **Comprehensive** plan. You pay this to Zalo directly; see [Zalo OA pricing](https://zalo.solutions/oa/pricing).

**With login:** select **Continue with Zalo OA**, sign in, authorize the app, and choose the Official Account. Then enter the **OA secret key**.

**Manually:** enter the **Official Account ID**, then:

- **Access token**.
- **OA secret key**.
- **App ID**.
- **Refresh token** and **App secret for token refresh**.
- **Current access token expires at (local time)**.

Set the card's **Webhook URL** in the Zalo developer console and turn on the events for messages users send: text, image, sticker, GIF, audio (voice), file, video, location, link, and business card.

The access token is renewed automatically.
</Tab>

<Tab value="TikTok Shop">
TikTok Shop needs `seller.customer_service` access approved for your app. Keep the connection paused until the approval arrives and the shop has authorized your app.

**With login:** select **Continue with TikTok Shop**, sign in as the seller, and choose the shop.

**Manually:** enter the **Shop ID**, then:

- **Access token**, **App secret**, **App key**, and **Shop cipher**.
- **Current access token expires at (local time)**.
- **Refresh token** (optional). With it, the access token is renewed automatically.
- The confirmation that the app has approved Customer Service access.

Subscribe the `NEW_MESSAGE` event at the card's **Webhook URL**. The assistant answers buyer messages only; it does not act on orders or refunds.
</Tab>
</Tabs>

## Connection status [#connection-status]

Each connection shows one status:

| Status | Meaning |
| :--- | :--- |
| **Setup incomplete** | Saved, but no successful check yet. |
| **Paused** | Not answering. New messages wait and are answered after you enable the connection, if the reply window is still open. |
| **Live** | Answering customer messages. Select **Pause** to stop. |
| **Action required** | The provider revoked access. Select **Reconnect with login** or **Update credentials**. |
| **Disconnected** | Credentials were erased. Reconnect or update credentials to resume. |

The card also shows **Events needing review**, the access token expiry (as **Token expires soon** within 7 days), and the **Oldest queued event**. **Update credentials** (or **Reconnect with login**) and **Disconnect** are in the **More actions** menu, along with **Check connection** once the connection is live.

## Monitor events [#monitor-events]

Select **Recent events** on a connection to see each incoming message and what happened to it. Filter with **Event status**:

| Status | Meaning |
| :--- | :--- |
| **Queued** | Waiting to be processed. |
| **Processing** | The assistant is writing or sending the reply. |
| **Retry scheduled** | A temporary problem, such as a provider rate limit, or the connection is paused. It is retried automatically, up to 5 attempts. |
| **Accepted by provider** | The provider accepted the reply. Delivery receipts (**Sent**, **Delivered**, **Read**) appear below when the provider reports them. When the assistant could not answer, the customer got a short apology and the reason is shown on the event. |
| **Needs review** | The outcome is uncertain or needs your action. The reason is shown on the event. |
| **Skipped** | Not answered, for example outside the reply window or while staff handle the conversation. Messages staff send from the Messenger or Instagram inbox are listed as **Skipped** too. |
| **Answered with earlier message** | Included in the reply to an earlier message. |

For an event in **Needs review**, read the reason and select **Open conversation** first. Then choose:

- **Retry delivery** sends the saved reply again. The assistant and its tools do not run again. Available only when a reply was saved. A previous attempt may already have reached the customer, so retrying can send a duplicate.
- **Skip event** closes the event without sending anything.

## Staff handoff [#staff-handoff]

The assistant can pass a conversation to your team when a customer asks for a person or your rules say so, and staff reply from [Conversations](/en/conversations). Turn it on in the **Staff handoff** tab of **Conversations**. See [Staff handoff](/en/staff-handoff).

## Renew tokens [#renew-tokens]

- **Renewed automatically:** Zalo OA, TikTok Shop with a refresh token, and Instagram connected with login.
- **Everything else:** before the token expires, select **Update credentials** (manual connections) or **Reconnect with login** (login connections), then check and enable again.

**Disconnect** pauses the channel and erases its stored credentials. Conversation and delivery history stay available. To remove the app's access completely, also remove it in the provider's console.

## Troubleshooting [#troubleshooting]

| Message | Fix |
| :--- | :--- |
| Could not save. Check required fields, credentials format and whether this account is already connected. | Check the fields. If the account is connected to another assistant, disconnect it there first. |
| The token does not belong to the selected account. | The account ID and token don't match. Correct either one. |
| Run Check connection before enabling. | The last successful check is older than 15 minutes. Check again, then enable. |
| The provider did not keep this webhook. Another service may use the same bot; disconnect it there, then check again. | Telegram only. Something changed the bot's webhook during the check. Stop the other service from using the bot, then check again. |
| Access token expired. Update credentials. | Update credentials or reconnect with login. |
| Provider authorization was revoked. Reconnect or replace credentials before enabling. | The account removed the app's access. Reconnect or replace credentials. |
| Reply window expired. | The customer's last message is older than 24 hours. Wait for a new message. |
| The customer blocked the bot or deleted their account. A new message from them resumes replies. | Telegram only. Nothing to do. |
| Assistant owner has insufficient credits. The customer got an apology. | Top up credits or upgrade the plan. The customer's next message is answered. |
| Confirm an eligible business use case and configure human support. | WhatsApp only. Add the support address and confirm the use case. |
| Customer Service approval is required. | TikTok Shop only. Wait for approval before enabling. |

<Cards>
<Card title="Web Widget" href="/en/web-widget" description="Add the assistant to your own website." />

<Card title="Staff handoff" href="/en/staff-handoff" description="Let the assistant pass conversations to your team." />

<Card title="Metrics and traces" href="/en/tracing" description="Inspect each reply's model calls, tools, and credits." />
</Cards>