getBusinessConnectionПоддерживается
Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success.
Особенности StaticGram
id = opaque (owner, bot) pair; rights mapped from connectedBot rights
Параметры
Unique identifier of the business connection
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/getBusinessConnection" \
-H "Content-Type: application/json" \
-d '{
"business_connection_id": "<business_connection_id>"
}'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_business_connection(business_connection_id="<business_connection_id>")JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/getBusinessConnection`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"business_connection_id": "<business_connection_id>"
}),
});
const data = await res.json();Ответ (BusinessConnection)
JSON
{
"ok": true,
"result": {
"id": "...",
"user": {
"id": 1780243423,
"is_bot": true,
"first_name": "..."
},
"user_chat_id": 1,
"date": 1790000000,
"is_enabled": true
}
}