Skip to content
Dashboard

Chat SDK adds Kapso support

Content Engineer
lib/bot.ts
import { Chat } from "chat";
import { createMemoryState } from "@chat-adapter/state-memory";
import { createKapsoAdapter } from "@kapso/chat-adapter";
export const bot = new Chat({
userName: "support",
state: createMemoryState(),
adapters: {
kapso: createKapsoAdapter({
kapsoApiKey: process.env.KAPSO_API_KEY,
phoneNumberId: process.env.KAPSO_PHONE_NUMBER_ID,
webhookSecret: process.env.KAPSO_WEBHOOK_SECRET,
}),
},
});
bot.onDirectMessage(async (thread, message) => {
await thread.post(`You said: ${message.text}`);
});

Configure the adapter to respond to @-mentions in WhatsApp chats

The Complete Guide to Chat SDK

Learn how Chat SDK works end-to-end: from core concepts to building your first bot to deploying it across Slack, Teams, and more.

Read the guide


Ready to deploy?