getManagedBotAccessSettingsПоддерживается
Use this method to get the access settings of a managed bot. Returns a BotAccessSettings object on success.
Особенности StaticGram
stored in bot_api_bot_settings
Параметры
User identifier of the managed bot whose access settings will be returned
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/getManagedBotAccessSettings" \
-H "Content-Type: application/json" \
-d '{
"user_id": 123456789
}'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.get_managed_bot_access_settings(user_id=123456789)JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/getManagedBotAccessSettings`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"user_id": 123456789
}),
});
const data = await res.json();Ответ (BotAccessSettings)
JSON
{
"ok": true,
"result": {
"is_access_restricted": true
}
}