StaticGramBot API

setMyProfilePhotoПоддерживается

Changes the profile photo of the bot. Returns True on success.

Особенности StaticGram

static / animated upload via photos.uploadProfilePhoto(bot=) as the owner

Параметры

photoInputProfilePhotoобязательный
The new profile photo to set

Пример запроса

curl
curl "https://api.staticgram.top/bot$TOKEN/setMyProfilePhoto" \
  -H "Content-Type: application/json" \
  -d '{
    "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_my_profile_photo(photo={})
JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/setMyProfilePhoto`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "photo": {}
  }),
});
const data = await res.json();

Ответ (True)

JSON
{
  "ok": true,
  "result": true
}

Описания методов и типов взяты из официальной документации Telegram Bot API (Bot API 10.3). Адрес API: https://api.staticgram.top