<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Evgeniy Uryadov</title>
    <description>The latest articles on DEV Community by Evgeniy Uryadov (@automatadotsale).</description>
    <link>https://dev.to/automatadotsale</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4145870%2F4536bcfb-e776-4b67-ad97-7a5501060277.jpg</url>
      <title>DEV Community: Evgeniy Uryadov</title>
      <link>https://dev.to/automatadotsale</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/automatadotsale"/>
    <language>en</language>
    <item>
      <title>Shipping a MAX Messenger Bot and Channel in One Session — With an AI Agent Doing the Grunt Work</title>
      <dc:creator>Evgeniy Uryadov</dc:creator>
      <pubDate>Sun, 27 Sep 2026 18:58:46 +0000</pubDate>
      <link>https://dev.to/automatadotsale/shipping-a-max-messenger-bot-and-channel-in-one-session-with-an-ai-agent-doing-the-grunt-work-3pa7</link>
      <guid>https://dev.to/automatadotsale/shipping-a-max-messenger-bot-and-channel-in-one-session-with-an-ai-agent-doing-the-grunt-work-3pa7</guid>
      <description>&lt;p&gt;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.&lt;br&gt;
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.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the agent shipped in one working session
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;A bot registered on the MAX partner platform (verified sole-proprietor profile required; moderation passed within hours).&lt;/li&gt;
&lt;li&gt;A TypeScript publisher: API client, error classification (transient / auth / captcha / ToS / validation / UI-drift), a rate-limited scheduler, and per-platform text adaptation.&lt;/li&gt;
&lt;li&gt;A public channel with the bot as admin.&lt;/li&gt;
&lt;li&gt;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 &lt;code&gt;Invalid access_token&lt;/code&gt;. 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 (&lt;code&gt;GET /me&lt;/code&gt;) before assuming the credential is wrong elsewhere.
## Trap 2: The base URL in the docs is dead
The official documentation names &lt;code&gt;platform-api2.max.ru&lt;/code&gt; as 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 be &lt;code&gt;botapi.max.ru&lt;/code&gt;, 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:&lt;/li&gt;
&lt;li&gt;Open a direct dialog with the bot by its exact link and press &lt;strong&gt;Start&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In the channel: &lt;strong&gt;Subscribers → Add subscribers&lt;/strong&gt; — now the bot appears among your recent contacts.&lt;/li&gt;
&lt;li&gt;Add it, then promote it to admin with publish rights.
Bonus undocumented behavior: the channel's &lt;code&gt;chat_id&lt;/code&gt; is not discoverable statically. It arrives as a &lt;code&gt;bot_added&lt;/code&gt; event in the bot's update queue — you subscribe (&lt;code&gt;GET /updates&lt;/code&gt;) and read it from the event.
## How the pipeline works now
One phrase to the agent ("publish this article") from any project triggers:&lt;/li&gt;
&lt;li&gt;the article lands on the blog (Astro, three languages: ru/en/kk with hreflang);&lt;/li&gt;
&lt;li&gt;the agent writes a separate adaptation per platform — different hooks, lengths, and tones, not copies;&lt;/li&gt;
&lt;li&gt;every text waits for explicit human approval before anything goes out;&lt;/li&gt;
&lt;li&gt;posts land on Telegram, VK, MAX, and now DEV — with the original article's URL set as &lt;code&gt;canonical_url&lt;/code&gt; on platforms that support it.
## Cheat sheet&lt;/li&gt;
&lt;li&gt;Host: &lt;code&gt;botapi.max.ru&lt;/code&gt; (as of Sept 2026).&lt;/li&gt;
&lt;li&gt;Auth: &lt;code&gt;Authorization: &amp;lt;token&amp;gt;&lt;/code&gt; header — query parameters are deprecated and rejected.&lt;/li&gt;
&lt;li&gt;Token: copy via the UI icon; verify with &lt;code&gt;GET /me&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Channel: dialog with bot → Start → add via Subscribers → promote to admin.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;chat_id&lt;/code&gt;: from the &lt;code&gt;bot_added&lt;/code&gt; event in &lt;code&gt;GET /updates&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Rate limits: comfortable for content posting (a handful of posts per day is nowhere near them).
Originally published at &lt;a href="https://automata.sale/en/blog/ai-automation/max-bot-i-kanal-cherez-zcode-agenta/" rel="noopener noreferrer"&gt;https://automata.sale/en/blog/ai-automation/max-bot-i-kanal-cherez-zcode-agenta/&lt;/a&gt;
---
This article was prepared with AI assistance (drafting and adaptation by a coding agent) and reviewed by the author before publishing.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>softwaredevelopment</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
