Skip to content
Dashboard

Chat SDK adds Dial support

Content Engineer
lib/bot.ts
import { Chat } from "chat";
import { createMemoryState } from "@chat-adapter/state-memory";
import { createDialAdapter } from "@getdial/chat-sdk-adapter";
export const bot = new Chat({
userName: "Dial Bot",
adapters: {
dial: createDialAdapter({
apiKey: process.env.DIAL_API_KEY,
fromNumberId: process.env.DIAL_FROM_NUMBER_ID,
webhookSecret: process.env.DIAL_WEBHOOK_SECRET,
}),
},
state: createMemoryState(),
});
bot.onNewMention(async (thread, message) => {
await thread.post(`heard you: ${message.text}`);
});

Configure the Dial adapter to respond to @-mentions

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 platforms.

Read the guide

Ready to deploy?