Skip to main content
Matrix is an open-source, federated communication protocol. profClaw connects as a Matrix bot user, joining rooms and responding to messages across any Matrix homeserver.

Capabilities

FeatureSupported
Direct messagesYes
Room messagesYes
End-to-end encryptionOptional
File uploadsYes
ReactionsYes
FederationYes (any homeserver)
Room allowlistYes

Setup

1

Register a Matrix account

Create a bot account on your Matrix homeserver (or matrix.org). Use a dedicated account, not your personal one.
2

Get an access token

Log in and retrieve the access token:
curl -X POST https://matrix.org/_matrix/client/r0/login \
  -H "Content-Type: application/json" \
  -d '{"type":"m.login.password","user":"profclaw-bot","password":"your-password"}'
# Copy the access_token from the response
3

Get your User ID

User ID format: @profclaw-bot:matrix.org
4

Configure profClaw

MATRIX_HOMESERVER_URL=https://matrix.org
MATRIX_ACCESS_TOKEN=syt_...
MATRIX_USER_ID=@profclaw-bot:matrix.org
5

Invite the bot to rooms

In Element or any Matrix client, invite @profclaw-bot:matrix.org to your room.

Environment Variables

MATRIX_HOMESERVER_URL
string
required
Your Matrix homeserver URL (e.g., https://matrix.org or https://your-homeserver.com).
MATRIX_ACCESS_TOKEN
string
required
Bot user access token. Format: syt_...
MATRIX_USER_ID
string
required
Bot user ID. Format: @username:homeserver.com
MATRIX_DEVICE_ID
string
Device ID for E2EE sessions. Auto-generated if not set.
MATRIX_ENABLE_ENCRYPTION
boolean
Enable end-to-end encryption. Defaults to false. Requires additional setup.
MATRIX_ALLOWED_ROOM_IDS
string
Comma-separated list of room IDs the bot will respond in. Leave empty to allow all rooms.

Configuration Example

MATRIX_HOMESERVER_URL=https://matrix.org
MATRIX_ACCESS_TOKEN=syt_cHJvZmNsYXc_...
MATRIX_USER_ID=@profclaw:matrix.org
# Optional: restrict to specific rooms
MATRIX_ALLOWED_ROOM_IDS=!roomid1:matrix.org,!roomid2:matrix.org

Notes

  • Matrix uses long-polling (/sync) by default - no public webhook URL required.
  • E2EE requires the bot’s device to exchange keys with room members. Enable only if needed.
  • The bot joins rooms automatically when invited.
  • For Synapse homeservers, you can register the bot with admin-level access using the registration token.
  • Works with any Matrix client: Element, FluffyChat, Nheko, etc.