StaticGramBot API

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

Use this method to process a received chat join request query by showing a Mini App to the user before deciding the outcome. Call answerChatJoinRequestQuery to resolve the join request query based on the user interaction with the Mini App. Returns True on success.

Особенности StaticGram

HTTPS web_app_url; pushes joinChatBotResultWebView to the requester, who opens it with messages.requestChatJoinWebView (signed initData + chat_join_request_query_id); the answer window is extended to 1 h; then answerChatJoinRequestQuery

Параметры

chat_join_request_query_idStringобязательный
Unique identifier of the join request query
web_app_urlStringобязательный
An HTTPS URL of a Web App to be opened with additional data as specified in Initializing Web Apps

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

curl
curl "https://api.staticgram.top/bot$TOKEN/sendChatJoinRequestWebApp" \
  -H "Content-Type: application/json" \
  -d '{
    "chat_join_request_query_id": "value",
    "web_app_url": "value"
  }'
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.send_chat_join_request_web_app(chat_join_request_query_id="value", web_app_url="value")
JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/sendChatJoinRequestWebApp`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "chat_join_request_query_id": "value",
    "web_app_url": "value"
  }),
});
const data = await res.json();

Ответ (True)

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

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