setBusinessAccountProfilePhotoПоддерживается
Changes the profile photo of a managed business account. Requires the can_edit_profile_photo business bot right. Returns True on success.
Особенности StaticGram
can_edit_profile_photo; is_public = fallback photo
Параметры
Unique identifier of the business connection
The new profile photo to set
Pass True to set the public photo, which will be visible even if the main photo is hidden by the business account's privacy settings. An account can have only one public photo.
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/setBusinessAccountProfilePhoto" \
-H "Content-Type: application/json" \
-d '{
"business_connection_id": "<business_connection_id>",
"photo": {}
}'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.set_business_account_profile_photo(business_connection_id="<business_connection_id>", photo={})JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/setBusinessAccountProfilePhoto`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"business_connection_id": "<business_connection_id>",
"photo": {}
}),
});
const data = await res.json();Ответ (True)
JSON
{
"ok": true,
"result": true
}