← 피드로
MAX is the messenger Russian business audiences are actively migrating to (2026). I needed a presence there: a bot, a public channel, and an auto-posting pipeline from my blog. The classical path is an evening with docs and a developer console. Instead, I gave the task to an AI coding agent (ZCode) in one sentence and supervised the execution.
This post is the engineering debrief: what the agent built, and the three undocumented traps we hit — the parts you won’t find in the official docs.
What the agent shipped in one working session
- A bot registered on the MAX partner platform (verified sole-proprietor profile required; moderation passed within hours).
- A TypeScript publisher: API client, error classification (transient / auth / captcha / ToS / validation / UI-drift), a rate-limited scheduler, and per-platform text adaptation.
- A public channel with the bot as admin.
- The first automated post — this very text, in fact.
## Trap 1: The silently clipped token
The API token copied manually from the platform UI was rejected with
Invalid access_token. The reason was embarrassingly mundane: manual text selection clipped the end of the string. Copy with the icon, not with the mouse. Lesson for anything that stores tokens: validate length or do a round-trip health check (GET /me) before assuming the credential is wrong elsewhere. ## Trap 2: The base URL in the docs is dead The official documentation namesplatform-api2.max.ruas the API host. It did not respond — from Russia, and (we checked through a US relay) from abroad either. The working host turned out to bebotapi.max.ru, discovered by controlled probing. Young-platform reality: docs drift. Build your client behind an interface so the base URL is a config value, not a constant. ## Trap 3: A fresh bot is invisible in channel admin search The documented flow — “add the bot as a channel member, then make it an admin” — assumes you can find the bot in the admin picker. You can’t: until published to the catalog, a bot doesn’t show up in channel settings search at all. The working sequence: - Open a direct dialog with the bot by its exact link and press Start.
- In the channel: Subscribers → Add subscribers — now the bot appears among your recent contacts.
- Add it, then promote it to admin with publish rights.
Bonus undocumented behavior: the channel’s
chat_idis not discoverable statically. It arrives as abot_addedevent in the bot’s update queue — you subscribe (GET /updates) and read it from the event. ## How the pipeline works now One phrase to the agent (“publish this article”) from any project triggers: - the article lands on the blog (Astro, three languages: ru/en/kk with hreflang);
- the agent writes a separate adaptation per platform — different hooks, lengths, and tones, not copies;
- every text waits for explicit human approval before anything goes out;
- posts land on Telegram, VK, MAX, and now DEV — with the original article’s URL set as
canonical_urlon platforms that support it. ## Cheat sheet - Host:
botapi.max.ru(as of Sept 2026). - Auth:
Authorization: <token>header — query parameters are deprecated and rejected. - Token: copy via the UI icon; verify with
GET /me. - Channel: dialog with bot → Start → add via Subscribers → promote to admin.
-
chat_id: from thebot_addedevent inGET /updates. - Rate limits: comfortable for content posting (a handful of posts per day is nowhere near them). Originally published at https://automata.sale/en/blog/ai-automation/max-bot-i-kanal-cherez-zcode-agenta/ — This article was prepared with AI assistance (drafting and adaptation by a coding agent) and reviewed by the author before publishing.