Button

This object represents button of reply. Button must have a button_callback which is the unique identifier defined by bot. 

FieldTypeRequiredDescription
button_callbackStringYesThis is unique identifier as defined by bot.

The button_callback returned in inlineMessageCallback and ChatMenuCallbakc when button pressed.

next_menuMenuOptionalMenu unique identifier  that reference the next menu to navigate to it when the button pressed.
button_spanIntegerOptionalButton Span
button_orderIntegerOptionalThe number of button order by ascending
button_text_colorStringOptionalText color of the button Title The color should be  in hexadecimal format (Hex triplet ) or according to its common English name .
Example : Red color can be set as “RED” or  “#FF0000”
button_bg_colorStringOptionalButton background color .The color should be  in hexadecimal format (Hex triplet ) or according to its common English name .
Example : Red color can be set as “RED” or  “#FF0000”
button_labelStringOptionalButton label or title.
button_urlStringOptionalButton URL. When button pressed, an external URL link will be opened.
button_queryStringOptionalField used to query information from app, this can take one of two values as follows

Location: to ask user to get location or point of map information.

Contact : to ask user to get his  contact number.

button_chatChatOptionalChat unique identifier that reference the specific chat to be opened when button is pressed. if button_url and button_chat are both defined, button_chat  priority to button_chat.

 

Was this helpful to you?