Matrix
Matrix integration uses the Client-Server API with long-poll sync for real-time message delivery.
- Create a Matrix account for your bot on any homeserver (e.g., matrix.org, or your own Synapse/Dendrite)
- Get an access token — you can use the login API or extract it from Element’s settings
- Invite the bot to the rooms you want it to participate in
- In KinBot, add a Matrix channel with the access token and homeserver URL
- Optionally, restrict to specific room IDs with the allowlist
Configuration
Section titled “Configuration”| Field | Required | Description |
|---|---|---|
| Access Token | ✅ | Matrix access token (stored encrypted) |
| Homeserver URL | ✅ | e.g., https://matrix.org |
| Allowed Room IDs | ❌ | Restrict to specific rooms |
How It Works
Section titled “How It Works”- Inbound: KinBot uses Matrix’s
/syncendpoint with long-polling to receive events in real time. It filters form.room.messageevents, extracts text and media, and routes to the Kin. - Outbound: Messages are sent via the
PUT /rooms/{roomId}/sendendpoint. Long messages (>4,096 chars) are split. Images usem.imagemessage type, other files usem.file.
Features
Section titled “Features”- Text messages with HTML formatting
- Image and file attachments (via Matrix content repository)
- Room and DM support
- Automatic message chunking
- Typing indicator
- Long-poll sync (no webhook needed, works behind NAT/firewalls)
Advantages
Section titled “Advantages”- No public URL required — Matrix uses client-side long-polling, so KinBot doesn’t need to be publicly reachable
- Federated — works with any Matrix homeserver
- Self-hostable — run your own homeserver for full control