RU Open Web

Type to search client APIs, Bot API methods, and guides.

Bots & Mini Apps — Updates, Messaging & Inline Mode
Bots & Mini Apps Updates, Messaging & Inline Mode

Updates, Messaging & Inline Mode

Reference for getUpdates, webhooks (X-Theaver-Bot-Api-Secret-Token), messages, inline keyboards, polls, moderation, and inline queries.

Receiving updates: Long Polling & Webhooks

getUpdates (Long Polling)

POST /bot<token>/getUpdates
Bot Token
FieldTypeDescription
offsetIntegerIdentifier of the first update to be returned (last_update_id + 1 acknowledges earlier items)
limitIntegerMaximum updates per request (1–100, default 100)
timeoutIntegerLong-polling timeout in seconds (up to 50)
allowed_updatesArray of StringEvent filter (message, edited_message, channel_post, callback_query, inline_query)

setWebhook / deleteWebhook / getWebhookInfo

POST /bot<token>/setWebhook
Bot Token

Provide an HTTPS URL and an optional secret_token. Theaver sends secret_token in the X-Theaver-Bot-Api-Secret-Token HTTP header on every webhook delivery (alongside legacy compatibility headers noted in Migrating Bots).

Sending & editing messages

MethodKey parametersPurpose
getMe—Fetch bot User object (is_bot, can_join_groups, supports_inline_queries, has_main_web_app)
sendMessagechat_id, text, parse_mode, entities, reply_parameters, reply_markup, disable_notification, message_thread_idSend formatted text message
sendMediaGroupchat_id, mediaSend multi-item album of photos, videos, or documents
sendPhoto, sendDocument, sendVideo, sendAudio, sendVoice, sendVideoNote, sendAnimation, sendStickerchat_id, media field or upload, caption, reply_markupSend rich media attachments
sendLocation, sendVenue, sendContactchat_id, coordinates / contactShare location, venue, or phone contact
sendDicechat_id, emojiSend animated dice roll (dice.value)
sendPoll, stopPollchat_id, question, options, type (regular | quiz)Create and close polls or quizzes
editMessageText, editMessageCaption, editMessageReplyMarkupchat_id, message_idUpdate existing message text or buttons
deleteMessage, deleteMessageschat_id, message_id / message_idsDelete messages in bulk
forwardMessage, forwardMessages, copyMessage, copyMessageschat_id, from_chat_idForward or copy content
setMessageReactionchat_id, message_id, reactionReact to messages
sendChatActionchat_id, actionBroadcast typing or upload activity

Keyboards, callbacks & inline queries

  • reply_markup types: InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply.
  • answerCallbackQuery: answer inline button taps (callback_query_id, text, show_alert, url, cache_time).
  • answerInlineQuery: return inline results triggered via @bot query (inline_query_id, results, next_offset, switch_pm_text, switch_pm_parameter).
  • answerWebAppQuery & savePreparedInlineMessage: let Mini Apps share prepared interactive messages.

Group & channel moderation

Admin bots support getChat, getChatMember, getChatMemberCount, getChatAdministrators, banChatMember, unbanChatMember, restrictChatMember, promoteChatMember, approveChatJoinRequest, declineChatJoinRequest, pinChatMessage, unpinChatMessage, createChatInviteLink, exportChatInviteLink, and leaveChat.