Note that the Inline Menu data type falls under the Message data type.
Menu
Each menu consists of a set of rows. At least one row should be defined.
Field | Type | Required | Description |
menu_ref | String | Yes | Unique identifier of this menu as defined by bot. |
rows | Array of Row | Yes | Row: an array of buttons. (Rows belongs to this menu) |
Row
Each row belongs to a keypad menu (1 keypad menu) that consists of a set of buttons. At least one button should be defined.
Field | Type | Required | Description |
buttons | Array of Button | Yes | Buttons belongs to the row. |
row_order | Integer | Yes | Row order in the menu. |
Button
This object represents the button for replying. The button must have a button_callback, which is the unique identifier defined by the bot.
Field | Type | Required | Description |
button_callback | String | Yes | Unique identifier as defined by Bot. The button_callback returns in inlineMessageCallback and chatMenuCallback when the button is pressed. |
next_menu | Optional | Menu unique identifier: references the next menu to navigate to it when the button is pressed. | |
button_span | Integer | Optional | Button Span |
button_order | Integer | Optional | The number of buttons is ordered in ascending order. |
button_text_color | String | Optional | Text color for the button title: The color should be in hexadecimal format (Hex triplet) or according to its common English name.
Example: You can set the red color to either 'RED' or '#FF0000'. |
button_bgColor | String | Optional | Button background color: the color should be in hexadecimal format (Hex triplet ) or according to its common English name.
Example: You can set the red color to either 'RED' or '#FF0000'. |
button_label | String | Optional | Button label or title. |
button_url | String | Optional | Button URL: when the button is pressed, an external URL link will be opened. |
button_query | String | Optional | The app's query field accepts one of two values:
Location: to ask the user to get location or point of map information. Contact: to ask the user to get his contact number. |
chat | Optional | Chat is a unique identifier that references the specific Channel or Group to be opened when a button is pressed. The user should be a member of the specified Channel or Group. If button_url and chat are both defined, both will be executed. | |
nav_type | String | Optional | \-Null is the default to show the navigation button for Channel, Group or Contact. Type ‘admin’ to show the admin navigation button in the chat setting. |
ButtonQueryResult
This object represents an incoming button query result from a callback button.
Field | Type | Required | Description |
latitude | String | Optional | Only sent in case of buttonQuery is Location. |
longitude | String | Optional | Only sent in case of buttonQuery is Location. |
contact | String | Option | Only sent in case of buttonQuery is Phone_number. |
Read more about the inline menu topic here.