Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
python-telegram-bot
v22.1
Logo
python-telegram-bot
v22.1

Reference

  • telegram package
    • Bot
    • Available Types
      • AcceptedGiftTypes
      • Animation
      • Audio
      • Birthdate
      • BotCommand
      • BotCommandScope
      • BotCommandScopeAllChatAdministrators
      • BotCommandScopeAllGroupChats
      • BotCommandScopeAllPrivateChats
      • BotCommandScopeChat
      • BotCommandScopeChatAdministrators
      • BotCommandScopeChatMember
      • BotCommandScopeDefault
      • BotDescription
      • BotName
      • BotShortDescription
      • BusinessBotRights
      • BusinessConnection
      • BusinessIntro
      • BusinessLocation
      • BusinessOpeningHours
      • BusinessOpeningHoursInterval
      • BusinessMessagesDeleted
      • CallbackQuery
      • Chat
      • ChatAdministratorRights
      • ChatBackground
      • CopyTextButton
      • BackgroundType
      • BackgroundTypeFill
      • BackgroundTypeWallpaper
      • BackgroundTypePattern
      • BackgroundTypeChatTheme
      • BackgroundFill
      • BackgroundFillSolid
      • BackgroundFillGradient
      • BackgroundFillFreeformGradient
      • ChatBoost
      • ChatBoostAdded
      • ChatBoostRemoved
      • ChatBoostSource
      • ChatBoostSourceGiftCode
      • ChatBoostSourceGiveaway
      • ChatBoostSourcePremium
      • ChatBoostUpdated
      • ChatFullInfo
      • ChatInviteLink
      • ChatJoinRequest
      • ChatLocation
      • ChatMember
      • ChatMemberAdministrator
      • ChatMemberBanned
      • ChatMemberLeft
      • ChatMemberMember
      • ChatMemberOwner
      • ChatMemberRestricted
      • ChatMemberUpdated
      • ChatPermissions
      • ChatPhoto
      • ChatShared
      • Contact
      • Dice
      • Document
      • ExternalReplyInfo
      • File
      • ForceReply
      • ForumTopic
      • ForumTopicClosed
      • ForumTopicCreated
      • ForumTopicEdited
      • ForumTopicReopened
      • GeneralForumTopicHidden
      • GeneralForumTopicUnhidden
      • GiftInfo
      • Giveaway
      • GiveawayCompleted
      • GiveawayCreated
      • GiveawayWinners
      • InaccessibleMessage
      • InlineKeyboardButton
      • InlineKeyboardMarkup
      • InputFile
      • InputMedia
      • InputMediaAnimation
      • InputMediaAudio
      • InputMediaDocument
      • InputMediaPhoto
      • InputMediaVideo
      • InputPaidMedia
      • InputPaidMediaPhoto
      • InputPaidMediaVideo
      • InputProfilePhoto
      • InputProfilePhotoAnimated
      • InputProfilePhotoStatic
      • InputPollOption
      • InputStoryContent
      • InputStoryContentPhoto
      • InputStoryContentVideo
      • KeyboardButton
      • KeyboardButtonPollType
      • KeyboardButtonRequestChat
      • KeyboardButtonRequestUsers
      • LinkPreviewOptions
      • Location
      • LocationAddress
      • LoginUrl
      • MaybeInaccessibleMessage
      • MenuButton
      • MenuButtonCommands
      • MenuButtonDefault
      • MenuButtonWebApp
      • Message
      • MessageAutoDeleteTimerChanged
      • MessageEntity
      • MessageId
      • MessageOrigin
      • MessageOriginChannel
      • MessageOriginChat
      • MessageOriginHiddenUser
      • MessageOriginUser
      • MessageReactionCountUpdated
      • MessageReactionUpdated
      • OwnedGift
      • OwnedGiftRegular
      • OwnedGifts
      • OwnedGiftUnique
      • PaidMedia
      • PaidMediaInfo
      • PaidMediaPhoto
      • PaidMediaPreview
      • PaidMediaPurchased
      • PaidMediaVideo
      • PhotoSize
      • Poll
      • PollAnswer
      • PollOption
      • ProximityAlertTriggered
      • ReactionCount
      • ReactionType
      • ReactionTypeCustomEmoji
      • ReactionTypeEmoji
      • ReactionTypePaid
      • ReplyKeyboardMarkup
      • ReplyKeyboardRemove
      • ReplyParameters
      • SentWebAppMessage
      • SharedUser
      • Story
      • StoryArea
      • StoryAreaPosition
      • StoryAreaType
      • StoryAreaTypeLink
      • StoryAreaTypeLocation
      • StoryAreaTypeSuggestedReaction
      • StoryAreaTypeUniqueGift
      • StoryAreaTypeWeather
      • SwitchInlineQueryChosenChat
      • TelegramObject
      • TextQuote
      • UniqueGift
      • UniqueGiftBackdrop
      • UniqueGiftBackdropColors
      • UniqueGiftInfo
      • UniqueGiftModel
      • UniqueGiftSymbol
      • Update
      • User
      • UserChatBoosts
      • UserProfilePhotos
      • UsersShared
      • Venue
      • Video
      • VideoChatEnded
      • VideoChatParticipantsInvited
      • VideoChatScheduled
      • VideoChatStarted
      • VideoNote
      • Voice
      • WebAppData
      • WebAppInfo
      • WebhookInfo
      • WriteAccessAllowed
    • Stickers
      • Gift
      • Gifts
      • InputSticker
      • MaskPosition
      • Sticker
      • StickerSet
    • Inline Mode
      • ChosenInlineResult
      • InlineQuery
      • InlineQueryResult
      • InlineQueryResultArticle
      • InlineQueryResultAudio
      • InlineQueryResultCachedAudio
      • InlineQueryResultCachedDocument
      • InlineQueryResultCachedGif
      • InlineQueryResultCachedMpeg4Gif
      • InlineQueryResultCachedPhoto
      • InlineQueryResultCachedSticker
      • InlineQueryResultCachedVideo
      • InlineQueryResultCachedVoice
      • InlineQueryResultContact
      • InlineQueryResultDocument
      • InlineQueryResultGame
      • InlineQueryResultGif
      • InlineQueryResultLocation
      • InlineQueryResultMpeg4Gif
      • InlineQueryResultPhoto
      • InlineQueryResultsButton
      • InlineQueryResultVenue
      • InlineQueryResultVideo
      • InlineQueryResultVoice
      • InputMessageContent
      • InputTextMessageContent
      • InputLocationMessageContent
      • InputVenueMessageContent
      • InputContactMessageContent
      • InputInvoiceMessageContent
      • PreparedInlineMessage
    • Payments
      • AffiliateInfo
      • Invoice
      • LabeledPrice
      • OrderInfo
      • PreCheckoutQuery
      • RefundedPayment
      • RevenueWithdrawalState
      • RevenueWithdrawalStateFailed
      • RevenueWithdrawalStatePending
      • RevenueWithdrawalStateSucceeded
      • ShippingAddress
      • ShippingOption
      • ShippingQuery
      • StarAmount
      • StarTransaction
      • StarTransactions
      • SuccessfulPayment
      • TransactionPartner
      • TransactionPartnerAffiliateProgram
      • TransactionPartnerChat
      • TransactionPartnerFragment
      • TransactionPartnerOther
      • TransactionPartnerTelegramAds
      • TransactionPartnerTelegramApi
      • TransactionPartnerUser
    • Games
      • Callbackgame
      • Game
      • GameHighScore
    • Passport
      • Credentials
      • DataCredentials
      • EncryptedCredentials
      • EncryptedPassportElement
      • FileCredentials
      • IdDocumentData
      • PassportData
      • PassportElementError
      • PassportElementErrorDataField
      • PassportElementErrorFile
      • PassportElementErrorFiles
      • PassportElementErrorFrontSide
      • PassportElementErrorReverseSide
      • PassportElementErrorSelfie
      • PassportElementErrorTranslationFile
      • PassportElementErrorTranslationFiles
      • PassportElementErrorUnspecified
      • PassportFile
      • PersonalDetails
      • ResidentialAddress
      • SecureData
      • SecureValue
  • telegram.ext package
    • Application
    • ApplicationBuilder
    • ApplicationHandlerStop
    • BaseUpdateProcessor
    • CallbackContext
    • ContextTypes
    • Defaults
    • ExtBot
    • Job
    • JobQueue
    • SimpleUpdateProcessor
    • Updater
    • Handlers
      • BaseHandler
      • BusinessConnectionHandler
      • BusinessMessagesDeletedHandler
      • CallbackQueryHandler
      • ChatBoostHandler
      • ChatJoinRequestHandler
      • ChatMemberHandler
      • ChosenInlineResultHandler
      • CommandHandler
      • ConversationHandler
      • filters Module
      • InlineQueryHandler
      • MessageHandler
      • MessageReactionHandler
      • PaidMediaPurchasedHandler
      • PollAnswerHandler
      • PollHandler
      • PreCheckoutQueryHandler
      • PrefixHandler
      • ShippingQueryHandler
      • StringCommandHandler
      • StringRegexHandler
      • TypeHandler
    • Persistence
      • BasePersistence
      • DictPersistence
      • PersistenceInput
      • PicklePersistence
    • Arbitrary Callback Data
      • CallbackDataCache
      • InvalidCallbackData
    • Rate Limiting
      • BaseRateLimiter
      • AIORateLimiter
  • Auxiliary modules
    • telegram.constants Module
    • telegram.error Module
    • telegram.helpers Module
    • telegram.request Module
      • BaseRequest
      • RequestData
      • HTTPXRequest
    • telegram.warnings Module
  • Telegrams Bot API Docs

