I built an open-source adapter that connects Telnyx to Chat SDK , so you can build bots that send and receive SMS and MMS messages.
The adapter supports group MMS, scheduled messages, media attachments, and delivery receipts. It also verifies incoming Telnyx webhooks using Ed25519 signatures.
Getting started
Install the adapter alongside Chat SDK and a state adapter:
npm install chat-adapter-telnyx chat @chat-adapter/state-memory
Enter fullscreen mode
Exit fullscreen mode
Then configure it with your Telnyx API key, phone number, and public key:
import { createMemoryState } from "@chat-adapter/state-memory" ; import { Chat } from "chat" ; import { createTelnyxAdapter } from "chat-adapter-telnyx" ;
export const bot = new Chat ( { userName : "mybot" , adapters : { telnyx : createTelnyxAdapter ( { apiKey : process . env . TELNYX_API_KEY ! , phoneNumber : process . env . TELNYX_PHONE_NUMBER ! , publicKey : process . env . TELNYX_PUBLIC_KEY ! , } ) , } , state : createMemoryState ( ) , } ) ;
bot .…