chat-adapter-blooio
Blooio adapter for Chat SDK — send and receive iMessage, RCS, and SMS from your bot.
Install
Quick start
The factory reads credentials from environment variables by default:
Or pass them explicitly:
Webhooks
Point your Blooio webhook URL to your server. The adapter handles these event types:
- message.received — incoming iMessage/RCS/SMS routed to your bot
- message.sent / message.delivered / message.failed / message.read — delivery lifecycle
- message.reaction — tapback reactions on messages
Webhook signature verification
Blooio signs webhooks with HMAC-SHA256. The adapter verifies the X-Blooio-Signature header automatically when webhookSecret is configured. The signature format is:
Stale timestamps are rejected (default tolerance: 300 seconds). Customize with:
Features
Sending messages
The adapter sends outbound messages through Chat SDK's standard postMessage interface. Markdown is automatically stripped to plain text since iMessage does not render it.
Attachments
Send media via sendMediaMessage:
Inbound attachment URLs from Blooio webhooks are parsed into Chat SDK attachment objects with auto-detected MIME types.
Reactions (tapbacks)
iMessage tapbacks are supported via addReaction and removeReaction. The adapter maps common emoji names to Blooio's six tapback types:
Unlike some platforms, Blooio supports removing reactions too.
Typing indicators
startTyping() sends the animated "..." bubble to the recipient. Works for both 1:1 and group conversations.
Message history
fetchMessages() retrieves conversation history from the Blooio API with cursor-based pagination (backed by offset/limit).
Read receipts
Send read receipts for a conversation:
Contact capabilities
Check whether a contact supports iMessage or SMS:
Direct API client access
For anything not covered by the Chat SDK adapter interface, access the Blooio HTTP client directly:
Protocol filtering
By default, the adapter processes inbound messages from all protocols (iMessage, RCS, SMS). To filter:
Thread ID format
Thread IDs encode the Blooio device number and chat target so that conversations are sticky to a specific phone line:
Use encodeThreadId / decodeThreadId to work with them programmatically.
Platform limitations
- No message editing — iMessage does not support editing sent messages via API.
editMessagethrows. - No unsend —
deleteMessageis a no-op; iMessage messages cannot be unsent via API. - Inbound media — attachment URLs from webhooks may expire. Persist them if needed.
License
MIT