getBusinessAccountGiftsПоддерживается
Returns the gifts received and owned by a managed business account. Requires the can_view_gifts_and_stars business bot right. Returns OwnedGifts on success.
can_view_gifts_and_stars; every exclude_* filter with Bot API semantics; sort_by_price over the whole list before pagination (numeric offset); full OwnedGiftRegular/OwnedGiftUnique (sender and text of private gifts, is_saved, can_be_upgraded, convert/prepaid stars, is_upgrade_separate (upgrade prepaid later by another user), unique_gift_number, publisher_chat, has_colors; upgraded gifts are listed as OwnedGiftUnique with their collectible: model/symbol/backdrop, is_premium, is_burned, transfer fields, is_from_blockchain (also for gifts withdrawn to TON)); not filled: UniqueGift.colors (the core has no collectible peer colour schemes: account.updateColor rejects peerColorCollectible), was_refunded (the core never refunds a gift purchase)
Параметры
Пример запроса
curl "https://api.staticgram.top/bot$TOKEN/getBusinessAccountGifts" \
-H "Content-Type: application/json" \
-d '{
"business_connection_id": "<business_connection_id>"
}'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_account_gifts(business_connection_id="<business_connection_id>")const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/getBusinessAccountGifts`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"business_connection_id": "<business_connection_id>"
}),
});
const data = await res.json();Ответ (OwnedGifts)
{
"ok": true,
"result": {
"total_count": 1,
"gifts": []
}
}