- JSON representation
- CommonEventObject
- TimeZone
- Inputs
- StringInputs
- DateTimeInput
- DateInput
- TimeInput
Google Chat events.
JSON representation |
---|
{ "type": enum ( |
Fields | |
---|---|
type |
The type of the event. |
eventTime |
The timestamp indicating when the 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. |
threadKey |
The Chat app-defined key for the thread related to the event. See |
message |
The message that triggered the event, if applicable. |
user |
The user that triggered the event. |
space |
The space in which the event occurred. |
action |
The form action data associated with an interactive card that was clicked. Only populated for |
configCompleteRedirectUrl |
The URL the Chat app should redirect the user to after they have completed an authorization or configuration flow outside of Google Chat. For more information, see Connect a Chat app with other services & tools. |
isDialogEvent |
True when the event is related to dialogs. |
dialogEventType |
The type of dialog 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 | |
---|---|
userLocale |
The full |
hostApp |
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 ( |
timeZone |
The timezone ID and offset from Coordinated Universal Time (UTC). |
formInputs |
A map containing the current values of the widgets in a card. The map keys are the string IDs assigned to each widget, and the values represent inputs to the widget. Depending on the input data type, a different object represents each input: For single-value widgets, |
parameters |
Custom parameters passed to the invoked function. Both keys and values must be strings. |
invokedFunction |
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). Not supported by Chat apps.
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 inputs for widgets. Users enter data with these inputs.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field
|
|
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. |
dateTimeInput |
Date and time input values. Not supported by Chat apps. |
dateInput |
Date input values. Not supported by Chat apps. |
timeInput |
Time input values. Not supported by Chat apps. |
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 array of strings entered by the user. |
DateTimeInput
Date and time input values. Not supported by Chat apps.
JSON representation |
---|
{ "msSinceEpoch": string, "hasDate": boolean, "hasTime": boolean } |
Fields | |
---|---|
msSinceEpoch |
Time since epoch time, in milliseconds. |
hasDate |
Whether the |
hasTime |
Whether the |
DateInput
Date input values. Not supported by Chat apps.
JSON representation |
---|
{ "msSinceEpoch": string } |
Fields | |
---|---|
msSinceEpoch |
Time since epoch time, in milliseconds. |
TimeInput
Time input values. Not supported by Chat apps.
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. |