Skip to main content

inlineButtons

inlineButtons are displayed inside the chat as chatbot responses. By clicking on the inline button callback_data or URL can be sent.

caution
Only certain channels support inline buttons.

Syntax

  • The name of each button and each callback_data or URL that corresponds to that button is specified in braces {} after the tag:
    • text — button name,
    • url — link to a website,
    • callback_data — callback data.
info

Please note that the text key is required for objects passed in the inlineButtons tag.

inlineButtons:{
text:"button name", // Required
url:"link to a website"
}
inlineButtons:{
text:"Subscribe to updates", // Required
callback_data: "Subscribe"
}

Channel restrictions

  1. Telegram:

    • The button’s text maximum length is 15 symbols. Button text outside the limit moves to the next line.
    • If the size of the data in callback_data exceeds 64 bytes, the exceeded data will be cut.
    • For each set of inline buttons, there should be at least one text reply in the bot message.
  2. Viber:

    • The maximum number of button rows is 7.

How to use

caution
The buttons and inlineButtons tags cannot be applied to a single response specified in the a tag simultaneously. Instead, several responses can be added to a single state and different types of buttons can be applied to each response.

Telegram

state: inlineButtons
q!: Instruction
a: Check out the instruction on our website.
inlineButtons:
{text:"Go to website", url:"https://example.com"}