Prompts the user to select and share one or more peers with the bot using messages.sendBotRequestedPeer.
Use this constructor to send a keyboardButtonRequestPeer button in a reply keyboard in a private chat.
See peer requests for the full flow.
inputKeyboardButtonRequestPeer#2b78156 flags:# name_requested:flags.0?true username_requested:flags.1?true photo_requested:flags.2?true style:flags.10?KeyboardButtonStyle text:string button_id:int peer_type:RequestPeerType max_quantity:int = KeyboardButton;
| Name | Type | Description |
|---|---|---|
| flags | # | Flags, see TL conditional fields |
| name_requested | flags.0?true | Set this flag to request the peer's name. |
| username_requested | flags.1?true | Set this flag to request the peer's @username (if any). |
| photo_requested | flags.2?true | Set this flag to request the peer's photo (if any). |
| style | flags.10?KeyboardButtonStyle | Button style, see here ยป for more info on button styles. |
| text | string | Button text |
| button_id | int | Button ID, to be passed to messages.sendBotRequestedPeer. |
| peer_type | RequestPeerType | Filtering criteria to use for the peer selection list shown to the user. The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed. |
| max_quantity | int | Maximum number of peers that can be chosen. |
Users can interact with your bot via buttons or even inline buttons, straight from inline messages in any chat.
Send one or more chosen peers, as requested by a keyboardButtonRequestPeer button.
Prompts the user to select and share one or more peers with the bot using messages.sendBotRequestedPeer
Available only in private chats, in reply keyboards.
See peer requests for the full flow.
This page describes individual bot elements in greater detail. For a general overview of bots, read the introduction to bots first.