Telegram Bot API: manage group membership and moderation

domain: telegram.org · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Create a bot via BotFather, add it to the target group/supergroup, and promote it to admin with the specific rights needed (e.g. ban/restrict members) — the Bot API enforces these rights server-side.
  2. Ban a member with banChatMember(chat_id, user_id), optionally setting until_date for a temporary ban (values under 30s or over 366 days are treated as permanent) and revoke_messages to also delete their prior messages.
  3. Restrict (mute/limit) a member in a supergroup with restrictChatMember(chat_id, user_id, permissions, until_date) instead of a full ban.
  4. Reverse a ban with unbanChatMember; by default this also removes the user if still present, so pass only_if_banned:true to just lift a ban without kicking a current member.
  5. Check current status/role with getChatMember or getChatAdministrators before acting, since every moderation call requires the bot to already hold that specific admin right.

Known gotchas

Related routes

Circle.so Admin API: manage members and spaces
circle.so · 6 steps · unrated
manage members via daxko's platform apis (club automation, member experience, etc.)
docs.partners.daxko.com · 5 steps · unrated
Send messages with a Telegram bot
telegram.org · 4 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans