StaticGramBot API

Отличия от Telegram

Из 185 методов Bot API 10.3 полностью поддерживаются 153, ещё 32 работают с ограничениями. Ниже то, что стоит учесть при переносе бота.

Не поддерживается

  • Telegram Passport. setPassportDataErrors принимает данные, но форм Passport на сервере нет.
  • Guard-боты заявок на вступление. answerChatJoinRequestQuery и sendChatJoinRequestWebApp отвечают QUERY_ID_INVALID.
  • Платные подписки по инвайт-ссылке. createChatSubscriptionInviteLink, editChatSubscriptionInviteLink возвращают 400.
  • Гостевые запросы. answerGuestQuery всегда QUERY_ID_INVALID.
  • Платные медиа в каналах и группах (в личных чатах работают), топики в личных чатах, редактирование live-локации в inline-сообщениях, реакции от имени канала (actor_chat_id), области историй unique_gift.
  • Платёжные провайдеры. Только звёзды (XTR), см. Оплата звёздами.

Работает иначе

  • Нет обычных групп. Любая группа это супергруппа: chat.type бывает private, supergroup или channel, но не group. Id супергрупп и каналов имеют вид -100….
  • @username в chat_id работает для публичных каналов, супергрупп и ботов.
  • Файлы: загрузка до 25 МБ, file_path совпадает с file_id, file_id из Telegram недействительны. См. Файлы.
  • Вебхуки: self-signed сертификат и ip_address игнорируются, разрешён HTTP.
  • logOut / close просто возвращают true: сервер один, переносить нечего.
  • User: поля language_code, is_premium, added_to_attachment_menu пока не заполняются.

Методы с ограничениями

Полный список частично поддерживаемых методов и что именно в них не работает. Тот же статус показан бейджем на странице каждого метода.

МетодЧто не поддерживается
answerChatJoinRequestQueryno guard-bot join-request queries in the core (ChatJoinRequest.query_id never issued): validates result, answers QUERY_ID_INVALID
answerGuestQueryvalidates guest_query_id / InlineQueryResult, then 400 QUERY_ID_INVALID: the server never produces guest_message updates (no guest-bot concept in the core)
closeForumTopicforum supergroups only; emits forum_topic_closed
createChatSubscriptionInviteLinkparameters validated, then 400 subscription invite links are not supported by this server (no Stars subscription billing in the core)
createForumTopicforum supergroups only (the core has no topics in private chats); emits forum_topic_created
deleteAllMessageReactionsuser_id only; actor_chat_id → 400
deleteForumTopicforum supergroups only
deleteMessageReactionuser_id only; actor_chat_id → 400
editChatSubscriptionInviteLinksame as createChatSubscriptionInviteLink (no subscription links can exist)
editForumTopicforum supergroups only; emits forum_topic_edited
editMessageLiveLocationchat messages only; inline messages → 400; business_connection_id: only messages this bot sent for the account
editStoryreplaces media/caption/areas; same area limits as postStory
getBusinessAccountGiftsOwnedGiftRegular/Unique with a basic Gift/UniqueGift projection; exclude_from_blockchain honoured; sort_by_price sorts each page (keyset order between pages)
postStoryneeds can_manage_stories; attach:// photo/video, caption/entities, active_period, post_to_chat_page, protect_content, location/suggested_reaction/link/weather areas; unique_gift areas → 400 STORY_AREA_UNSUPPORTED
reopenForumTopicforum supergroups only; emits forum_topic_reopened
sendAnimationsee sendPhoto
sendAudiosee sendPhoto
sendChatJoinRequestWebAppsee answerChatJoinRequestQuery (validates the HTTPS web_app_url)
sendDocumentsee sendPhoto
sendLivePhotosee sendPhoto
sendPaidMediaprivate chats with Stars (previews until bought, unlock by edit, purchased_paid_media); channels/supergroups → 400 PAID_MEDIA_CHAT_UNSUPPORTED; thumbnail/cover/start_timestamp/show_caption_above_media ignored; business_connection_id rejected
sendPhotophoto/document/audio/video/animation/voice/video_note/sticker/live_photo via upload, file_id or URL; has_spoiler, show_caption_above_media, reply/quote/thread/protect/effect honoured; thumbnail, cover, start_timestamp, supports_streaming accepted and ignored; direct-messages-topic/suggested-post options → 400; business_connection_id supported (see sendMessage)
sendPollregular/quiz, anonymous/public, multiple answers, revoting, shuffle, hide results, open_period/close_date, is_closed, description, poll/option media (photo/video/animation/document/audio); members_only, country_codes, explanation_media → 400; allow_adding_options ignored; quiz needs exactly one correct option; business_connection_id supported (poll created by the account)
sendRichMessageDraftrich content validated, delivered as a plain-text draft
sendStickersee sendPhoto
sendVideosee sendPhoto
sendVideoNotesee sendPhoto
sendVoicesee sendPhoto
setManagedBotAccessSettingsstored and returned; not enforced on incoming messages yet
setPassportDataErrorsvalidated and stored; the server has no Telegram Passport forms to surface them
stopMessageLiveLocationsee editMessageLiveLocation
unpinAllForumTopicMessagesforum supergroups only; unpins the topic's pinned messages one by one

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