getManagedBotTokenПоддерживается
Use this method to get the token of a managed bot. Returns the token as String on success.
Особенности StaticGram
managed = created via bots.createBot(manager_id); managed_bot update queued on creation
Параметры
User identifier of the managed bot whose token will be returned
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/getManagedBotToken" \
-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_token(user_id=123456789)JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/getManagedBotToken`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"user_id": 123456789
}),
});
const data = await res.json();Ответ (String)
JSON
{
"ok": true,
"result": "..."
}