Description

This event is generated when a user presses a button. 

{
    "name": "client.pressButton",
    "userId": "u:cfc76545-3400-4864-892a-513a9f4ae409",
    "button": "chatTabButton",
    "userName": "Alyssa P. Hacker",
    "chat": "u:1e6429de-16b7-48b3-acc0-c2d7ec5ad195",
    "chatName": "Ben Bitdiddle"
}

Event Attributes

Attribute NameAttribute TypeAttribute Description
userIdStringUser identifier
buttonString

The button that was pressed. This should have any one of the following values:

  • chatTabButton
  • appLauncherButton
  • attachmentPickerButton
  • attachmentButton
userNameStringName of the user
chatStringId of the user or group whose chat tab is open
chatNameStringName of the user or group whose chat tab is open

messageUid

String

uid of the message in which the attachment button was pressed. Available only for an attachment button.

attachmentIdStringid of the attachment, if provided. Available only for an attachment button.
buttonIdStringButton identifier. Only sent for an attachment buttons, use it to distinguish one attachment button from another.

Response

Your app can respond with a text value – this should be a short (upto 100 chars) string that is displayed to the user who pressed the button.

{
    "text": "<toaster message>"
}