logo
icon

OpenAB Gateway

Standalone webhook gateway for OpenAB — bridges Telegram and/or LINE to any running OAB instance via WebSocket. Deploy alongside an existing OpenAB service to enable Telegram and/or LINE support. At least one platform must be configured. Source: https://github.com/openabdev/openab

template cover
Deployed3 times
PublisherzeaburZeabur
Created2026-04-25
Tags
AIDeveloper ToolsTelegramLINE

OpenAB Gateway

OpenAB Gateway is a standalone webhook bridge that connects Telegram and LINE to any running OpenAB instance via WebSocket.

Telegram ──POST──▶ ┌──────────────────┐
LINE     ──POST──▶ │  OpenAB Gateway  │ ◀──WebSocket── OAB Pod
                   │     :8080        │   (OAB connects out)
                   └──────────────────┘

Deploy this template alongside an existing OpenAB service (Claude, Cursor, Codex, etc.) to add Telegram and LINE support without redeploying OAB.

Prerequisites

  • A running OpenAB service (any variant) in the same Zeabur project
  • At least one of the following:
    • A Telegram bot token from @BotFather
    • A LINE Official Account with Messaging API enabled (LINE Channel Secret + Access Token)

Setup

1. Create a Telegram Bot

  1. Open @BotFather in Telegram
  2. Send /newbot and follow the prompts
  3. Copy the bot token (e.g. 123456:ABC-DEF...) → paste into Telegram Bot Token
  4. Optional: send /setprivacyDisable so the bot sees all group messages

2. Deploy

Fill in the tokens for the platform(s) you want to enable and click deploy. A public HTTPS domain is auto-assigned. You can enable Telegram only, LINE only, or both.

3. Register the Telegram Webhook

After deployment, register your gateway URL with Telegram (replace YOUR_TOKEN, YOUR_DOMAIN, and optionally YOUR_SECRET):

# Without webhook secret (simpler, less secure)
curl "https://api.telegram.org/botYOUR_TOKEN/setWebhook?url=https://YOUR_DOMAIN/webhook/telegram"

# With webhook secret (recommended — matches TELEGRAM_SECRET_TOKEN you set)
curl "https://api.telegram.org/botYOUR_TOKEN/setWebhook?url=https://YOUR_DOMAIN/webhook/telegram&secret_token=YOUR_SECRET"

Expected response: {"ok":true,"result":true,"description":"Webhook was set"}

4. Configure OAB to Use the Gateway

In your OpenAB service (same Zeabur project), edit /home/agent/.config/openab/config.toml and add:

[gateway]
url = "ws://openab-gateway:8080/ws"

Then restart the OpenAB service. OAB connects outbound to the gateway — no inbound ports needed on OAB.

Internal hostname: openab-gateway resolves within the same Zeabur project via internal DNS. If your gateway service has a different name, use that name instead.

5. Test

Send a message to your Telegram bot. The gateway receives it and forwards it to OAB via WebSocket. OAB processes it and replies through the gateway.

LINE Setup (Optional)

1. Create a LINE Official Account

  1. Go to LINE Official Account Manager and create a new account
  2. SettingsMessaging APIEnable Messaging API
  3. Open LINE Developers Console → your channel:
    • Basic settingsChannel secret → copy → paste into LINE Channel Secret
    • Messaging APIChannel access token → Issue → copy → paste into LINE Channel Access Token

2. Set Webhook URL

In LINE Developers Console → Messaging API tab:

  1. Webhook URL → Edit → enter: https://YOUR_DOMAIN/webhook/line
  2. Use webhook → ON
  3. Auto-reply messages → OFF
  4. Click Verify

3. Configure OAB for LINE

In config.toml, add platform = "line" to the gateway section:

[gateway]
url = "ws://openab-gateway:8080/ws"
platform = "line"

Restart the OpenAB service after saving.

Webhook Endpoints

PathPlatform
POST /webhook/telegramTelegram
POST /webhook/lineLINE
GET /wsOAB WebSocket (internal)
GET /healthHealth check