- JSON representation
- CommonEventObject
- TimeZone
- Inputs
- StringInputs
- DateTimeInput
- DateInput
- TimeInput
A Google Chat app interaction event that represents and contains data about a user's interaction with a Chat app. To configure your Chat app to receive interaction events, see Receive and respond to user interactions.
In addition to receiving events from user interactions, Chat apps can receive events about changes to spaces, such as when a new member is added to a space. To learn about space events, see Work with events from Google Chat.
JSON representation |
---|
{ "type": enum ( |
Fields | |
---|---|
type |
The type of user interaction with the Chat app, such as |
event |
The timestamp indicating when the interaction event occurred. |
token |
A secret value that legacy Chat apps can use to verify if a request is from Google. Google randomly generates the token, and its value remains static. You can obtain, revoke, or regenerate the token from the Chat API configuration page in the Google Cloud Console. Modern Chat apps don't use this field. It is absent from API responses and the Chat API configuration page. |
thread |
The Chat app-defined key for the thread related to the interaction event. See |
message |
For |
user |
The user that interacted with the Chat app. |
space |
The space in which the user interacted with the Chat app. |
action |
For |
config |
For |
is |
For |
dialog |
The type of dialog interaction event received. |
common |
Represents information about the user's client, such as locale, host app, and platform. For Chat apps, |
CommonEventObject
Represents information about the user's client, such as locale, host app, and platform. For Chat apps, CommonEventObject
includes data submitted by users interacting with cards, like data entered in dialogs.
JSON representation |
---|
{ "userLocale": string, "hostApp": enum ( |
Fields | |
---|---|
user |
The full |
host |
The hostApp enum which indicates the app the add-on is invoked from. Always |
platform |
The platform enum which indicates the platform where the event originates ( |
time |
The timezone ID and offset from Coordinated Universal Time (UTC). Only supported for the event types |
form |
A map containing the values that a user inputs in a widget from a card or dialog. The map keys are the string IDs assigned to each widget, and the values represent inputs to the widget. For details, see Process information inputted by users. |
parameters |
Custom parameters passed to the invoked function. Both keys and values must be strings. |
invoked |
Name of the invoked function associated with the widget. Only set for Chat apps. |
TimeZone
The timezone ID and offset from Coordinated Universal Time (UTC). Only supported for the event types CARD_CLICKED
and SUBMIT_DIALOG
.
JSON representation |
---|
{ "id": string, "offset": integer } |
Fields | |
---|---|
id |
The IANA TZ time zone database code, such as "America/Toronto". |
offset |
The user timezone offset, in milliseconds, from Coordinated Universal Time (UTC). |
Inputs
Types of data that users can input on cards or dialogs. The input type depends on the type of values that the widget accepts.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
string |
A list of strings that represent the values that the user inputs in a widget. If the widget only accepts one value, such as a |
date |
Date and time input values from a |
date |
Date input values from a |
time |
Time input values from a |
StringInputs
Input parameter for regular widgets. For single-valued widgets, it is a single value list. For multi-valued widgets, such as checkbox, all the values are presented.
JSON representation |
---|
{ "value": [ string ] } |
Fields | |
---|---|
value[] |
An list of strings entered by the user. |
DateTimeInput
Date and time input values.
JSON representation |
---|
{ "msSinceEpoch": string, "hasDate": boolean, "hasTime": boolean } |
Fields | |
---|---|
ms |
Time since epoch time, in milliseconds. |
has |
Whether the |
has |
Whether the |
DateInput
Date input values.
JSON representation |
---|
{ "msSinceEpoch": string } |
Fields | |
---|---|
ms |
Time since epoch time, in milliseconds. |
TimeInput
Time input values.
JSON representation |
---|
{ "hours": integer, "minutes": integer } |
Fields | |
---|---|
hours |
The hour on a 24-hour clock. |
minutes |
The number of minutes past the hour. Valid values are 0 to 59. |