Skip to main content
Install: npm install @smartlyqofficial/chat-sdk-adapter · GitHub · npm · Node 18+.
SmartlyQ’s unified inbox aggregates DMs and comments from every connected social account and fires signed webhooks. This adapter turns those webhooks into a chatbot pipeline: it verifies each delivery, normalizes it into one message shape, and hands it to your handler code with reply helpers wired to the SmartlyQ API. Write once - it works on every platform your accounts cover.
Want a chatbot without writing code? SmartlyQ has a built-in chatbot builder with an inbox bridge - train it in the dashboard and skip the adapter. This package is for developers who want full code-level control.

Three steps to a multi-platform chatbot

1

Get your API key

Create an API key in the Developer Dashboard and set it as SMARTLYQ_API_KEY.
2

Create a webhook

Subscribe it to message.received and comment.received, pointed at your app. Save the whsec_... signing secret it returns - see the webhooks guide.
3

Add the adapter

Install @smartlyqofficial/chat-sdk-adapter and wire your handlers:
Using Express? Mount with a raw body (signature verification needs the exact bytes):

What you get in a handler

Security

Every delivery is checked against your signing secret (HMAC-SHA256, X-SmartlyQ-Signature, 5-minute replay window) before your handlers run; unverified requests are rejected with a 401. Events other than the two chat events are acknowledged and ignored, so your endpoint never causes webhook retries.