getUserProfilePhotosПоддерживается
Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object.
Особенности StaticGram
offset/limit, blocked/privacy (profile_photo) respected, video sizes dropped
Параметры
Unique identifier of the target user
Sequential number of the first photo to be returned. By default, all photos are returned.
Limits the number of photos to be retrieved. Values between 1-100 are accepted. Defaults to 100.
Пример запроса
curl
curl "https://api.staticgram.top/bot$TOKEN/getUserProfilePhotos" \
-H "Content-Type: application/json" \
-d '{
"user_id": 123456789
}'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_user_profile_photos(user_id=123456789)JavaScript
const res = await fetch(`https://api.staticgram.top/bot${TOKEN}/getUserProfilePhotos`, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"user_id": 123456789
}),
});
const data = await res.json();Ответ (UserProfilePhotos)
JSON
{
"ok": true,
"result": {
"total_count": 1,
"photos": []
}
}