transferBusinessAccountStarsПоддерживается
Transfers Telegram Stars from the business account balance to the bot's balance. Requires the can_transfer_stars business bot right. Returns True on success.
Особенности StaticGram
can_transfer_stars; debit owner + credit bot (refund on failure)
Параметры
Unique identifier of the business connection
Number of Telegram Stars to transfer; 1-10000
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/transferBusinessAccountStars" \
-H "Content-Type: application/json" \
-d '{
"business_connection_id": "<business_connection_id>",
"star_count": 50
}'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.transfer_business_account_stars(
business_connection_id="<business_connection_id>",
star_count=50,
)JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/transferBusinessAccountStars`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"business_connection_id": "<business_connection_id>",
"star_count": 50
}),
});
const data = await res.json();Ответ (True)
JSON
{
"ok": true,
"result": true
}