Menu

1 / 2

Chat SDK adds X adapter support - Vercel

Vercel News·Josh Singh·5 days ago
#oZ3jgLd8
#vercel#chat#adapter#message#teams
Reading 0:00
15s threshold

Chat SDK now supports X, extending its single-codebase approach to Slack, Discord, GitHub, Teams, Telegram, and WhatsApp with the new X adapter .

Teams can build bots that reply to public mentions and hold direct message conversations through the X API v2 and the X Activity API . The adapter handles CRC verification and webhook signature checks automatically and can manage OAuth token refresh for long-running bots.

import { Chat } from "chat" ;

import { createXAdapter } from "@chat-adapter/x" ;

const bot = new Chat ( {

userName : "mybot" ,

adapters : {

x : createXAdapter ( ) ,

} ,

} ) ;

bot . onNewMention ( async ( thread , message ) => {

await thread . post ( ` Hi @ ${ message . author . userName } ! ` ) ;

} ) ;

Configure the adapter to respond to @-mentions on X

Likes are the only supported reaction, and responses post once on completion since X has no native streaming.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.