Resources

  • Examples
    • arbitrarycallbackdatabot.py
    • chatmemberbot.py
    • contexttypesbot.py
    • conversationbot.py
    • conversationbot2.py
    • customwebhookbot.py
    • deeplinking.py
    • echobot.py
    • errorhandlerbot.py
    • inlinebot.py
    • inlinekeyboard.py
    • inlinekeyboard2.py
    • nestedconversationbot.py
    • passportbot.py
    • paymentbot.py
    • persistentconversationbot.py
    • pollbot.py
    • rawapibot.py
    • timerbot.py
    • webappbot.py
  • Wiki

Project

  • Stability Policy
  • Changelog
  • Contributor Covenant Code of Conduct
  • How To Contribute
  • Testing in PTB
  • Website
  • GitHub Repository
  • Telegram Channel
  • Telegram User Group
Back to top
View this page
Edit this page

MenuButtonWebApp¶

class telegram.MenuButtonWebApp(text, web_app, *, api_kwargs=None)[source]¶

Bases: telegram.MenuButton

Represents a menu button, which launches a Web App.

Objects of this class are comparable in terms of equality. Two objects of this class are considered equal, if their type, text and web_app are equal.

Use In

telegram.Bot.set_chat_menu_button()

Returned In

telegram.Bot.get_chat_menu_button()

Added in version 20.0.

Parameters:
  • text (str) – Text of the button.

  • web_app (telegram.WebAppInfo) – Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery() of Bot. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App’s URL, in which case the Web App will be opened as if the user pressed the link.

type[source]¶

'web_app'.

Type:

str

text[source]¶

Text of the button.

Type:

str

web_app[source]¶

Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery() of Bot. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App’s URL, in which case the Web App will be opened as if the user pressed the link.

Type:

telegram.WebAppInfo

classmethod de_json(data, bot=None)[source]¶

See telegram.TelegramObject.de_json().

Next
Message
Previous
MenuButtonDefault
Copyright © 2015-2025, Leandro Toledo
Made with Sphinx and @pradyunsg's Furo
On this page
  • MenuButtonWebApp
    • MenuButtonWebApp
      • MenuButtonWebApp.type
      • MenuButtonWebApp.text
      • MenuButtonWebApp.web_app
      • MenuButtonWebApp.de_json()