StaticGramBot API

answerChatJoinRequestQueryЧастично

Use this method to process a received chat join request query. Returns True on success.

Поддерживается частично

no guard-bot join-request queries in the core (ChatJoinRequest.query_id never issued): validates result, answers QUERY_ID_INVALID

Параметры

chat_join_request_query_idStringобязательный
Unique identifier of the join request query
resultStringобязательный
Result of the query. Must be either “approve” to allow the user to join the chat, “decline” to disallow the user to join the chat, or “queue” to leave the decision to other administrators.

Пример запроса

curl
curl "https://api.staticgram.top/bot$TOKEN/answerChatJoinRequestQuery" \
  -H "Content-Type: application/json" \
  -d '{
    "chat_join_request_query_id": "value",
    "result": {}
  }'
aiogram 3
from aiogram import Bot
from aiogram.client.session.aiohttp import AiohttpSession
from aiogram.client.telegram import TelegramAPIServer

session = AiohttpSession(api=TelegramAPIServer.from_base("https://api.staticgram.top"))
bot = Bot(TOKEN, session=session)

result = await bot.answer_chat_join_request_query(chat_join_request_query_id="value", result={})
JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/answerChatJoinRequestQuery`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "chat_join_request_query_id": "value",
    "result": {}
  }),
});
const data = await res.json();

Ответ (True)

JSON
{
  "ok": true,
  "result": true
}

Описания методов и типов взяты из официальной документации Telegram Bot API (Bot API 10.3). Адрес API: https://api.staticgram.top