> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sahut.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Messaging Channels to Sahut

> Step-by-step instructions to connect WhatsApp Business, email, Instagram, Facebook Messenger, Telegram, and live chat to your Sahut inbox.

Connecting a channel lets Sahut receive messages from that platform and route them to your inbox. You can connect multiple channels of the same type — for example, two WhatsApp numbers for different business units.

Only **Admin** users can add or remove channels.

## WhatsApp Business

Sahut connects to WhatsApp through the WhatsApp Business API. You need a WhatsApp Business API account — either through an official Business Solution Provider (BSP) or Meta directly.

<Steps>
  <Step title="Open channel settings">
    Go to **Settings → Channels** and click **Tambah Channel** (Add Channel), then select **WhatsApp Business**.
  </Step>

  <Step title="Enter your API credentials">
    Enter your WhatsApp **Phone Number ID**, **WhatsApp Business Account ID**, and **Permanent Access Token** from your Meta Business account.
  </Step>

  <Step title="Set the webhook">
    Copy the **Webhook URL** shown in Sahut and paste it into your Meta App settings under **WhatsApp → Configuration → Webhook**. Set the **Verify Token** to the value shown in Sahut.
  </Step>

  <Step title="Subscribe to message events">
    In your Meta App webhook settings, subscribe to the `messages` field to start receiving incoming messages.
  </Step>

  <Step title="Save and test">
    Click **Simpan** (Save) in Sahut. Send a test message to your WhatsApp number — it should appear in your inbox within seconds.
  </Step>
</Steps>

<Note>If you're not familiar with the WhatsApp Business API, contact your BSP for your API credentials. Common BSPs in Indonesia include Qontak, Wati, and Zixflow.</Note>

## Email

Connect any email address to Sahut so incoming emails appear as conversations in your inbox.

<Steps>
  <Step title="Add the Email channel">
    Go to **Settings → Channels → Tambah Channel → Email**.
  </Step>

  <Step title="Enter your email settings">
    Provide your email address and IMAP/SMTP credentials:

    | Field         | Description                                                                                       |
    | ------------- | ------------------------------------------------------------------------------------------------- |
    | Email address | The address customers send to (e.g., [support@yourbusiness.com](mailto:support@yourbusiness.com)) |
    | IMAP host     | Your mail server's IMAP hostname                                                                  |
    | IMAP port     | Usually 993 (SSL) or 143                                                                          |
    | SMTP host     | Your mail server's SMTP hostname                                                                  |
    | SMTP port     | Usually 465 (SSL) or 587 (TLS)                                                                    |
    | Username      | Your email login username                                                                         |
    | Password      | Your email login password or app password                                                         |
  </Step>

  <Step title="Save and verify">
    Click **Simpan**. Sahut will send a test email to verify the connection. Check your inbox for the verification message.
  </Step>
</Steps>

<Tip>If you use Gmail, generate an **App Password** instead of your regular password. Go to your Google Account → Security → 2-Step Verification → App Passwords.</Tip>

## Instagram Direct

<Steps>
  <Step title="Connect your Facebook Business account">
    Go to **Settings → Channels → Tambah Channel → Instagram**. Click **Hubungkan dengan Facebook** (Connect with Facebook) and log in with the Facebook account that manages your Instagram Business profile.
  </Step>

  <Step title="Select your Instagram account">
    Choose the Instagram Business account you want to connect from the list.
  </Step>

  <Step title="Grant permissions">
    Accept the requested permissions so Sahut can read and send Instagram Direct messages.
  </Step>

  <Step title="Save">
    Click **Simpan**. New Instagram Direct messages will now appear in your inbox.
  </Step>
</Steps>

<Note>Your Instagram account must be a **Business** or **Creator** account, not a personal account. Convert it in the Instagram app under Settings → Account → Switch to Professional Account.</Note>

## Facebook Messenger

<Steps>
  <Step title="Connect your Facebook Page">
    Go to **Settings → Channels → Tambah Channel → Facebook Messenger**. Click **Hubungkan dengan Facebook** and log in.
  </Step>

  <Step title="Select your Page">
    Choose the Facebook Page you want to connect.
  </Step>

  <Step title="Grant permissions">
    Accept the requested permissions for Messenger access.
  </Step>

  <Step title="Save">
    Click **Simpan**. Messages sent to your Facebook Page will now appear in your inbox.
  </Step>
</Steps>

## Telegram

<Steps>
  <Step title="Create a Telegram Bot">
    Open Telegram and start a chat with **@BotFather**. Send `/newbot` and follow the prompts to create a bot. Copy the **API Token** BotFather gives you.
  </Step>

  <Step title="Add the Telegram channel in Sahut">
    Go to **Settings → Channels → Tambah Channel → Telegram** and paste your Bot API Token.
  </Step>

  <Step title="Save and test">
    Click **Simpan**. Search for your bot in Telegram and send a message — it should appear in your Sahut inbox.
  </Step>
</Steps>

## Live Chat widget

The Live Chat channel lets you embed a chat widget on your website so visitors can message your team directly.

<Steps>
  <Step title="Add the Live Chat channel">
    Go to **Settings → Channels → Tambah Channel → Live Chat**. Give the channel a display name and set your widget color and welcome message.
  </Step>

  <Step title="Copy the embed code">
    After saving, copy the JavaScript snippet shown.
  </Step>

  <Step title="Add the snippet to your website">
    Paste the snippet before the closing `</body>` tag on every page where you want the chat widget to appear.

    ```html theme={null}
    <script>
      window.sahutSettings = {
        websiteToken: "YOUR_WEBSITE_TOKEN"
      };
    </script>
    <script src="https://app.sahut.id/widget/sdk.js" async></script>
    ```
  </Step>
</Steps>
