Webex
Community Webex adapter for Chat SDK. Supports spaces, threads, adaptive cards (buttons, selects, fields, sections), modals, and webhook signature verification.
Community adapter. Not maintained by Vercel or Chat SDK contributors. For feature requests, bug reports, and support, file an issue on the adapter's repo.
Install
pnpm add chat @bitbasti/chat-adapter-webexQuick start
import { Chat } from "chat";
import { createWebexAdapter } from "@bitbasti/chat-adapter-webex";
const bot = new Chat({
userName: "mybot",
adapters: {
webex: createWebexAdapter({
botToken: process.env.WEBEX_BOT_TOKEN,
webhookSecret: process.env.WEBEX_WEBHOOK_SECRET,
}),
},
});
bot.onNewMention(async (thread, message) => {
await thread.post(`Hello from Webex! You said: ${message.text}`);
});Environment variables
| Variable | Required | Description |
|---|---|---|
WEBEX_BOT_TOKEN | Yes | Bot access token from the Webex Developer Portal |
WEBEX_WEBHOOK_SECRET | Recommended | Shared secret for webhook signature verification |
WEBEX_BASE_URL | No | Override the Webex API base URL (default: https://webexapis.com/v1) |
WEBEX_BOT_USERNAME | No | Override the bot display name |
Configuration
Prop
Type
Platform setup
- Go to the Webex Developer Portal and sign in.
- Navigate to My Webex Apps → Create a New App → Create a Bot.
- Fill in the bot name, username, and icon, then click Add Bot.
- Copy the Bot Access Token — this is your
WEBEX_BOT_TOKEN. Store it securely; it is only shown once. - Create a webhook pointing to your server:
- Target URL:
https://your-domain.com/api/webhooks/webex - Resource:
messages| Event:created - Resource:
attachmentActions| Event:created - Secret: a random string — this is your
WEBEX_WEBHOOK_SECRET
- Target URL:
- Add the bot to a Webex space and mention it to verify the integration.
See the Webex Webhooks Guide for details on webhook registration.
Capabilities
- Mentions and DMs
- Rich text (bold, italic, code, links) via Markdown
- Adaptive Cards — buttons, selects, radio selects, fields, sections
- Modals — form cards with submit/close actions
- File uploads (single file per message)
- Thread support via parent IDs
- Webhook signature verification (HMAC-SHA1)
Limitations
- Reactions are not supported by Webex bot tokens —
addReaction/removeReactionthrowNotImplementedError. - Typing indicators are not available in the Webex Messaging API.
- Only one file upload per message is supported.
- Cards and file uploads cannot be combined in the same message.
Feature support
Messaging
| Feature | Supported |
|---|---|
| Post message | |
| Edit message | |
| Delete message | |
| File uploads | 1 file per message |
| Streaming | post+edit |
| Scheduled messages |
Rich content
| Feature | Supported |
|---|---|
| Card format | Adaptive Cards |
| Buttons | |
| Link buttons | |
| Select menus | |
| Tables | |
| Fields | |
| Images in cards | |
| Modals |
Conversations
| Feature | Supported |
|---|---|
| Slash commands | |
| Mentions | |
| Add reactions | |
| Remove reactions | |
| Typing indicator | |
| DMs | |
| Ephemeral messages | |
| User lookup | |
| Parent subject | |
| Native client | |
| Custom API endpoint | baseUrl |
Message history
| Feature | Supported |
|---|---|
| Fetch messages | |
| Fetch single message | |
| Fetch thread info | |
| Fetch channel messages | |
| List threads | |
| Fetch channel info | |
| Post channel message |