Skip to main content
How-to guides

How to Set Up a Telegram Guardian Bot for Join Requests

Also available in:ENRUUK
Published on August 19, 20267 min read142 views
How to Set Up a Telegram Guardian Bot for Join Requests

How to Set Up a Telegram Guardian Bot for Join Requests

TL;DR. Telegram's Bot API 10.1, released June 11, 2026, added "Guardian Bots" — a dedicated role for screening who gets into your channel or group. A guard bot receives ChatJoinRequest updates carrying a query_id, decides who to approve, and replies through the new answerChatJoinRequestQuery method — optionally showing a mini-app screen first via sendChatJoinRequestWebApp. This guide covers what changed, how the pieces fit together, and how to wire up a screening flow without hand-rolling everything from scratch.

Once the right people are in, the next job is keeping the channel active — see how Autogram schedules and automates your channel's posts.

Prerequisites

Photo by energepic.com on Pexels

  • A Telegram channel or group with Approve new members (join requests) turned on.
  • A bot created via @BotFather, added as an administrator with the right to manage join requests.
  • Basic familiarity with the Bot API (webhook or getUpdates) — this guide assumes you already receive updates.
  • Optional: a Web App (an HTTPS page) if you want to screen applicants through sendChatJoinRequestWebApp instead of a plain approve/decline.

Step 1 — What Bot API 10.1 added for Telegram Guardian Bots

Before Bot API 10.1, a bot handling join requests worked with the ChatJoinRequest object and a single method, answerChatJoinRequest(chat_id, user_id, approved) — a blunt accept-or-reject. Telegram's June 11, 2026 changelog layered a "query" concept on top of that:

  • ChatJoinRequest.query_id — a new optional field that identifies an individual join request as a query the bot can respond to.
  • answerChatJoinRequestQuery(chat_id, user_id, query_id, approved, invite_link?) — the new method built around that identifier. It still approves or declines, but ties the response to a specific query instead of just a raw user_id.
  • User.supports_join_request_queries — a flag on the bot's own getMe response, saying "yes, I can be assigned to handle these."
  • ChatFullInfo.guard_bot — a field, visible only to chat administrators, naming which bot currently screens join requests for that chat.

Telegram's own announcement frames the feature in plain terms: "Add AI bots as admins to process join requests" — and adds that they "can also smite the unrighteous who post in the chat, if you want them to." That second half matters: a guard bot's job doesn't stop at the front door. The same bot can stay attached to moderate content after admission, if you grant it the rights to do so.

Step 2 — Assign your Telegram Guardian Bot

Photo by cottonbro studio on Pexels

There is no dedicated "assign guardian" API call in Bot API 10.1 — assignment works the way bot admin rights always have: add the bot to the chat and grant it the right to manage join requests. Once that is done, and once the bot's getMe response reports supports_join_request_queries: true, Telegram treats it as the chat's guard bot, reflected back to admins as ChatFullInfo.guard_bot.

Two things worth checking before you rely on this in production:

  1. Confirm the flag. Call getMe and check supports_join_request_queries. If your bot library predates Bot API 10.1, update it — older versions will not expose the field at all.
  2. Confirm the admin right. The bot needs the specific "manage join requests" permission. Being an admin is not automatically enough if that one right was left unchecked when you added the bot.

Step 3 — Handle the query and respond

When someone requests to join, your bot receives a chat_join_request update carrying the ChatJoinRequest object, now with query_id populated. From there you have two paths.

Direct decision. If you already have enough signal — an allowlist, a prior interaction, a bio keyword match — call answerChatJoinRequestQuery immediately, passing chat_id, user_id, the query_id from the update, and approved. Pass invite_link too if the chat is private and you want to hand the approved user a working link back.

Screen first, then decide. If you want the applicant to answer a question or agree to rules before admission, call sendChatJoinRequestWebApp(chat_id, app_url, button_text?) to hand them a Web App — your own HTTPS page — before responding. The applicant completes whatever flow you built (a short quiz, a rules acknowledgment, an email-domain check), and your backend calls answerChatJoinRequestQuery once it has an answer.

This two-step pattern — screen, then decide — is the shape most early write-ups settled on after the June 2026 launch: it separates detection from enforcement, so a false decline does not need a full appeal process, just a fresh join request.

Common mistakes

Photo by lil artsy on Pexels

  • Assuming chat_id plus user_id is enough. Bot API 10.1's answerChatJoinRequestQuery requires query_id too. Code written against the older answerChatJoinRequest method will not compile against the new signature — check your library's changelog before assuming compatibility.
  • Treating guard_bot as a per-request answer. guard_bot tells you which bot currently handles a chat's queries — it does not tell you the outcome of any specific request. Log your own approve/decline decisions if you need an audit trail; Telegram does not keep one for you beyond the chat's own admin log.
  • Skipping the mini-app path and hand-building a chat conversation instead. sendChatJoinRequestWebApp exists so screening does not have to happen as a clunky back-and-forth in a private message. A Web App gives you a real form, and it is the pattern Telegram's own announcement highlights first.
  • Granting moderation rights without a policy. A guard bot that can also remove messages is powerful. Decide up front what triggers a removal, or you will end up debugging false positives after members have already noticed.

FAQ

What is a Telegram Guardian Bot?

A Guardian Bot is a bot a chat's admins assign to process join requests, and optionally to moderate messages afterward. It is not a new bot type — it is a role your existing bot can take on once it supports Bot API 10.1's join request queries.

Do I need Bot API 10.1 to build this?

Yes. query_id on ChatJoinRequest, the answerChatJoinRequestQuery method, sendChatJoinRequestWebApp, and the guard_bot and supports_join_request_queries fields were all added in Bot API 10.1, released June 11, 2026. Older library versions will not expose them.

How is this different from the old answerChatJoinRequest method?

The pre-10.1 method took only chat_id, user_id, and approved — a blunt approve-or-decline. The new query-based flow ties the response to a specific query_id, and pairs with sendChatJoinRequestWebApp so you can screen before you decide, not just decide.

Can a Guardian Bot reject someone and let them try again?

Yes. Declining a join request does not ban the user. They can send a new join request, and your bot will receive a new query with a new query_id.

Does the guard bot have to be the same bot that posts my content?

No. Nothing in Bot API 10.1 requires it. Many operators run a dedicated screening bot with narrower permissions than their main posting or automation bot, which limits the blast radius if the screening logic has a bug.

Can I see which bot is currently guarding my chat?

Yes, if you are a chat administrator: ChatFullInfo.guard_bot names it. The field is admin-only — regular members and the public cannot see it.

What happens if I do not build a screening flow — do join requests still work?

Yes. Nothing about Bot API 10.1 removes the old approve/decline behavior. Guardian Bots are additive; a chat without a designated guard bot behaves exactly as before.

Can the same bot both screen new members and moderate existing ones?

Yes, if you grant it the relevant admin rights alongside managing join requests. Telegram's own announcement calls this out directly as part of the same feature, not a separate one.

Bottom line

Explore Autogram's automation. Connect your first channel to start 7 days of Solo access, with a $1 AI budget and no card required.

Image credits

#telegram guardian bot#join request screening#bot api 10.1#answerchatjoinrequestquery#telegram automation#channel moderation#chat join request

Subscribe to our newsletter

Get the latest Telegram growth tips, automation strategies, and platform updates delivered to your inbox.

Or follow our Telegram channel