← Back to Plugins
Channels

Max Openclaw

RuslanStrogov By RuslanStrogov ⭐ 1 stars 👁 59 views ▲ 0 votes

MAX Messenger channel plugin for OpenClaw โ€” connect OpenClaw to MAX Bot API (max.ru) via webhook

Homepage GitHub

Install

npm install
npm

README

# MAX Messenger โ€” OpenClaw Channel Plugin

Connect [OpenClaw](https://docs.openclaw.ai) to [MAX Messenger](https://max.ru) via Bot API.

## Features

- **Text messages** with Markdown formatting
- **Images, files, audio** via MAX upload API
- **Inline keyboard** (callback buttons)
- **Typing indicator** (heartbeat)
- **DM security**: pairing, allowlist, open, disabled
- **Group chat support** with per-group policies
- **Webhook-based** inbound (no polling)
- **HMAC-SHA256** signature verification

## Installation

```bash
openclaw plugins install github:RuslanStrogov/max-openclaw
```

## Configuration

```json5
{
  channels: {
    "max-messenger": {
      enabled: true,
      token: "YOUR_MAX_BOT_TOKEN",          // Required
      webhookUrl: "https://your-domain.com/max-messenger/webhook",  // Required
      webhookSecret: "optional-secret",     // Optional, for HMAC verification
      apiBaseUrl: "https://platform-api.max.ru",  // Optional
      dmPolicy: "pairing",                  // pairing | allowlist | open | disabled
      allowFrom: [],                        // User IDs allowed to DM (empty = all)
      groupPolicy: "allowlist",             // open | disabled | allowlist
      groups: {
        "group_chat_id": {
          requireMention: true,
          enabled: true,
          allowFrom: []
        }
      },
      homeChannel: ""                      // Chat ID for cron/notification delivery
    }
  }
}
```

## Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `MAX_BOT_TOKEN` | Yes | Bot token from MAX partner platform |
| `MAX_WEBHOOK_URL` | No | Public URL for webhook |
| `MAX_WEBHOOK_SECRET` | No | HMAC secret for verification |

## Bot Creation

MAX Bot is created at [max.ru partner platform](https://max.ru/se13320221_bot) for legal entities only (not individuals in RF).

## Architecture

```
max-openclaw/
โ”œโ”€โ”€ index.ts              # defineChannelPluginEntry + webhook route
โ”œโ”€โ”€ setup-entry.ts        # defineSetupPluginEntry
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ channel.ts        # createChatChannelPlugin (main logic)
โ”‚   โ”œโ”€โ”€ client.ts         # MAX Bot API HTTP client
โ”‚   โ”œโ”€โ”€ webhook.ts        # Webhook handler (inbound)
โ”‚   โ””โ”€โ”€ types.ts          # TypeScript types
โ””โ”€โ”€ tests/
    โ””โ”€โ”€ channel.test.ts   # Tests
```

## Development

```bash
npm install
npm test
npm run build
```

## License

MIT
channels

Comments

Sign in to leave a comment

Loading comments...