Индекс
-
ChatService
(интерфейс) -
AccessoryWidget
(сообщение) -
ActionResponse
(сообщение) -
ActionResponse.ResponseType
(перечисление) -
ActionResponse.SelectionItems
(сообщение) -
ActionResponse.UpdatedWidget
(сообщение) -
ActionStatus
(сообщение) -
Annotation
(сообщение) -
AnnotationType
(перечисление) -
AppCommandMetadata
(сообщение) -
AppCommandMetadata.AppCommandType
(перечисление) -
AttachedGif
(сообщение) -
Attachment
(сообщение) -
Attachment.Source
(перечисление) -
AttachmentDataRef
(сообщение) -
CardWithId
(сообщение) -
ChatSpaceLinkData
(сообщение) -
CompleteImportSpaceRequest
(сообщение) -
CompleteImportSpaceResponse
(сообщение) -
ContextualAddOnMarkup
(сообщение) -
ContextualAddOnMarkup.Card
(сообщение) -
ContextualAddOnMarkup.Card.CardAction
(сообщение) -
ContextualAddOnMarkup.Card.CardHeader
(сообщение) -
ContextualAddOnMarkup.Card.CardHeader.ImageStyle
(перечисление) -
ContextualAddOnMarkup.Card.Section
(сообщение) -
CreateCustomEmojiRequest
(сообщение) -
CreateMembershipRequest
(сообщение) -
CreateMessageRequest
(сообщение) -
CreateMessageRequest.MessageReplyOption
(перечисление) -
CreateReactionRequest
(сообщение) -
CreateSpaceRequest
(сообщение) -
CustomEmoji
(сообщение) -
CustomEmoji.CustomEmojiPayload
(сообщение) -
CustomEmojiMetadata
(сообщение) -
DeleteCustomEmojiRequest
(сообщение) -
DeleteMembershipRequest
(сообщение) -
DeleteMessageRequest
(сообщение) -
DeleteReactionRequest
(сообщение) -
DeleteSpaceRequest
(сообщение) -
DeletionMetadata
(сообщение) -
DeletionMetadata.DeletionType
(перечисление) -
Dialog
(сообщение) -
DialogAction
(сообщение) -
DriveDataRef
(сообщение) -
DriveLinkData
(сообщение) -
Emoji
(сообщение) -
EmojiReactionSummary
(сообщение) -
FindDirectMessageRequest
(сообщение) -
GetAttachmentRequest
(сообщение) -
GetCustomEmojiRequest
(сообщение) -
GetMembershipRequest
(сообщение) -
GetMessageRequest
(сообщение) -
GetSpaceEventRequest
(сообщение) -
GetSpaceNotificationSettingRequest
(сообщение) -
GetSpaceReadStateRequest
(сообщение) -
GetSpaceRequest
(сообщение) -
GetThreadReadStateRequest
(сообщение) -
Group
(сообщение) -
HistoryState
(перечисление) -
ListCustomEmojisRequest
(сообщение) -
ListCustomEmojisResponse
(сообщение) -
ListMembershipsRequest
(сообщение) -
ListMembershipsResponse
(сообщение) -
ListMessagesRequest
(сообщение) -
ListMessagesResponse
(сообщение) -
ListReactionsRequest
(сообщение) -
ListReactionsResponse
(сообщение) -
ListSpaceEventsRequest
(сообщение) -
ListSpaceEventsResponse
(сообщение) -
ListSpacesRequest
(сообщение) -
ListSpacesResponse
(сообщение) -
MatchedUrl
(сообщение) -
Membership
(сообщение) -
Membership.MembershipRole
(перечисление) -
Membership.MembershipState
(перечисление) -
MembershipBatchCreatedEventData
(сообщение) -
MembershipBatchDeletedEventData
(сообщение) -
MembershipBatchUpdatedEventData
(сообщение) -
MembershipCreatedEventData
(сообщение) -
MembershipDeletedEventData
(сообщение) -
MembershipUpdatedEventData
(сообщение) -
Message
(сообщение) -
MessageBatchCreatedEventData
(сообщение) -
MessageBatchDeletedEventData
(сообщение) -
MessageBatchUpdatedEventData
(сообщение) -
MessageCreatedEventData
(сообщение) -
MessageDeletedEventData
(сообщение) -
MessageUpdatedEventData
(сообщение) -
QuotedMessageMetadata
(сообщение) -
Reaction
(сообщение) -
ReactionBatchCreatedEventData
(сообщение) -
ReactionBatchDeletedEventData
(сообщение) -
ReactionCreatedEventData
(сообщение) -
ReactionDeletedEventData
(сообщение) -
RichLinkMetadata
(сообщение) -
RichLinkMetadata.RichLinkType
(перечисление) -
SearchSpacesRequest
(сообщение) -
SearchSpacesResponse
(сообщение) -
SetUpSpaceRequest
(сообщение) -
SlashCommand
(сообщение) -
SlashCommandMetadata
(сообщение) -
SlashCommandMetadata.Type
(перечисление) -
Space
(сообщение) -
Space.AccessSettings
(сообщение) -
Space.AccessSettings.AccessState
(перечисление) -
Space.MembershipCount
(сообщение) -
Space.PermissionSetting
(сообщение) -
Space.PermissionSettings
(сообщение) -
Space.PredefinedPermissionSettings
(перечисление) -
Space.SpaceDetails
(сообщение) -
Space.SpaceThreadingState
(перечисление) -
Space.SpaceType
(перечисление) -
Space.Type
(перечисление) -
SpaceBatchUpdatedEventData
(сообщение) -
SpaceEvent
(сообщение) -
SpaceNotificationSetting
(сообщение) -
SpaceNotificationSetting.MuteSetting
(перечисление) -
SpaceNotificationSetting.NotificationSetting
(перечисление) -
SpaceReadState
(сообщение) -
SpaceUpdatedEventData
(сообщение) -
Thread
(сообщение) -
ThreadReadState
(сообщение) -
UpdateMembershipRequest
(сообщение) -
UpdateMessageRequest
(сообщение) -
UpdateSpaceNotificationSettingRequest
(сообщение) -
UpdateSpaceReadStateRequest
(сообщение) -
UpdateSpaceRequest
(сообщение) -
User
(сообщение) -
User.Type
(перечисление) -
UserMentionMetadata
(сообщение) -
UserMentionMetadata.Type
(перечисление) -
WidgetMarkup
(сообщение) -
WidgetMarkup.Button
(сообщение) -
WidgetMarkup.FormAction
(сообщение) -
WidgetMarkup.FormAction.ActionParameter
(сообщение) -
WidgetMarkup.Icon
(перечисление) -
WidgetMarkup.Image
(сообщение) -
WidgetMarkup.ImageButton
(сообщение) -
WidgetMarkup.KeyValue
(сообщение) -
WidgetMarkup.OnClick
(сообщение) -
WidgetMarkup.OpenLink
(сообщение) -
WidgetMarkup.TextButton
(сообщение) -
WidgetMarkup.TextParagraph
(сообщение)
ЧатСервис
Позволяет разработчикам создавать чат-приложения и интегрировать их на платформе Google Chat.
CompleteImportSpace |
---|
Завершает процесс импорта указанного пространства и делает его видимым для пользователей. Требуется аутентификация пользователя и делегирование полномочий на уровне всего домена с областью авторизации :
Дополнительную информацию см. в статье Разрешение приложениям Google Chat импортировать данные .
|
CreateCustomEmoji |
---|
Создает пользовательский эмодзи. Пользовательские эмодзи доступны только для учётных записей Google Workspace, и администратор должен включить их для организации. Подробнее см. в статьях «Подробнее о пользовательских эмодзи в Google Chat» и «Управление разрешениями на использование пользовательских эмодзи» . Требуется аутентификация пользователя с областью авторизации :
|
Создать членство |
---|
Создаёт членство для вызывающего приложения Chat, пользователя или группы Google. Создание членств для других приложений Chat не поддерживается. При создании членства, если у указанного участника отключена политика автоматического принятия, он получает приглашение и должен принять его перед присоединением. В противном случае создание членства добавляет участника непосредственно в указанное пространство. Поддерживает следующие типы аутентификации :
Аутентификация приложения не поддерживается в следующих случаях использования:
Пример использования см.:
|
Создать сообщение |
---|
Создаёт сообщение в чате Google. Пример см. в разделе «Отправить сообщение» . Поддерживает следующие типы аутентификации :
Чат по-разному атрибутирует отправителя сообщения в зависимости от типа аутентификации, который вы используете в своем запросе. На следующем изображении показано, как Chat атрибутирует сообщение при использовании аутентификации приложения. Chat отображает приложение Chat в качестве отправителя сообщения. Содержимое сообщения может содержать текст ( На следующем изображении показано, как Chat атрибутирует сообщение при использовании аутентификации пользователя. Chat отображает пользователя как отправителя сообщения и атрибутирует приложение Chat, отображая его имя. Содержимое сообщения может содержать только текст ( Максимальный размер сообщения, включая содержимое сообщения, составляет 32 000 байт. В ответе на запросы вебхуков не содержится полное сообщение. В дополнение к информации, содержащейся в запросе, в ответе заполняются только поля
|
CreateReaction |
---|
Создаёт реакцию и добавляет её к сообщению. Пример см. в разделе Добавление реакции к сообщению . Требуется аутентификация пользователя с одной из следующих областей авторизации :
|
CreateSpace |
---|
Создаёт пространство. Может использоваться для создания именованного пространства или группового чата в Поддерживает следующие типы аутентификации :
При аутентификации в качестве приложения в запросе необходимо указать поле При аутентификации в качестве приложения приложение Chat добавляется в качестве участника пространства. Однако, в отличие от аутентификации пользователя, приложение Chat не добавляется в качестве менеджера пространства. По умолчанию все участники пространства могут удалить приложение Chat из пространства. Чтобы разрешить удалять приложение из пространства только менеджерам пространства, установите для Членство в пространстве при его создании зависит от того, создано ли пространство в
Если при создании пространства появляется сообщение об ошибке
|
DeleteCustomEmoji |
---|
Удаляет пользовательский эмодзи. По умолчанию пользователи могут удалять только созданные ими пользовательские эмодзи. Менеджеры эмодзи, назначенные администратором, могут удалять любые пользовательские эмодзи в организации. Подробнее о пользовательских эмодзи в Google Chat . Пользовательские эмодзи доступны только для учётных записей Google Workspace, и администратор должен включить их для организации. Подробнее см. в статьях «Подробнее о пользовательских эмодзи в Google Chat» и «Управление разрешениями на использование пользовательских эмодзи» . Требуется аутентификация пользователя с областью авторизации :
|
Удалить членство |
---|
Удаляет членство. Пример см. в разделе Удаление пользователя или приложения Google Chat из чат-группы . Поддерживает следующие типы аутентификации :
Аутентификация приложения не поддерживается в следующих случаях использования:
Чтобы удалить членство менеджеров пространства, отправитель запроса должен быть менеджером пространства. Если вы используете аутентификацию через приложение, приложение Chat должно быть создателем пространства.
|
Удалить сообщение |
---|
Удаляет сообщение. Пример см. в разделе Удаление сообщения . Поддерживает следующие типы аутентификации :
При использовании аутентификации приложения запросы могут удалять только сообщения, созданные вызывающим приложением Chat.
|
УдалитьРеакцию |
---|
Удаляет реакцию на сообщение. Пример см. в разделе Удаление реакции . Требуется аутентификация пользователя с одной из следующих областей авторизации :
|
DeleteSpace |
---|
Удаляет именованное пространство. Всегда выполняет каскадное удаление, то есть дочерние ресурсы пространства, такие как опубликованные в нём сообщения и данные о членстве в нём, также удаляются. Пример см. в разделе Удаление пространства . Поддерживает следующие типы аутентификации :
|
FindDirectMessage |
---|
Возвращает существующую прямую переписку с указанным пользователем. Если место для прямой переписки не найдено, возвращается ошибка При аутентификации приложения возвращает пространство для прямого сообщения между указанным пользователем и вызывающим приложением Chat. При аутентификации пользователя возвращает пространство для прямых сообщений между указанным пользователем и аутентифицированным пользователем. Поддерживает следующие типы аутентификации :
|
GetAttachment |
---|
Получает метаданные вложения к сообщению. Данные вложения извлекаются с помощью API медиа . Пример см. в разделе Получение метаданных о вложении к сообщению . Требуется аутентификация приложения с областью авторизации :
|
GetCustomEmoji |
---|
Возвращает сведения о пользовательском эмодзи. Пользовательские эмодзи доступны только для учётных записей Google Workspace, и администратор должен включить их для организации. Подробнее см. в статьях «Подробнее о пользовательских эмодзи в Google Chat» и «Управление разрешениями на использование пользовательских эмодзи» . Требуется аутентификация пользователя с одной из следующих областей авторизации :
|
Получить членство |
---|
Возвращает информацию о членстве. Пример см. в разделе Получение информации о членстве пользователя или приложения Google Chat . Поддерживает следующие типы аутентификации :
|
GetMessage |
---|
Возвращает сведения о сообщении. Пример см. в разделе Получить сведения о сообщении . Поддерживает следующие типы аутентификации :
Примечание: может вернуться сообщение от заблокированного участника или пространства.
|
GetSpace |
---|
Возвращает информацию о пространстве. Пример см. в разделе Получить информацию о пространстве . Поддерживает следующие типы аутентификации :
Аутентификация приложения имеет следующие ограничения:
|
GetSpaceEvent |
---|
Возвращает событие из чат-группы Google. Событие содержит последнюю версию ресурса, который изменился. Например, если вы запрашиваете событие о новом сообщении, но сообщение было позже обновлено, сервер возвращает обновлённый ресурс Примечание: Поле Требуется аутентификация пользователя с областью полномочий, подходящей для чтения запрашиваемых данных:
Чтобы получить событие, аутентифицированный пользователь должен быть участником пространства. Например, см. раздел Получение сведений о событии из чат-пространства Google .
|
GetSpaceNotificationSetting |
---|
Получает настройки уведомлений о наличии свободного пространства. Пример см. в разделе Получение настроек уведомлений о наличии свободного пространства у вызывающего абонента . Требуется аутентификация пользователя с областью авторизации :
|
GetSpaceReadState |
---|
Возвращает сведения о состоянии чтения пользователя в спейсе, используемые для идентификации прочитанных и непрочитанных сообщений. Пример см. в разделе Получение сведений о состоянии чтения пользователя в спейсе . Требуется аутентификация пользователя с одной из следующих областей авторизации :
|
GetThreadReadState |
---|
Возвращает сведения о состоянии чтения пользователя в потоке, используемые для идентификации прочитанных и непрочитанных сообщений. Пример см. в разделе Получение сведений о состоянии чтения потока пользователя . Требуется аутентификация пользователя с одной из следующих областей авторизации :
|
Список пользовательских эмодзи |
---|
Список пользовательских эмодзи, которые видны аутентифицированному пользователю. Пользовательские эмодзи доступны только для учётных записей Google Workspace, и администратор должен включить их для организации. Подробнее см. в статьях «Подробнее о пользовательских эмодзи в Google Chat» и «Управление разрешениями на использование пользовательских эмодзи» . Требуется аутентификация пользователя с одной из следующих областей авторизации :
|
Списокчленств |
---|
Список участников в пространстве. Пример см. в разделе Список пользователей и приложений Google Chat в пространстве . Список участников с аутентификацией приложения содержит список участников в пространствах, к которым приложение Chat имеет доступ, но не содержит участников в самом приложении Chat, включая его собственное. Список участников с аутентификацией пользователя содержит список участников в пространствах, к которым имеет доступ аутентифицированный пользователь. Поддерживает следующие типы аутентификации :
|
Список сообщений |
---|
Выводит список сообщений в спейсе, участником которого является вызывающий, включая сообщения от заблокированных участников и спейсов. Если вывести список сообщений из спейса, в котором нет сообщений, ответ будет пустым. При использовании интерфейса REST/HTTP ответ содержит пустой JSON-объект Требуется аутентификация пользователя с одной из следующих областей авторизации :
|
СписокРеакций |
---|
Выводит список реакций на сообщение. Пример см. в разделе Список реакций на сообщение . Требуется аутентификация пользователя с одной из следующих областей авторизации :
|
ListSpaceEvents |
---|
Перечисляет события из чат-группы Google. Для каждого события полезная нагрузка содержит самую последнюю версию ресурса Chat. Например, если вы перечисляете события о новых участниках чат-группы, сервер возвращает ресурсы Требуется аутентификация пользователя с областью полномочий, подходящей для чтения запрашиваемых данных:
Для просмотра списка событий аутентифицированный пользователь должен быть участником пространства. Пример см. в разделе Список событий из пространства Google Chat .
|
ListSpaces |
---|
Список чатов, в которых состоит звонящий. Групповые чаты и личные сообщения отображаются только после отправки первого сообщения. Пример см. в разделе Список чатов . Поддерживает следующие типы аутентификации :
Чтобы составить список всех именованных пространств по организации Google Workspace, используйте метод
|
SearchSpaces |
---|
Возвращает список пространств в организации Google Workspace на основе поиска администратора. Требуется аутентификация пользователя с правами администратора и одной из следующих областей авторизации :
В запросе установите
|
SetUpSpace |
---|
Создаёт чат-группу и добавляет в неё указанных пользователей. Вызывающий пользователь автоматически добавляется в чат-группу и не должен быть указан в качестве участника в запросе. Пример см. в разделе Настройка чат-группы с начальными участниками . Чтобы указать участников-людей, которых нужно добавить, добавьте memberships с соответствующим Чтобы указать группы Google для добавления, добавьте членства с соответствующим В именованном пространстве или групповом чате, если вызывающий абонент блокирует или заблокирован некоторыми участниками, или не имеет разрешения на добавление некоторых участников, то эти участники не добавляются в созданное пространство. Чтобы создать прямое сообщение (DM) между вызывающим пользователем и другим пользователем-человеком, укажите ровно одно членство, представляющее этого пользователя-человека. Если один пользователь заблокирует другого, запрос не будет выполнен, и DM не будет создан. Чтобы создать DM между вызывающим пользователем и вызывающим приложением, установите для Если DM между двумя пользователями уже существует, даже если один пользователь блокирует другого во время отправки запроса, то возвращается существующее DM. Пространства с цепочками ответов не поддерживаются. Если при настройке пространства появляется сообщение об ошибке Требуется аутентификация пользователя с одной из следующих областей авторизации :
|
Обновление членства |
---|
Обновляет членство. Пример см. в разделе Обновление членства пользователя в пространстве . Поддерживает следующие типы аутентификации :
|
Обновление сообщения |
---|
Обновляет сообщение. Существует разница между методами Поддерживает следующие типы аутентификации :
При использовании аутентификации приложения запросы могут обновлять только сообщения, созданные вызывающим приложением Chat.
|
UpdateSpace |
---|
Обновляет пространство. Пример см. в разделе Обновление пространства . Если вы обновляете поле Поддерживает следующие типы аутентификации :
Аутентификация приложения имеет следующие ограничения:
|
ОбновлениеПространстваУведомленияНастройки |
---|
Обновляет настройки уведомлений о спейсе. Пример см. в разделе Обновление настроек уведомлений о спейсе для вызывающего абонента . Требуется аутентификация пользователя с областью авторизации :
|
UpdateSpaceReadState |
---|
Обновляет состояние чтения пользователя в спейсе, используемое для определения прочитанных и непрочитанных сообщений. Пример см. в разделе Обновление состояния чтения в спейсе пользователя . Требуется аутентификация пользователя с областью авторизации :
|
AccessoryWidget
Один или несколько интерактивных виджетов, которые отображаются внизу сообщения. Подробнее см. в разделе Добавление интерактивных виджетов внизу сообщения .
Поля | |
---|---|
action поля Союза. Тип действия. action может быть только одним из следующих: | |
button_list | Список кнопок. |
ActionResponse
Параметры, которые приложение чата может использовать для настройки способа публикации своего ответа.
Поля | |
---|---|
type | Только ввод. Тип ответа чат-приложения. |
url | Только ввод. URL-адрес для аутентификации или настройки пользователей. (Только для типов ответов |
dialog_action | Только ввод. Ответ на событие взаимодействия, связанное с диалогом . Должен сопровождаться |
updated_widget | Только ввод. Ответ обновлённого виджета. |
ТипОтвета
Тип ответа приложения чата.
Перечисления | |
---|---|
TYPE_UNSPECIFIED | Тип по умолчанию, который обрабатывается как NEW_MESSAGE . |
NEW_MESSAGE | Опубликовать как новое сообщение в теме. |
UPDATE_MESSAGE | Обновить сообщение в приложении чата. Это разрешено только для события CARD_CLICKED , если тип отправителя сообщения — BOT . |
UPDATE_USER_MESSAGE_CARDS | Обновлять карточки в сообщении пользователя. Это разрешено только в ответ на событие MESSAGE с соответствующим URL-адресом или событие CARD_CLICKED , если тип отправителя сообщения — HUMAN . Текст игнорируется. |
REQUEST_CONFIG | В частном порядке попросите пользователя провести дополнительную аутентификацию или настройку. |
DIALOG | Представляет собой диалог . |
UPDATE_WIDGET | Запрос параметров автозаполнения текста виджета. |
SelectionItems
Список результатов автозаполнения виджета.
Поля | |
---|---|
items[] | Массив объектов SelectionItem. |
UpdatedWidget
Для виджетов selectionInput
возвращает предложения автозаполнения для меню с множественным выбором.
Поля | |
---|---|
widget | Идентификатор обновлённого виджета. Идентификатор должен совпадать с идентификатором виджета, который инициировал запрос на обновление. |
Поле объединения updated_widget . Виджет обновляется в ответ на действие пользователя. updated_widget может быть только одним из следующих: | |
suggestions | Список результатов автозаполнения виджета |
ActionStatus
Представляет статус запроса на вызов или отправку диалога .
Поля | |
---|---|
status_code | Код статуса. |
user_facing_message | Сообщение, отправляемое пользователям о статусе их запроса. Если не установлено, отправляется общее сообщение на основе |
Аннотация
Только вывод. Аннотации, связанные с текстовым текстом сообщения. Чтобы добавить базовое форматирование к текстовому сообщению, см. раздел Форматирование текстовых сообщений .
Пример текста сообщения:
Hello @FooBot how are you!"
Соответствующие метаданные аннотаций:
"annotations":[{
"type":"USER_MENTION",
"startIndex":6,
"length":7,
"userMention": {
"user": {
"name":"users/{user}",
"displayName":"FooBot",
"avatarUrl":"https://goo.gl/aeDtrS",
"type":"BOT"
},
"type":"MENTION"
}
}]
Поля | |
---|---|
type | Тип этой аннотации. |
length | Длина подстроки в теле текстового сообщения, которой соответствует эта аннотация. |
start_index | Начальный индекс (начиная с 0 включительно) в теле текстового сообщения, которому соответствует эта аннотация. |
metadata поля объединения. Дополнительные метаданные об аннотации. metadata могут быть только одним из следующих: | |
user_mention | Метаданные упоминания пользователя. |
slash_command | Метаданные для команды «косая черта». |
rich_link_metadata | Метаданные для расширенной ссылки. |
custom_emoji_metadata | Метаданные для пользовательского эмодзи. |
Тип аннотации
Тип аннотации.
Перечисления | |
---|---|
ANNOTATION_TYPE_UNSPECIFIED | Значение по умолчанию для перечисления. Не использовать. |
USER_MENTION | Упоминается пользователь. |
SLASH_COMMAND | Вызывается команда с косой чертой. |
RICH_LINK | Расширенная аннотация ссылки. |
CUSTOM_EMOJI | Пользовательская аннотация с эмодзи. |
AppCommandMetadata
Метаданные о команде приложения чата .
Поля | |
---|---|
app_command_id | Идентификатор команды, указанный в конфигурации API чата. |
app_command_type | Тип команды приложения чата. |
AppCommandType
Тип команды приложения «Чат». Подробнее см. в разделе «Типы команд приложения «Чат»» .
Перечисления | |
---|---|
APP_COMMAND_TYPE_UNSPECIFIED | Значение по умолчанию. Не указано. |
SLASH_COMMAND | Команда со слэшем. Пользователь отправляет команду в сообщении чата. |
QUICK_COMMAND | Быстрая команда. Пользователь выбирает команду из меню «Чат» в области ответа на сообщение. |
ПрикрепленныйGif
GIF-изображение, указанное URL-адресом.
Поля | |
---|---|
uri | Только вывод. URL-адрес, на котором размещено GIF-изображение. |
Вложение
Вложение в Google Chat.
Поля | |
---|---|
name | Необязательно. Имя ресурса вложения в формате |
content_name | Только вывод. Исходное имя файла с содержимым, а не полный путь. |
content_type | Только вывод. Тип содержимого (MIME-тип) файла. |
thumbnail_uri | Только вывод. URL-адрес миниатюры, который следует использовать для предварительного просмотра вложения пользователем. Приложения чата не должны использовать этот URL-адрес для загрузки содержимого вложения. |
download_uri | Только вывод. URL-адрес для загрузки, который должен использоваться для загрузки вложения пользователем. Приложения чата не должны использовать этот URL для загрузки содержимого вложения. |
source | Только вывод. Источник вложения. |
Поле объединения data_ref . Ссылка на данные вложения. data_ref может быть только одним из следующих: | |
attachment_data_ref | Необязательно. Ссылка на данные вложения. Это поле используется для создания или обновления сообщений с вложениями, а также для загрузки данных вложений через API медиа. |
drive_data_ref | Только вывод. Ссылка на вложение Google Диска. Это поле используется с API Google Диска. |
Источник
Источник вложения.
Перечисления | |
---|---|
SOURCE_UNSPECIFIED | Сдержанный. |
DRIVE_FILE | Файл находится на Google Диске. |
UPLOADED_CONTENT | Файл загружен в чат. |
AttachmentDataRef
Ссылка на данные вложения.
Поля | |
---|---|
resource_name | Необязательно. Имя ресурса данных вложения. Это поле используется API мультимедиа для загрузки данных вложения. |
attachment_upload_token | Необязательный. Непрозрачный токен, содержащий ссылку на загруженное вложение. Обрабатывается клиентами как непрозрачная строка и используется для создания или обновления сообщений чата с вложениями. |
CardWithId
Карточка в сообщении Google Chat.
Создавать карточки можно только в приложениях Chat. Если ваше приложение Chat аутентифицируется как пользователь , сообщение не может содержать карточки.
Создавайте и просматривайте открытки с помощью Card Builder.
Откройте конструктор картПоля | |
---|---|
card_id | Обязательно, если сообщение содержит несколько карт. Уникальный идентификатор карты в сообщении. |
card | Карта. Максимальный размер — 32 КБ. |
ChatSpaceLinkData
Данные для ссылок в чат-пространстве.
Поля | |
---|---|
space | Пространство связанного ресурса пространства чата. Формат: |
thread | Ветка связанного ресурса чат-пространства. Формат: |
message | Сообщение связанного ресурса чат-пространства. Формат: |
Полный importSpacerequest
Запросить сообщение о завершении процесса импорта для места.
Поля | |
---|---|
name | Требуется Имя ресурса пространства импорта. Формат: |
Полный importSpacerSponse
Ответное сообщение для завершения процесса импорта для места.
Поля | |
---|---|
space | Пространство импорта режима. |
Контекстуаладдонмаркюп
Этот тип не имеет полей.
Наценка для разработчиков, чтобы указать содержимое контекстуального аддона.
Карта
Карта - это элемент пользовательского интерфейса, который может содержать виджеты пользовательского интерфейса, такие как текст и изображения.
Поля | |
---|---|
header | Заголовок карты. Заголовок обычно содержит заголовок и изображение. |
sections[] | Разделы разделены линейным разделителем. |
card_actions[] | Действия этой карты. |
name | Название карты. |
CardAction
Действие карты - это действие, связанное с картой. Для карты счета -фактуры типичным действием будет: Удалить счет -фактуру, счет по электронной почте или открыть счет в браузере.
Не поддерживается приложениями Google Chat.
Поля | |
---|---|
action_label | Метка использовалась в элементе меню Action. |
on_click | Действие Onclick для этого элемента действия. |
CardHeader
Поля | |
---|---|
title | Название должно быть указано. Заголовок имеет фиксированную высоту: если указан как заголовок, так и подзаголовок, каждая занимает одну строку. Если указано только заголовок, он занимает обе строки. |
subtitle | Подзаголовок заголовка карты. |
image_style | Тип изображения (например, квадратная граница или круговая граница). |
image_url | URL -адрес изображения в заголовке карты. |
Образец
Перечисления | |
---|---|
IMAGE_STYLE_UNSPECIFIED | |
IMAGE | Квадратная граница. |
AVATAR | Круговая граница. |
Раздел
Раздел содержит набор виджетов, которые отображаются (вертикально) в порядке, в котором они указаны. На всех платформах карты имеют узкую фиксированную ширину, поэтому в настоящее время нет необходимости в свойствах макета (например, Float).
Поля | |
---|---|
header | Заголовок секции. Форматированный текст поддерживается. Для получения дополнительной информации о форматировании текста см. Форматирование текста в приложениях Google Chat и форматирование текста в надстройках Google Workspace . |
widgets[] | Раздел должен содержать хотя бы один виджет. |
CreateCustomeJirequest
Запрос на создание пользовательского смайлика.
Поля | |
---|---|
custom_emoji | Требуется Пользовательские смайлики для создания. |
CreateMembershipRequest
Запросить сообщение о создании членства.
Поля | |
---|---|
parent | Требуется Название ресурса пространства для создания членства. Формат: пространства/{пространство} |
membership | Требуется Отношение членства к созданию. Поле Когда приложение чата создает отношение членства для пользователя человека, оно должно использовать определенные области авторизации и установить конкретные значения для определенных полей:
Приглашение пользователей внешней по отношению к организации Workspace, которая владеет пространством, требует аутентификации пользователей . Когда приложение чата создает для себя отношение членства, оно должно быть аутентифицировано как пользователь и использовать область |
use_admin_access | Необязательный. Когда Пользователь по вызову должен быть администратором Google Workspace с привилегией Manage CHAT и Spaces Trantings . Требует Создание членства в приложении или создание участников для пользователей за пределами организации Google Respace Administrator не поддерживается с использованием Admin Access. |
CreateMessAgeRequest
Создает сообщение.
Поля | |
---|---|
parent | Требуется Имя ресурса пространства для создания сообщения. Формат: |
message | Требуется Тело сообщения. |
thread_key | Необязательный. Установите: используйте |
request_id | Необязательный. Уникальный идентификатор запроса для этого сообщения. Указание существующего идентификатора запроса возвращает сообщение, созданное с помощью этого идентификатора вместо создания нового сообщения. |
message_reply_option | Необязательный. Указывает, запускает ли сообщение поток или отвечает на один. Поддерживается только в названных пространствах. При ответе на взаимодействие с пользователями это поле игнорируется. Для взаимодействия в потоке ответ создается в том же потоке. В противном случае ответ создан как новый поток. |
message_id | Необязательный. Пользовательский идентификатор для сообщения. Lets Chat Приложения получают, обновляют или удаляете сообщение без необходимости хранить идентификатор, назначенный системой, в имени ресурса сообщения (представлено в поле Значение для этого поля должно соответствовать следующим требованиям:
Для получения подробной информации см. Имя сообщения . |
Messagereplyoption
Указывает, как ответить на сообщение. В будущем может быть добавлено больше штатов.
Перечисления | |
---|---|
MESSAGE_REPLY_OPTION_UNSPECIFIED | По умолчанию. Запускает новую ветку. Использование этой опции игнорирует любой thread ID или который включен. |
REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD | Создает сообщение в качестве ответа на поток, указанный thread ID или . Если он не удается, сообщение запускает новый поток вместо этого. |
REPLY_MESSAGE_OR_FAIL | Создает сообщение в качестве ответа на поток, указанный thread ID или . Если используется новый thread_key , создается новый поток. Если создание сообщения не удается, вместо этого возвращается ошибка NOT_FOUND . |
CreatereActionRequest
Создает реакцию на сообщение.
Поля | |
---|---|
parent | Требуется Сообщение, где создается реакция. Формат: |
reaction | Требуется Реакция на создание. |
CreateSpacerequest
Запрос на создание названного пространства без участников.
Поля | |
---|---|
space | Требуется Поля Если вы уже получаете сообщение об ошибке |
request_id | Необязательный. Уникальный идентификатор для этого запроса. Рекомендуется случайный UUID. Указание существующего идентификатора запроса возвращает пространство, созданное с помощью этого идентификатора вместо создания нового пространства. Указание существующего идентификатора запроса из одного и того же приложения чата с другим аутентифицированным пользователем возвращает ошибку. |
CustomeMoji
Представляет собой пользовательский смайлик .
Поля | |
---|---|
name | Идентификатор. Имя ресурса пользовательского смайлика, назначенного сервером. Формат: |
uid | Только вывод. Уникальный ключ для пользовательского ресурса эмодзи. |
emoji_name | Необязательный. Неизменен. Предоставленное пользователем имя для пользовательских смайликов, которое является уникальным в организации. Требуется, когда создается пользовательский смайлик, вывод только в противном случае. Имена эмодзи должны начинать и заканчиваться колонами, должны быть строчными и могут содержать только буквенно -цифровые символы, дефисы и подчеркивание. Дефисы и подставки должны использоваться для разделения слов и нельзя использовать последовательно. Пример:: |
temporary_image_uri | Только вывод. Временный URL -адрес изображения для пользовательского смайлика, действительный не менее 10 минут. Обратите внимание, что это не заполняется в ответе, когда создается пользовательский смайлик. |
payload | Необязательный. Только вход. Данные полезной нагрузки. Требуется, когда создается пользовательский смайлик. |
CustomeJipayLoad
Данные полезной нагрузки для пользовательских смайликов.
Поля | |
---|---|
file_content | Требуется Только вход. Изображение, используемое для пользовательских смайликов. Полезная нагрузка должна быть менее 256 т.п.н., а измерение изображения должно быть квадратным и от 64 до 500 пикселей. Ограничения могут быть изменены. |
filename | Требуется Только вход. Имя файла изображения. Поддерживаемые расширения файлов: |
CustomeJimeTadata
Метаданные аннотации для пользовательских смайликов.
Поля | |
---|---|
custom_emoji | Пользовательские смайлики. |
DeleteCustomejirequest
Запрос на удаление пользовательского смайлика.
Поля | |
---|---|
name | Требуется Название ресурса пользовательского смайлика для удаления. Формат: Вы можете использовать имя эмодзи в качестве псевдонима для |
DeletemembershipRequest
Запрос удалить членство в пространстве.
Поля | |
---|---|
name | Требуется Название ресурса членства для удаления. Приложения чата могут удалять пользователей людей или их собственное членство. Приложения чата не могут удалить членство других приложений. При удалении человеческого членства требуется область применения в При удалении членства в приложении требуется Формат: |
use_admin_access | Необязательный. Когда Пользователь по вызову должен быть администратором Google Workspace с привилегией Manage CHAT и Spaces Trantings . Требует Удаление членов приложения в пространстве не поддерживается с использованием доступа к администратору. |
DeletemessageRequest
Запрос удалить сообщение.
Поля | |
---|---|
name | Требуется Имя ресурса сообщения. Формат: Если вы установили пользовательский идентификатор для вашего сообщения, вы можете использовать значение из поля |
force | Необязательный. Когда Применяется только при аутентификации как пользователь . Не имеет никакого влияния при аутентификации в качестве приложения для чата . |
DeletereActionRequest
Удаляет реакцию на сообщение.
Поля | |
---|---|
name | Требуется Название реакции на удаление. Формат: |
DeleteSpacerequest
Запрос на удаление места.
Поля | |
---|---|
name | Требуется Название ресурса пространства для удаления. Формат: |
use_admin_access | Необязательный. Когда Пользователь по вызову должен быть администратором Google Workspace с привилегией Manage CHAT и Spaces Trantings . Требует |
DeletionMetadata
Информация о удаленном сообщении. Сообщение удаляется при установке delete_time
.
Поля | |
---|---|
deletion_type | Указывает, кто удалил сообщение. |
DeletionType
Кто удалил сообщение и как оно было удалено. В будущем может быть добавлено больше значений. См. Редактировать или удалить сообщение в Google Chat для получения подробной информации о том, когда сообщения могут быть удалены.
Перечисления | |
---|---|
DELETION_TYPE_UNSPECIFIED | Это значение не используется. |
CREATOR | Пользователь удалил свое собственное сообщение. |
SPACE_OWNER | Космический менеджер удалил сообщение. |
ADMIN | Администратор Google Workspace удалил сообщение. Администраторы могут удалить любое сообщение в пространстве, включая сообщения, отправленные любым пространственным участником или приложением чата. |
APP_MESSAGE_EXPIRY | Приложение чата удалило собственное сообщение, когда оно истек. |
CREATOR_VIA_APP | Приложение чата удалило сообщение от имени создателя (с использованием аутентификации пользователя). |
SPACE_OWNER_VIA_APP | Приложение чата удалило сообщение от имени космического диспетчера (с использованием аутентификации пользователя). |
SPACE_MEMBER | Участник пространства удалил сообщение. Пользователи могут удалять сообщения, отправленные приложениями. |
Диалог
Обертка вокруг корпуса карты диалога.
Поля | |
---|---|
body | Только вход. Тело диалога, которое отображается в модале. Приложения Google Chat не поддерживают следующие карты: |
Диалог
Содержит диалог и код состояния запроса.
Поля | |
---|---|
action_status | Только вход. Статус для запроса либо вызвать, либо отправить диалог . Отображает статус и сообщение пользователям, если это необходимо. Например, в случае ошибки или успеха. |
Союзное полевое action . Действие для выполнения. action может быть только одним из следующих: | |
dialog | Только вход. Диалог для запроса. |
DRIEDATAREF
Ссылка на данные привязанности к дисков.
Поля | |
---|---|
drive_file_id | Идентификатор для файла диска. Используйте с приводом API. |
DRIVELINKDATA
Данные для ссылок на Google Drive.
Поля | |
---|---|
drive_data_ref | DriedAtaref , который ссылается на файл Google Drive. |
mime_type | Тип MIME связанного ресурса Google Drive. |
Эмодзи
Эмодзи, который используется в качестве реакции на сообщение.
Поля | |
---|---|
Полевой content союза. Требуется Содержание эмодзи. content может быть только одним из следующих: | |
unicode | Необязательный. Основные смайлики, представленные строкой Unicode. |
custom_emoji | Пользовательский смайлик. |
Эмодзиреатзамман
Количество людей, которые отреагировали на сообщение с определенным смайликом.
Поля | |
---|---|
emoji | Только вывод. Эмодзи, связанные с реакциями. |
reaction_count | Только вывод. Общее количество реакций с использованием связанных эмодзи. |
FindDirectMessAgeRequest
Запрос на получение прямого пространства сообщений на основе пользовательского ресурса.
Поля | |
---|---|
name | Требуется Имя ресурса пользователя, чтобы найти прямое сообщение. Format: |
GetAttachmentRequest
Просьба получить вложение.
Поля | |
---|---|
name | Требуется Имя ресурса вложения, в |
GetCustomeJirequest
Запрос на возврат одного пользовательского смайлика.
Поля | |
---|---|
name | Требуется Название ресурса пользовательского смайлика. Формат: Вы можете использовать имя эмодзи в качестве псевдонима для |
GetMembershipRequest
Запрос получить членство в пространстве.
Поля | |
---|---|
name | Требуется Название ресурса членства для извлечения. Чтобы получить собственное членство в приложении с помощью аутентификации пользователя , вы можете при желании использовать Формат: Вы можете использовать электронную почту пользователя в качестве псевдонима для |
use_admin_access | Необязательный. Когда Пользователь по вызову должен быть администратором Google Workspace с привилегией Manage CHAT и Spaces Trantings . Требует Получение членства в приложении в пространстве не поддерживается при использовании доступа к администратору. |
GetMessageRequest
Запрос получить сообщение.
Поля | |
---|---|
name | Требуется Имя ресурса сообщения. Формат: Если вы установили пользовательский идентификатор для вашего сообщения, вы можете использовать значение из поля |
GetSpaceEventRequest
Запросить сообщение о получении космического мероприятия.
Поля | |
---|---|
name | Требуется Название ресурса космического события. Формат: |
GetSpacenotificationsettingRequest
Запросить сообщение, чтобы получить настройку уведомления о пространстве. Поддерживает только получение настройки уведомления для пользователя.
Поля | |
---|---|
name | Требуется Формат: users/{user}/spaces/{space}/spacenotificationsetting
|
GetSpacereadStateRequest
Запросить сообщение для API GetSpacereadState.
Поля | |
---|---|
name | Требуется Название ресурса Космического чтения состояния для извлечения. Поддерживает только получение состояния чтения для звонящего пользователя. Чтобы обозначить пользователя по вызову, установите одно из следующих:
Формат: users/{user}/spaces/{space}/spacereadstate |
GetSpacerequest
Просьба вернуть одно пространство.
Поля | |
---|---|
name | Требуется Имя ресурса пространства, в формах Form Формат: |
use_admin_access | Необязательный. Когда Пользователь по вызову должен быть администратором Google Workspace с привилегией Manage CHAT и Spaces Trantings . Требует |
GetThreadReadStateRequest
Запросить сообщение о GetThreadReadStateRequest API.
Поля | |
---|---|
name | Требуется Название ресурса потока считываем состояние для извлечения. Поддерживает только получение состояния чтения для звонящего пользователя. Чтобы обозначить пользователя по вызову, установите одно из следующих:
Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState |
Группа
Группа Google в чате Google.
Поля | |
---|---|
name | Имя ресурса для группы Google. Представляет группу в группе облачных идентификаторов API. Формат: группы/{группа} |
ИСТОРИЯ
Государство истории для сообщений и пространств. Определяет, как долго хранятся сообщения и беседы после создания.
Перечисления | |
---|---|
HISTORY_STATE_UNSPECIFIED | Значение по умолчанию. Не используйте. |
HISTORY_OFF | История выключена. Сообщения и потоки хранятся в течение 24 часов . |
HISTORY_ON | История на. Правила удержания хранилища организации указывают, как долго хранятся сообщения и потоки. |
Listcustomejisrequest
Запрос вернуть список пользовательских смайликов.
Поля | |
---|---|
page_size | Необязательный. Максимальное количество пользовательских смайликов вернулось. Сервис может вернуть меньше пользовательских смайликов, чем это значение. В случае неопределенности значение по умолчанию составляет 25. Максимальное значение составляет 200; Значения выше 200 изменяются на 200. |
page_token | Необязательный. (Если возобновить из предыдущего запроса.) Токен страницы, полученный из предыдущего списка пользовательского эмодзи. Предоставьте это, чтобы получить последующую страницу. При страничном значении фильтра должно соответствовать вызову, который предоставил токен страницы. Прохождение другого значения может привести к неожиданным результатам. |
filter | Необязательный. Фильтр запросов. Поддерживает фильтрацию создателем. Чтобы фильтровать создателем, вы должны указать достоверное значение. В настоящее время только Например, следующий запрос возвращает пользовательские смайлики, созданные вызывающим абонент:
Неверные запросы отклоняются с ошибкой |
Listcustomejisresponse
Ответ на список пользовательских смайликов.
Поля | |
---|---|
custom_emojis[] | Неупомянутый список. Список пользовательских смайликов. |
next_page_token | Токен, который вы можете отправить в качестве |
Listmembershipsrequest
Запросить сообщение о перечислении членства.
Поля | |
---|---|
parent | Требуется Название ресурса пространства, для которого можно получить список членов. Формат: пространства/{пространство} |
page_size | Необязательный. Максимальное количество членов для возврата. Сервис может вернуть меньше этого значения. В случае неопределенности, не более 100 членов возвращаются. Максимальное значение составляет 1000. Если вы используете значение более 1000, оно автоматически изменяется на 1000. Отрицательные значения возвращают ошибку |
page_token | Необязательный. Токен страницы, полученный от предыдущего вызова для перечисления членов. Предоставьте этот параметр, чтобы получить последующую страницу. При нанесении на страницу все другие предоставленные параметры должны соответствовать вызову, который предоставил токен страницы. Передача различных значений к другим параметрам может привести к неожиданным результатам. |
filter | Необязательный. Фильтр запросов. Вы можете отфильтровать членство с помощью роли ( Чтобы фильтровать по роли, установить Чтобы фильтровать по типу, установите Чтобы отфильтровать как роли, так и типом, используйте Либо Например, следующие запросы действительны:
Следующие запросы недействительны:
Неверные запросы отклоняются сервером с ошибкой |
show_groups | Необязательный. Когда |
show_invited | Необязательный. Когда В настоящее время требуется аутентификация пользователя . |
use_admin_access | Необязательный. Когда Пользователь по вызову должен быть администратором Google Workspace с привилегией Manage CHAT и Spaces Trantings . Требует либо Перечисление участников приложения в пространстве не поддерживается при использовании доступа к администратору. |
Listmembershipsresponse
Ответ на членство в списке пространства.
Поля | |
---|---|
memberships[] | Неупомянутый список. Список членов на запрошенной (или первой) странице. |
next_page_token | Токен, который вы можете отправить в качестве |
ListMessagesRequest
Перечисляет сообщения в указанном пространстве, что пользователь является членом.
Поля | |
---|---|
parent | Требуется Имя ресурса пространства для перечисления сообщений. Формат: |
page_size | Необязательный. Максимальное количество сообщений возвращалось. Служба может вернуть меньше сообщений, чем это значение. Если не указано, не более 25 возвращаются. Максимальное значение составляет 1000. Если вы используете значение более 1000, оно автоматически изменяется на 1000. Отрицательные значения возвращают ошибку |
page_token | Необязательный. Токен страницы, полученный из предыдущего вызова сообщений списка. Предоставьте этот параметр, чтобы получить последующую страницу. При нанесении на страницу все другие предоставленные параметры должны соответствовать вызову, который предоставил токен страницы. Передача различных значений к другим параметрам может привести к неожиданным результатам. |
filter | Необязательный. Фильтр запросов. Вы можете отфильтровать сообщения по дате ( Чтобы отфильтровать сообщения до даты, которую они были созданы, укажите The Чтобы отфильтровать по потоку, укажите Чтобы фильтровать по потоке и дате, используйте Например, следующие запросы действительны:
Неверные запросы отклоняются сервером с ошибкой |
order_by | Необязательный. Как упорядочен список сообщений. Укажите значение по заказу с помощью операции заказа. Допустимые значения операции заказа следующие:
Порядок по умолчанию - |
show_deleted | Необязательный. Должны ли включать удаленные сообщения. Удаленные сообщения включают удаленное время и метаданные об их удалении, но содержание сообщений недоступно. |
ListMessagesResponse
Ответ Сообщение для перечисления сообщений.
Поля | |
---|---|
messages[] | Список сообщений. |
next_page_token | Вы можете отправить токен в качестве |
ListreactionSrequest
Перечисляет реакцию на сообщение.
Поля | |
---|---|
parent | Требуется Пользователи сообщений отреагировали на. Формат: |
page_size | Необязательный. Максимальное количество реакций возвращается. Служба может вернуть меньше реакций, чем это значение. В случае неопределенности значение по умолчанию составляет 25. Максимальное значение составляет 200; Значения выше 200 изменяются на 200. |
page_token | Необязательный. (Если возобновить из предыдущего запроса.) Токен страницы, полученный из предыдущего вызова реакций списка. Предоставьте это, чтобы получить последующую страницу. При страничном значении фильтра должно соответствовать вызову, который предоставил токен страницы. Прохождение другого значения может привести к неожиданным результатам. |
filter | Необязательный. Фильтр запросов. Вы можете отфильтровать реакции с помощью Emoji (либо Чтобы отфильтровать реакции для нескольких смайликов или пользователей, присоединяйтесь к аналогичным полям с оператором Чтобы отфильтровать реакции с помощью Emoji и пользователя, используйте Если ваш запрос использует как Например, следующие запросы действительны:
Следующие запросы недействительны:
Неверные запросы отклоняются с ошибкой |
ListreactionSresponse
Ответ на запрос на реакцию списка.
Поля | |
---|---|
reactions[] | Список реакций на запрошенной (или первой) странице. |
next_page_token | Продолжение токена, чтобы получить следующую страницу результатов. Это пусто для последней страницы результатов. |
Listspaceeventsrequest
Запросить сообщение о перечислении космических событий.
Поля | |
---|---|
parent | Требуется Название ресурса в чате Google , где произошли события. Формат: |
page_size | Необязательный. Максимальное количество космических событий возвращалось. Сервис может вернуть меньше этого значения. Отрицательные значения возвращают ошибку |
page_token | Необязательный. Токен страницы, полученный из предыдущего звонка космических событий списка. Предоставьте это, чтобы получить последующую страницу. При нанесении на страницу все остальные параметры, предоставленные для перечисления пространственных событий, должны соответствовать вызову, который предоставил токен страницы. Передача различных значений к другим параметрам может привести к неожиданным результатам. |
filter | Требуется Фильтр запросов. Вы должны указать хотя бы один тип события ( При желании вы также можете отфильтровать по времени начала (
Чтобы указать время начала или окончания, используйте оператор Equals Например, следующие запросы действительны:
Следующие запросы недействительны:
Неверные запросы отклоняются сервером с ошибкой |
ListSpaceEventsResponse
Ответ Сообщение для перечисления космических событий.
Поля | |
---|---|
space_events[] | Результаты возвращаются в хронологическом порядке (сначала самое старое событие). ПРИМЕЧАНИЕ. Поле |
next_page_token | Токен продолжения, используемый для получения большего количества событий. Если это поле опущено, последующих страниц нет. |
ListspacesRequest
Запрос на перечисление пространств, которым является абонент.
Поля | |
---|---|
page_size | Необязательный. Максимальное количество пробелов для возврата. Сервис может вернуть меньше этого значения. В случае неопределенности, не более 100 мест возвращаются. Максимальное значение составляет 1000. Если вы используете значение более 1000, оно автоматически изменяется на 1000. Отрицательные значения возвращают ошибку |
page_token | Необязательный. Токен страницы, полученный из предыдущего звонка в списках. Предоставьте этот параметр, чтобы получить последующую страницу. При страничном значении фильтра должно соответствовать вызову, который предоставил токен страницы. Прохождение другого значения может привести к неожиданным результатам. |
filter | Необязательный. Фильтр запросов. Вы можете отфильтровать пространства по типу пространства ( Чтобы отфильтровать по типу пространства, вы должны указать допустимое значение Enum, такое как Например, следующие запросы действительны:
Неверные запросы отклоняются сервером с ошибкой |
Listspacesresponse
Ответ на запрос списков.
Поля | |
---|---|
spaces[] | Список пробелов на запрошенной (или первой) странице. ПРИМЕЧАНИЕ. Поле |
next_page_token | Вы можете отправить токен в качестве |
Matchedurl
Соответствующий URL в сообщении в чате. Приложения чата могут предварительно просмотреть соответствующие URL -адреса. Для получения дополнительной информации см. Предварительные ссылки .
Поля | |
---|---|
url | Только вывод. URL, который был сопоставлен. |
Членство
Представляет собой отношение членства в чате Google, например, приглашается ли пользователь или приложение чата, часть или отсутствует в пространстве.
Поля | |
---|---|
name | Идентификатор. Имя ресурса членства, назначенное сервером. Формат: |
state | Только вывод. Состояние членства. |
role | Необязательный. Роль пользователя в пространстве чата, которая определяет их разрешенные действия в пространстве. Это поле можно использовать только в качестве ввода в |
create_time | Необязательный. Неизменен. Время создания членства, например, когда член присоединился или был приглашен присоединиться к пространству. Это поле выводится только, за исключением случаев, когда используется для импорта исторического членства в местах импорта. |
delete_time | Необязательный. Неизменен. Время удаления членства, например, когда член ушел или был удален из пространства. Это поле выводится только, за исключением случаев, когда используется для импорта исторического членства в местах импорта. |
Union Field memberType . Участник связан с этим членством. Другие типы участников могут быть поддержаны в будущем. memberType может быть только одним из следующих: | |
member | Необязательный. Пользователь или приложение Google Chat, которому соответствует членство. Если ваше приложение в чате аутентифицируется как пользователь , вывод популяет |
group_member | Необязательный. Группа Google членство соответствует. Чтение или мутирование членов для групп Google требует аутентификации пользователей . |
Членство
Представляет разрешенные действия пользователя в пространстве чата. Больше значений Enum может быть добавлено в будущем.
Перечисления | |
---|---|
MEMBERSHIP_ROLE_UNSPECIFIED | Значение по умолчанию. Для users : они не являются членом пространства, но могут быть приглашены. Для Google Groups : им всегда присваивается эта роль (другие значения перечисления могут использоваться в будущем). |
ROLE_MEMBER | Член пространства. У пользователя есть основные разрешения, такие как отправка сообщений в пространство. В 1: 1 и безымянных групповых разговорах у каждого есть эта роль. |
ROLE_MANAGER | Космический менеджер. У пользователя есть все основные разрешения плюс административные разрешения, которые позволяют им управлять пространством, например, добавление или удаление участников. Поддерживается только в SpaceType.SPACE . |
Членство
Определяет отношения участника с пространством. Другие государства членства могут быть поддержаны в будущем.
Перечисления | |
---|---|
MEMBERSHIP_STATE_UNSPECIFIED | Значение по умолчанию. Не используйте. |
JOINED | Пользователь добавляется в пространство и может участвовать в пространстве. |
INVITED | Пользователь предлагается присоединиться к пространству, но не присоединился к нему. |
NOT_A_MEMBER | The user doesn't belong to the space and doesn't have a pending invitation to join the space. |
MembershipBatchCreatedEventData
Event payload for multiple new memberships.
Event type: google.workspace.chat.membership.v1.batchCreated
Поля | |
---|---|
memberships[] | A list of new memberships. |
MembershipBatchDeletedEventData
Event payload for multiple deleted memberships.
Event type: google.workspace.chat.membership.v1.batchDeleted
Поля | |
---|---|
memberships[] | A list of deleted memberships. |
MembershipBatchUpdatedEventData
Event payload for multiple updated memberships.
Event type: google.workspace.chat.membership.v1.batchUpdated
Поля | |
---|---|
memberships[] | A list of updated memberships. |
MembershipCreatedEventData
Event payload for a new membership.
Event type: google.workspace.chat.membership.v1.created
.
Поля | |
---|---|
membership | The new membership. |
MembershipDeletedEventData
Event payload for a deleted membership.
Event type: google.workspace.chat.membership.v1.deleted
Поля | |
---|---|
membership | The deleted membership. Only the |
MembershipUpdatedEventData
Event payload for an updated membership.
Event type: google.workspace.chat.membership.v1.updated
Поля | |
---|---|
membership | The updated membership. |
Сообщение
A message in a Google Chat space.
Поля | |
---|---|
name | Identifier. Resource name of the message. Format: Where If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing |
sender | Output only. The user who created the message. If your Chat app authenticates as a user , the output populates the user |
create_time | Optional. Immutable. For spaces created in Chat, the time at which the message was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the message was created in the source in order to preserve the original creation time. |
last_update_time | Output only. The time at which the message was last edited by a user. If the message has never been edited, this field is empty. |
delete_time | Output only. The time at which the message was deleted in Google Chat. If the message is never deleted, this field is empty. |
text | Optional. Plain-text body of the message. The first link to an image, video, or web page generates a preview chip . You can also @mention a Google Chat user , or everyone in the space. To learn about creating text messages, see Send a message . |
formatted_text | Output only. Contains the message
For more information, see View text formatting sent in a message |
cards[] | Deprecated: Use Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message. |
cards_v2[] | Optional. An array of cards . Only Chat apps can create cards. If your Chat app authenticates as a user , the messages can't contain cards. To learn how to create a message that contains cards, see Send a message . Design and preview cards with the Card Builder. Open the Card Builder |
annotations[] | Output only. Annotations associated with the |
thread | The thread the message belongs to. For example usage, see Start or reply to a message thread . |
space | Output only. If your Chat app authenticates as a user , the output only populates the space |
fallback_text | Optional. A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications. |
action_response | Input only. Parameters that a Chat app can use to configure how its response is posted. |
argument_text | Output only. Plain-text body of the message with all Chat app mentions stripped out. |
slash_command | Output only. Slash command information, if applicable. |
attachment[] | Optional. User-uploaded attachment. |
matched_url | Output only. A URL in |
thread_reply | Output only. When If the space doesn't support reply in threads, this field is always |
client_assigned_message_id | Optional. A custom ID for the message. You can use field to identify a message, or to get, delete, or update a message. To set a custom ID, specify the |
emoji_reaction_summaries[] | Output only. The list of emoji reaction summaries on the message. |
private_message_viewer | Optional. Immutable. Input for creating a message, otherwise output only. The user that can view the message. When set, the message is private and only visible to the specified user and the Chat app. To include this field in your request, you must call the Chat API using app authentication and omit the following: For details, see Send a message privately . |
deletion_metadata | Output only. Information about a deleted message. A message is deleted when |
quoted_message_metadata | Output only. Information about a message that's quoted by a Google Chat user in a space. Google Chat users can quote a message to reply to it. |
attached_gifs[] | Output only. GIF images that are attached to the message. |
accessory_widgets[] | Optional. One or more interactive widgets that appear at the bottom of a message. You can add accessory widgets to messages that contain text, cards, or both text and cards. Not supported for messages that contain dialogs. For details, see Add interactive widgets at the bottom of a message . Creating a message with accessory widgets requires app authentication . |
MessageBatchCreatedEventData
Event payload for multiple new messages.
Event type: google.workspace.chat.message.v1.batchCreated
Поля | |
---|---|
messages[] | A list of new messages. |
MessageBatchDeletedEventData
Event payload for multiple deleted messages.
Event type: google.workspace.chat.message.v1.batchDeleted
Поля | |
---|---|
messages[] | A list of deleted messages. |
MessageBatchUpdatedEventData
Event payload for multiple updated messages.
Event type: google.workspace.chat.message.v1.batchUpdated
Поля | |
---|---|
messages[] | A list of updated messages. |
MessageCreatedEventData
Event payload for a new message.
Event type: google.workspace.chat.message.v1.created
Поля | |
---|---|
message | The new message. |
MessageDeletedEventData
Event payload for a deleted message.
Event type: google.workspace.chat.message.v1.deleted
Поля | |
---|---|
message | The deleted message. Only the |
MessageUpdatedEventData
Event payload for an updated message.
Event type: google.workspace.chat.message.v1.updated
Поля | |
---|---|
message | The updated message. |
QuotedMessageMetadata
Information about a quoted message.
Поля | |
---|---|
name | Output only. Resource name of the quoted message. Format: |
last_update_time | Output only. The timestamp when the quoted message was created or when the quoted message was last updated. |
Реакция
A reaction to a message.
Поля | |
---|---|
name | Identifier. The resource name of the reaction. Format: |
user | Output only. The user who created the reaction. |
emoji | Required. The emoji used in the reaction. |
ReactionBatchCreatedEventData
Event payload for multiple new reactions.
Event type: google.workspace.chat.reaction.v1.batchCreated
Поля | |
---|---|
reactions[] | A list of new reactions. |
ReactionBatchDeletedEventData
Event payload for multiple deleted reactions.
Event type: google.workspace.chat.reaction.v1.batchDeleted
Поля | |
---|---|
reactions[] | A list of deleted reactions. |
ReactionCreatedEventData
Event payload for a new reaction.
Event type: google.workspace.chat.reaction.v1.created
Поля | |
---|---|
reaction | The new reaction. |
ReactionDeletedEventData
Event payload for a deleted reaction.
Type: google.workspace.chat.reaction.v1.deleted
Поля | |
---|---|
reaction | The deleted reaction. |
RichLinkMetadata
A rich link to a resource.
Поля | |
---|---|
uri | The URI of this link. |
rich_link_type | The rich link type. |
Union field data . Data for the linked resource. data can be only one of the following: | |
drive_link_data | Data for a drive link. |
chat_space_link_data | Data for a chat space link. |
RichLinkType
The rich link type. More types might be added in the future.
Перечисления | |
---|---|
RICH_LINK_TYPE_UNSPECIFIED | Default value for the enum. Don't use. |
DRIVE_FILE | A Google Drive rich link type. |
CHAT_SPACE | A Chat space rich link type. For example, a space smart chip. |
SearchSpacesRequest
Request to search for a list of spaces based on a query.
Поля | |
---|---|
use_admin_access | When The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege . Requires either the This method currently only supports admin access, thus only |
page_size | The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. |
page_token | A token, received from the previous search spaces call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results. |
query | Required. A search query. You can search by using the following parameters:
Across different fields, only Among the same field, The following example queries are valid:
|
order_by | Optional. How the list of spaces is ordered. Supported attributes to order by are:
Valid ordering operation values are:
The supported syntax are:
|
SearchSpacesResponse
Response with a list of spaces corresponding to the search spaces request.
Поля | |
---|---|
spaces[] | A page of the requested spaces. |
next_page_token | A token that can be used to retrieve the next page. If this field is empty, there are no subsequent pages. |
total_size | The total number of spaces that match the query, across all pages. If the result is over 10,000 spaces, this value is an estimate. |
SetUpSpaceRequest
Request to create a space and add specified users to it.
Поля | |
---|---|
space | Required. The To create a space, set To create a group chat, set To create a 1:1 conversation between humans, set To create an 1:1 conversation between a human and the calling Chat app, set If a |
request_id | Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error. |
memberships[] | Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically. The set currently allows up to 49 memberships (in addition to the caller). For human membership, the For Google group membership, the Optional when setting Required when setting Required when setting Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting |
SlashCommand
Metadata about a slash command in Google Chat.
Поля | |
---|---|
command_id | The ID of the slash command. |
SlashCommandMetadata
Annotation metadata for slash commands (/).
Поля | |
---|---|
bot | The Chat app whose command was invoked. |
type | The type of slash command. |
command_name | The name of the invoked slash command. |
command_id | The command ID of the invoked slash command. |
triggers_dialog | Indicates whether the slash command is for a dialog. |
Тип
Перечисления | |
---|---|
TYPE_UNSPECIFIED | Default value for the enum. Don't use. |
ADD | Add Chat app to space. |
INVOKE | Invoke slash command in space. |
Космос
A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app.
Поля | |
---|---|
name | Identifier. Resource name of the space. Format: Where |
type | Output only. Deprecated: Use |
space_type | Optional. The type of space. Required when creating a space or updating the space type of a space. Output only for other usage. |
single_user_bot_dm | Optional. Whether the space is a DM between a Chat app and a single human. |
threaded | Output only. Deprecated: Use |
display_name | Optional. The space's display name. Required when creating a space with a For direct messages, this field might be empty. Supports up to 128 characters. |
external_user_allowed | Optional. Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions:
For existing spaces, this field is output only. |
space_threading_state | Output only. The threading state in the Chat space. |
space_details | Optional. Details about the space including description and rules. |
space_history_state | Optional. The message history state for messages and threads in this space. |
import_mode | Optional. Whether this space is created in Creating a space in |
create_time | Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when |
last_active_time | Output only. Timestamp of the last message in the space. |
admin_installed | Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization. To support admin install, your Chat app must feature direct messaging. |
membership_count | Output only. The count of joined memberships grouped by member type. Populated when the |
access_settings | Optional. Specifies the access setting of the space. Only populated when the |
space_uri | Output only. The URI for a user to access the space. |
import_mode_expire_time | Output only. The time when the space will be automatically deleted by the system if it remains in import mode. Each space created in import mode must exit this mode before this expire time using This field is only populated for spaces that were created with import mode. |
customer | Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with app authentication and In the format For DMs, this field isn't populated. |
Union field space_permission_settings . Represents the permission settings of a space. Only populated when the space_type is SPACE . space_permission_settings can be only one of the following: | |
predefined_permission_settings | Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the Setting predefined permission settings supports:
|
permission_settings | Optional. Space permission settings for existing spaces. Input for updating exact space permission settings, where existing permission settings are replaced. Output lists current permission settings. Reading and updating permission settings supports:
|
AccessSettings
Represents the access setting of the space.
Поля | |
---|---|
access_state | Output only. Indicates the access state of the space. |
audience | Optional. The resource name of the target audience who can discover the space, join the space, and preview the messages in the space. If unset, only users or Google Groups who have been individually invited or added to the space can access it. For details, see Make a space discoverable to a target audience . Format: To use the default target audience for the Google Workspace organization, set to Reading the target audience supports:
This field is not populated when using the Setting the target audience requires user authentication . |
AccessState
Represents the access state of the space.
Перечисления | |
---|---|
ACCESS_STATE_UNSPECIFIED | Access state is unknown or not supported in this API. |
PRIVATE | Only users or Google Groups that have been individually added or invited by other users or Google Workspace administrators can discover and access the space. |
DISCOVERABLE | A space manager has granted a target audience access to the space. Users or Google Groups that have been individually added or invited to the space can also discover and access the space. To learn more, see Make a space discoverable to specific users . Creating discoverable spaces requires user authentication . |
MembershipCount
Represents the count of memberships of a space, grouped into categories.
Поля | |
---|---|
joined_direct_human_user_count | Output only. Count of human users that have directly joined the space, not counting users joined by having membership in a joined group. |
joined_group_count | Output only. Count of all groups that have directly joined the space. |
PermissionSetting
Represents a space permission setting.
Поля | |
---|---|
managers_allowed | Optional. Whether spaces managers have this permission. |
members_allowed | Optional. Whether non-manager members have this permission. |
PermissionSettings
Permission settings that you can specify when updating an existing named space.
To set permission settings when creating a space, specify the PredefinedPermissionSettings
field in your request.
Поля | |
---|---|
manage_members_and_groups | Optional. Setting for managing members and groups in a space. |
modify_space_details | Optional. Setting for updating space name, avatar, description and guidelines. |
toggle_history | Optional. Setting for toggling space history on and off. |
use_at_mention_all | Optional. Setting for using @all in a space. |
manage_apps | Optional. Setting for managing apps in a space. |
manage_webhooks | Optional. Setting for managing webhooks in a space. |
post_messages | Output only. Setting for posting messages in a space. |
reply_messages | Optional. Setting for replying to messages in a space. |
PredefinedPermissionSettings
Predefined permission settings that you can only specify when creating a named space. More settings might be added in the future. For details about permission settings for named spaces, see Learn about spaces .
Перечисления | |
---|---|
PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED | Unspecified. Don't use. |
COLLABORATION_SPACE | Setting to make the space a collaboration space where all members can post messages. |
ANNOUNCEMENT_SPACE | Setting to make the space an announcement space where only space managers can post messages. |
SpaceDetails
Details about the space including description and rules.
Поля | |
---|---|
description | Optional. A description of the space. For example, describe the space's discussion topic, functional purpose, or participants. Supports up to 150 characters. |
guidelines | Optional. The space's rules, expectations, and etiquette. Supports up to 5,000 characters. |
SpaceThreadingState
Specifies the type of threading state in the Chat space.
Перечисления | |
---|---|
SPACE_THREADING_STATE_UNSPECIFIED | Сдержанный. |
THREADED_MESSAGES | Named spaces that support message threads. When users respond to a message, they can reply in-thread, which keeps their response in the context of the original message. |
GROUPED_MESSAGES | Named spaces where the conversation is organized by topic. Topics and their replies are grouped together. |
UNTHREADED_MESSAGES | Direct messages (DMs) between two people and group conversations between 3 or more people. |
SpaceType
The type of space. Required when creating or updating a space. Output only for other usage.
Перечисления | |
---|---|
SPACE_TYPE_UNSPECIFIED | Сдержанный. |
SPACE | A place where people send messages, share files, and collaborate. A SPACE can include Chat apps. |
GROUP_CHAT | Group conversations between 3 or more people. A GROUP_CHAT can include Chat apps. |
DIRECT_MESSAGE | 1:1 messages between two humans or a human and a Chat app. |
Тип
Deprecated: Use SpaceType
instead.
Перечисления | |
---|---|
TYPE_UNSPECIFIED | Сдержанный. |
ROOM | Conversations between two or more humans. |
DM | 1:1 Direct Message between a human and a Chat app, where all messages are flat. Note that this doesn't include direct messages between two humans. |
SpaceBatchUpdatedEventData
Event payload for multiple updates to a space.
Event type: google.workspace.chat.space.v1.batchUpdated
Поля | |
---|---|
spaces[] | A list of updated spaces. |
SpaceEvent
An event that represents a change or activity in a Google Chat space. To learn more, see Work with events from Google Chat .
Поля | |
---|---|
name | Resource name of the space event. Format: |
event_time | Time when the event occurred. |
event_type | Type of space event. Each event type has a batch version, which represents multiple instances of the event type that occur in a short period of time. For Supported event types for messages :
Supported event types for memberships :
Supported event types for reactions :
Supported event types about the space :
|
Union field | |
message_created_event_data | Event payload for a new message. Event type: |
message_updated_event_data | Event payload for an updated message. Event type: |
message_deleted_event_data | Event payload for a deleted message. Event type: |
message_batch_created_event_data | Event payload for multiple new messages. Event type: |
message_batch_updated_event_data | Event payload for multiple updated messages. Event type: |
message_batch_deleted_event_data | Event payload for multiple deleted messages. Event type: |
space_updated_event_data | Event payload for a space update. Event type: |
space_batch_updated_event_data | Event payload for multiple updates to a space. Event type: |
membership_created_event_data | Event payload for a new membership. Event type: |
membership_updated_event_data | Event payload for an updated membership. Event type: |
membership_deleted_event_data | Event payload for a deleted membership. Event type: |
membership_batch_created_event_data | Event payload for multiple new memberships. Event type: |
membership_batch_updated_event_data | Event payload for multiple updated memberships. Event type: |
membership_batch_deleted_event_data | Event payload for multiple deleted memberships. Event type: |
reaction_created_event_data | Event payload for a new reaction. Event type: |
reaction_deleted_event_data | Event payload for a deleted reaction. Event type: |
reaction_batch_created_event_data | Event payload for multiple new reactions. Event type: |
reaction_batch_deleted_event_data | Event payload for multiple deleted reactions. Event type: |
SpaceNotificationSetting
The notification setting of a user in a space.
Поля | |
---|---|
name | Identifier. The resource name of the space notification setting. Format: |
notification_setting | The notification setting. |
mute_setting | The space notification mute setting. |
MuteSetting
The space notification mute setting types.
Перечисления | |
---|---|
MUTE_SETTING_UNSPECIFIED | Сдержанный. |
UNMUTED | The user will receive notifications for the space based on the notification setting. |
MUTED | The user will not receive any notifications for the space, regardless of the notification setting. |
NotificationSetting
The notification setting types. Other types might be supported in the future.
Перечисления | |
---|---|
NOTIFICATION_SETTING_UNSPECIFIED | Сдержанный. |
ALL | Notifications are triggered by @mentions, followed threads, first message of new threads. All new threads are automatically followed, unless manually unfollowed by the user. |
MAIN_CONVERSATIONS | The notification is triggered by @mentions, followed threads, first message of new threads. Not available for 1:1 direct messages. |
FOR_YOU | The notification is triggered by @mentions, followed threads. Not available for 1:1 direct messages. |
OFF | Notification is off. |
SpaceReadState
A user's read state within a space, used to identify read and unread messages.
Поля | |
---|---|
name | Resource name of the space read state. Format: |
last_read_time | Optional. The time when the user's space read state was updated. Usually this corresponds with either the timestamp of the last read message, or a timestamp specified by the user to mark the last read position in a space. |
SpaceUpdatedEventData
Event payload for an updated space.
Event type: google.workspace.chat.space.v1.updated
Поля | |
---|---|
space | The updated space. |
Нить
A thread in a Google Chat space. For example usage, see Start or reply to a message thread .
If you specify a thread when creating a message, you can set the messageReplyOption
field to determine what happens if no matching thread is found.
Поля | |
---|---|
name | Identifier. Resource name of the thread. Example: |
thread_key | Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters. This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread |
ThreadReadState
A user's read state within a thread, used to identify read and unread messages.
Поля | |
---|---|
name | Resource name of the thread read state. Format: |
last_read_time | The time when the user's thread read state was updated. Usually this corresponds with the timestamp of the last read message in a thread. |
UpdateMembershipRequest
Request message for updating a membership.
Поля | |
---|---|
membership | Required. The membership to update. Only fields specified by |
update_mask | Required. The field paths to update. Separate multiple values with commas or use Currently supported field paths:
|
use_admin_access | Optional. When The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege . Requires the |
UpdateMessageRequest
Request to update a message.
Поля | |
---|---|
message | Required. Message with fields updated. |
update_mask | Required. The field paths to update. Separate multiple values with commas or use Currently supported field paths:
|
allow_missing | Optional. If |
UpdateSpaceNotificationSettingRequest
Request to update the space notification settings. Only supports updating notification setting for the calling user.
Поля | |
---|---|
space_notification_setting | Required. The resource name for the space notification settings must be populated in the form of |
update_mask | Required. Supported field paths:
|
UpdateSpaceReadStateRequest
Request message for UpdateSpaceReadState API.
Поля | |
---|---|
space_read_state | Required. The space read state and fields to update. Only supports updating read state for the calling user. To refer to the calling user, set one of the following:
Format: users/{user}/spaces/{space}/spaceReadState |
update_mask | Required. The field paths to update. Currently supported field paths:
When the To mark the space as read, set |
UpdateSpaceRequest
A request to update a single space.
Поля | |
---|---|
space | Required. Space with fields to be updated. |
update_mask | Required. The updated field paths, comma separated if there are multiple. You can update the following fields for a space:
|
use_admin_access | Optional. When The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege . Requires the Some |
Пользователь
A user in Google Chat. When returned as an output from a request, if your Chat app authenticates as a user , the output for a User
resource only populates the user's name
and type
.
Поля | |
---|---|
name | Resource name for a Google Chat Format: For
|
display_name | Output only. The user's display name. |
domain_id | Unique identifier of the user's Google Workspace domain. |
type | User type. |
is_anonymous | Output only. When |
Тип
Перечисления | |
---|---|
TYPE_UNSPECIFIED | Default value for the enum. DO NOT USE. |
HUMAN | Human user. |
BOT | Chat app user. |
UserMentionMetadata
Annotation metadata for user mentions (@).
Поля | |
---|---|
user | The user mentioned. |
type | The type of user mention. |
Тип
Перечисления | |
---|---|
TYPE_UNSPECIFIED | Default value for the enum. Don't use. |
ADD | Add user to space. |
MENTION | Mention user in space. |
WidgetMarkup
A widget is a UI element that presents text and images.
Поля | |
---|---|
buttons[] | A list of buttons. Buttons is also |
Union field data . A WidgetMarkup can only have one of the following items. You can use multiple WidgetMarkup fields to display more items. data can be only one of the following: | |
text_paragraph | Display a text paragraph in this widget. |
image | Display an image in this widget. |
key_value | Display a key value item in this widget. |
Кнопка
A button. Can be a text button or an image button.
Поля | |
---|---|
Union field | |
text_button | A button with text and |
image_button | A button with image and |
FormAction
A form action describes the behavior when the form is submitted. For example, you can invoke Apps Script to handle the form.
Поля | |
---|---|
action_method_name | The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. You can use the same method name for several elements that trigger a common behavior. |
parameters[] | List of action parameters. |
ActionParameter
List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, snooze next week. You might use action method = snooze()
, passing the snooze type and snooze time in the list of string parameters.
Поля | |
---|---|
key | The name of the parameter for the action script. |
value | The value of the parameter. |
Икона
The set of supported icons.
Перечисления | |
---|---|
ICON_UNSPECIFIED | |
AIRPLANE | |
BOOKMARK | |
BUS | |
CAR | |
CLOCK | |
CONFIRMATION_NUMBER_ICON | |
DOLLAR | |
DESCRIPTION | |
EMAIL | |
EVENT_PERFORMER | |
EVENT_SEAT | |
FLIGHT_ARRIVAL | |
FLIGHT_DEPARTURE | |
HOTEL | |
HOTEL_ROOM_TYPE | |
INVITE | |
MAP_PIN | |
MEMBERSHIP | |
MULTIPLE_PEOPLE | |
OFFER | |
PERSON | |
PHONE | |
RESTAURANT_ICON | |
SHOPPING_CART | |
STAR | |
STORE | |
TICKET | |
TRAIN | |
VIDEO_CAMERA | |
VIDEO_PLAY |
Изображение
An image that's specified by a URL and can have an onclick
action.
Поля | |
---|---|
image_url | The URL of the image. |
on_click | The |
aspect_ratio | The aspect ratio of this image (width and height). This field lets you reserve the right height for the image while waiting for it to load. It's not meant to override the built-in aspect ratio of the image. If unset, the server fills it by prefetching the image. |
ImageButton
An image button with an onclick
action.
Поля | |
---|---|
on_click | The |
name | The name of this |
Union field icons . The icon can be specified by an Icon enum or a URL. icons can be only one of the following: | |
icon | The icon specified by an |
icon_url | The icon specified by a URL. |
KeyValue
A UI element contains a key (label) and a value (content). This element can also contain some actions such as onclick
button.
Поля | |
---|---|
top_label | The text of the top label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons . |
content | The text of the content. Formatted text supported and always required. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons . |
content_multiline | If the content should be multiline. |
bottom_label | The text of the bottom label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons . |
on_click | The |
Union field icons . At least one of icons, top_label and bottom_label must be defined. icons can be only one of the following: | |
icon | An enum value that's replaced by the Chat API with the corresponding icon image. |
icon_url | The icon specified by a URL. |
Union field control . A control widget. You can set either button or switch_widget , but not both. control can be only one of the following: | |
button | A button that can be clicked to trigger an action. |
OnClick
An onclick
action (for example, open a link).
Поля | |
---|---|
Union field | |
action | A form action is triggered by this |
open_link | This |
ОткрытьСсылку
A link that opens a new window.
Поля | |
---|---|
url | The URL to open. |
TextButton
A button with text and onclick
action.
Поля | |
---|---|
text | The text of the button. |
on_click | The |
TextParagraph
A paragraph of text. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons .
Поля | |
---|---|
text | |
Индекс
-
ChatService
(interface) -
AccessoryWidget
(message) -
ActionResponse
(message) -
ActionResponse.ResponseType
(enum) -
ActionResponse.SelectionItems
(message) -
ActionResponse.UpdatedWidget
(message) -
ActionStatus
(message) -
Annotation
(message) -
AnnotationType
(enum) -
AppCommandMetadata
(message) -
AppCommandMetadata.AppCommandType
(enum) -
AttachedGif
(message) -
Attachment
(message) -
Attachment.Source
(enum) -
AttachmentDataRef
(message) -
CardWithId
(message) -
ChatSpaceLinkData
(message) -
CompleteImportSpaceRequest
(message) -
CompleteImportSpaceResponse
(message) -
ContextualAddOnMarkup
(message) -
ContextualAddOnMarkup.Card
(message) -
ContextualAddOnMarkup.Card.CardAction
(message) -
ContextualAddOnMarkup.Card.CardHeader
(message) -
ContextualAddOnMarkup.Card.CardHeader.ImageStyle
(enum) -
ContextualAddOnMarkup.Card.Section
(message) -
CreateCustomEmojiRequest
(message) -
CreateMembershipRequest
(message) -
CreateMessageRequest
(message) -
CreateMessageRequest.MessageReplyOption
(enum) -
CreateReactionRequest
(message) -
CreateSpaceRequest
(message) -
CustomEmoji
(message) -
CustomEmoji.CustomEmojiPayload
(message) -
CustomEmojiMetadata
(message) -
DeleteCustomEmojiRequest
(message) -
DeleteMembershipRequest
(message) -
DeleteMessageRequest
(message) -
DeleteReactionRequest
(message) -
DeleteSpaceRequest
(message) -
DeletionMetadata
(message) -
DeletionMetadata.DeletionType
(enum) -
Dialog
(message) -
DialogAction
(message) -
DriveDataRef
(message) -
DriveLinkData
(message) -
Emoji
(message) -
EmojiReactionSummary
(message) -
FindDirectMessageRequest
(message) -
GetAttachmentRequest
(message) -
GetCustomEmojiRequest
(message) -
GetMembershipRequest
(message) -
GetMessageRequest
(message) -
GetSpaceEventRequest
(message) -
GetSpaceNotificationSettingRequest
(message) -
GetSpaceReadStateRequest
(message) -
GetSpaceRequest
(message) -
GetThreadReadStateRequest
(message) -
Group
(message) -
HistoryState
(enum) -
ListCustomEmojisRequest
(message) -
ListCustomEmojisResponse
(message) -
ListMembershipsRequest
(message) -
ListMembershipsResponse
(message) -
ListMessagesRequest
(message) -
ListMessagesResponse
(message) -
ListReactionsRequest
(message) -
ListReactionsResponse
(message) -
ListSpaceEventsRequest
(message) -
ListSpaceEventsResponse
(message) -
ListSpacesRequest
(message) -
ListSpacesResponse
(message) -
MatchedUrl
(message) -
Membership
(message) -
Membership.MembershipRole
(enum) -
Membership.MembershipState
(enum) -
MembershipBatchCreatedEventData
(message) -
MembershipBatchDeletedEventData
(message) -
MembershipBatchUpdatedEventData
(message) -
MembershipCreatedEventData
(message) -
MembershipDeletedEventData
(message) -
MembershipUpdatedEventData
(message) -
Message
(message) -
MessageBatchCreatedEventData
(message) -
MessageBatchDeletedEventData
(message) -
MessageBatchUpdatedEventData
(message) -
MessageCreatedEventData
(message) -
MessageDeletedEventData
(message) -
MessageUpdatedEventData
(message) -
QuotedMessageMetadata
(message) -
Reaction
(message) -
ReactionBatchCreatedEventData
(message) -
ReactionBatchDeletedEventData
(message) -
ReactionCreatedEventData
(message) -
ReactionDeletedEventData
(message) -
RichLinkMetadata
(message) -
RichLinkMetadata.RichLinkType
(enum) -
SearchSpacesRequest
(message) -
SearchSpacesResponse
(message) -
SetUpSpaceRequest
(message) -
SlashCommand
(message) -
SlashCommandMetadata
(message) -
SlashCommandMetadata.Type
(enum) -
Space
(message) -
Space.AccessSettings
(message) -
Space.AccessSettings.AccessState
(enum) -
Space.MembershipCount
(message) -
Space.PermissionSetting
(message) -
Space.PermissionSettings
(message) -
Space.PredefinedPermissionSettings
(enum) -
Space.SpaceDetails
(message) -
Space.SpaceThreadingState
(enum) -
Space.SpaceType
(enum) -
Space.Type
(enum) -
SpaceBatchUpdatedEventData
(message) -
SpaceEvent
(message) -
SpaceNotificationSetting
(message) -
SpaceNotificationSetting.MuteSetting
(enum) -
SpaceNotificationSetting.NotificationSetting
(enum) -
SpaceReadState
(message) -
SpaceUpdatedEventData
(message) -
Thread
(message) -
ThreadReadState
(message) -
UpdateMembershipRequest
(message) -
UpdateMessageRequest
(message) -
UpdateSpaceNotificationSettingRequest
(message) -
UpdateSpaceReadStateRequest
(message) -
UpdateSpaceRequest
(message) -
User
(message) -
User.Type
(enum) -
UserMentionMetadata
(message) -
UserMentionMetadata.Type
(enum) -
WidgetMarkup
(message) -
WidgetMarkup.Button
(message) -
WidgetMarkup.FormAction
(message) -
WidgetMarkup.FormAction.ActionParameter
(message) -
WidgetMarkup.Icon
(enum) -
WidgetMarkup.Image
(message) -
WidgetMarkup.ImageButton
(message) -
WidgetMarkup.KeyValue
(message) -
WidgetMarkup.OnClick
(message) -
WidgetMarkup.OpenLink
(message) -
WidgetMarkup.TextButton
(message) -
WidgetMarkup.TextParagraph
(message)
ChatService
Enables developers to build Chat apps and integrations on Google Chat Platform.
CompleteImportSpace |
---|
Completes the import process for the specified space and makes it visible to users. Requires user authentication and domain-wide delegation with the authorization scope :
For more information, see Authorize Google Chat apps to import data .
|
CreateCustomEmoji |
---|
Creates a custom emoji. Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions . Requires user authentication with the authorization scope :
|
CreateMembership |
---|
Creates a membership for the calling Chat app, a user, or a Google Group. Creating memberships for other Chat apps isn't supported. When creating a membership, if the specified member has their auto-accept policy turned off, then they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Supports the following types of authentication :
App authentication is not supported for the following use cases:
For example usage, see:
|
CreateMessage |
---|
Creates a message in a Google Chat space. For an example, see Send a message . Supports the following types of authentication :
Chat attributes the message sender differently depending on the type of authentication that you use in your request. The following image shows how Chat attributes a message when you use app authentication. Chat displays the Chat app as the message sender. The content of the message can contain text ( The following image shows how Chat attributes a message when you use user authentication. Chat displays the user as the message sender and attributes the Chat app to the message by displaying its name. The content of message can only contain text ( The maximum message size, including the message contents, is 32,000 bytes. For webhook requests, the response doesn't contain the full message. The response only populates the
|
CreateReaction |
---|
Creates a reaction and adds it to a message. For an example, see Add a reaction to a message . Requires user authentication with one of the following authorization scopes :
|
CreateSpace |
---|
Creates a space. Can be used to create a named space, or a group chat in Supports the following types of authentication :
When authenticating as an app, the When authenticating as an app, the Chat app is added as a member of the space. However, unlike human authentication, the Chat app is not added as a space manager. By default, the Chat app can be removed from the space by all space members. To allow only space managers to remove the app from a space, set Space membership upon creation depends on whether the space is created in
If you receive the error message
|
DeleteCustomEmoji |
---|
Deletes a custom emoji. By default, users can only delete custom emoji they created. Emoji managers assigned by the administrator can delete any custom emoji in the organization. See Learn about custom emojis in Google Chat . Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions . Requires user authentication with the authorization scope :
|
DeleteMembership |
---|
Deletes a membership. For an example, see Remove a user or a Google Chat app from a space . Supports the following types of authentication :
App authentication is not supported for the following use cases:
To delete memberships for space managers, the requester must be a space manager. If you're using app authentication the Chat app must be the space creator.
|
DeleteMessage |
---|
Deletes a message. For an example, see Delete a message . Supports the following types of authentication :
When using app authentication, requests can only delete messages created by the calling Chat app.
|
DeleteReaction |
---|
Deletes a reaction to a message. For an example, see Delete a reaction . Requires user authentication with one of the following authorization scopes :
|
DeleteSpace |
---|
Deletes a named space. Always performs a cascading delete, which means that the space's child resources—like messages posted in the space and memberships in the space—are also deleted. For an example, see Delete a space . Supports the following types of authentication :
|
FindDirectMessage |
---|
Returns the existing direct message with the specified user. If no direct message space is found, returns a With app authentication , returns the direct message space between the specified user and the calling Chat app. With user authentication , returns the direct message space between the specified user and the authenticated user. Supports the following types of authentication :
|
GetAttachment |
---|
Gets the metadata of a message attachment. The attachment data is fetched using the media API . For an example, see Get metadata about a message attachment . Requires app authentication with the authorization scope :
|
GetCustomEmoji |
---|
Returns details about a custom emoji. Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions . Requires user authentication with one of the following authorization scopes :
|
GetMembership |
---|
Returns details about a membership. For an example, see Get details about a user's or Google Chat app's membership . Supports the following types of authentication :
|
GetMessage |
---|
Returns details about a message. For an example, see Get details about a message . Supports the following types of authentication :
Note: Might return a message from a blocked member or space.
|
GetSpace |
---|
Returns details about a space. For an example, see Get details about a space . Supports the following types of authentication :
App authentication has the following limitations:
|
GetSpaceEvent |
---|
Returns an event from a Google Chat space. The event payload contains the most recent version of the resource that changed. For example, if you request an event about a new message but the message was later updated, the server returns the updated Note: The Requires user authentication with an authorization scope appropriate for reading the requested data:
To get an event, the authenticated user must be a member of the space. For an example, see Get details about an event from a Google Chat space .
|
GetSpaceNotificationSetting |
---|
Gets the space notification setting. For an example, see Get the caller's space notification setting . Requires user authentication with the authorization scope :
|
GetSpaceReadState |
---|
Returns details about a user's read state within a space, used to identify read and unread messages. For an example, see Get details about a user's space read state . Requires user authentication with one of the following authorization scopes :
|
GetThreadReadState |
---|
Returns details about a user's read state within a thread, used to identify read and unread messages. For an example, see Get details about a user's thread read state . Requires user authentication with one of the following authorization scopes :
|
ListCustomEmojis |
---|
Lists custom emojis visible to the authenticated user. Custom emojis are only available for Google Workspace accounts, and the administrator must turn custom emojis on for the organization. For more information, see Learn about custom emojis in Google Chat and Manage custom emoji permissions . Requires user authentication with one of the following authorization scopes :
|
ListMemberships |
---|
Lists memberships in a space. For an example, see List users and Google Chat apps in a space . Listing memberships with app authentication lists memberships in spaces that the Chat app has access to, but excludes Chat app memberships, including its own. Listing memberships with User authentication lists memberships in spaces that the authenticated user has access to. Supports the following types of authentication :
|
ListMessages |
---|
Lists messages in a space that the caller is a member of, including messages from blocked members and spaces. If you list messages from a space with no messages, the response is an empty object. When using a REST/HTTP interface, the response contains an empty JSON object, Requires user authentication with one of the following authorization scopes :
|
ListReactions |
---|
Lists reactions to a message. For an example, see List reactions for a message . Requires user authentication with one of the following authorization scopes :
|
ListSpaceEvents |
---|
Lists events from a Google Chat space. For each event, the payload contains the most recent version of the Chat resource. For example, if you list events about new space members, the server returns Requires user authentication with an authorization scope appropriate for reading the requested data:
To list events, the authenticated user must be a member of the space. For an example, see List events from a Google Chat space .
|
ListSpaces |
---|
Lists spaces the caller is a member of. Group chats and DMs aren't listed until the first message is sent. For an example, see List spaces . Supports the following types of authentication :
To list all named spaces by Google Workspace organization, use the
|
SearchSpaces |
---|
Returns a list of spaces in a Google Workspace organization based on an administrator's search. Requires user authentication with administrator privileges and one of the following authorization scopes :
In the request, set
|
SetUpSpace |
---|
Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see Set up a space with initial members . To specify the human members to add, add memberships with the appropriate To specify the Google groups to add, add memberships with the appropriate For a named space or group chat, if the caller blocks, or is blocked by some members, or doesn't have permission to add some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies aren't supported. If you receive the error message Requires user authentication with one of the following authorization scopes :
|
UpdateMembership |
---|
Updates a membership. For an example, see Update a user's membership in a space . Supports the following types of authentication :
|
UpdateMessage |
---|
Updates a message. There's a difference between the Supports the following types of authentication :
When using app authentication, requests can only update messages created by the calling Chat app.
|
UpdateSpace |
---|
Updates a space. For an example, see Update a space . If you're updating the Supports the following types of authentication :
App authentication has the following limitations:
|
UpdateSpaceNotificationSetting |
---|
Updates the space notification setting. For an example, see Update the caller's space notification setting . Requires user authentication with the authorization scope :
|
UpdateSpaceReadState |
---|
Updates a user's read state within a space, used to identify read and unread messages. For an example, see Update a user's space read state . Requires user authentication with the authorization scope :
|
AccessoryWidget
One or more interactive widgets that appear at the bottom of a message. For details, see Add interactive widgets at the bottom of a message .
Поля | |
---|---|
Union field action . The type of action. action can be only one of the following: | |
button_list | A list of buttons. |
ActionResponse
Parameters that a Chat app can use to configure how its response is posted.
Поля | |
---|---|
type | Input only. The type of Chat app response. |
url | Input only. URL for users to authenticate or configure. (Only for |
dialog_action | Input only. A response to an interaction event related to a dialog . Must be accompanied by |
updated_widget | Input only. The response of the updated widget. |
ResponseType
The type of Chat app response.
Перечисления | |
---|---|
TYPE_UNSPECIFIED | Default type that's handled as NEW_MESSAGE . |
NEW_MESSAGE | Post as a new message in the topic. |
UPDATE_MESSAGE | Update the Chat app's message. This is only permitted on a CARD_CLICKED event where the message sender type is BOT . |
UPDATE_USER_MESSAGE_CARDS | Update the cards on a user's message. This is only permitted as a response to a MESSAGE event with a matched url, or a CARD_CLICKED event where the message sender type is HUMAN . Text is ignored. |
REQUEST_CONFIG | Privately ask the user for additional authentication or configuration. |
DIALOG | Presents a dialog . |
UPDATE_WIDGET | Widget text autocomplete options query. |
SelectionItems
List of widget autocomplete results.
Поля | |
---|---|
items[] | An array of the SelectionItem objects. |
UpdatedWidget
For selectionInput
widgets, returns autocomplete suggestions for a multiselect menu.
Поля | |
---|---|
widget | The ID of the updated widget. The ID must match the one for the widget that triggered the update request. |
Union field updated_widget . The widget updated in response to a user action. updated_widget can be only one of the following: | |
suggestions | List of widget autocomplete results |
ActionStatus
Represents the status for a request to either invoke or submit a dialog .
Поля | |
---|---|
status_code | The status code. |
user_facing_message | The message to send users about the status of their request. If unset, a generic message based on the |
Аннотация
Output only. Annotations associated with the plain-text body of the message. To add basic formatting to a text message, see Format text messages .
Example plain-text message body:
Hello @FooBot how are you!"
The corresponding annotations metadata:
"annotations":[{
"type":"USER_MENTION",
"startIndex":6,
"length":7,
"userMention": {
"user": {
"name":"users/{user}",
"displayName":"FooBot",
"avatarUrl":"https://goo.gl/aeDtrS",
"type":"BOT"
},
"type":"MENTION"
}
}]
Поля | |
---|---|
type | The type of this annotation. |
length | Length of the substring in the plain-text message body this annotation corresponds to. |
start_index | Start index (0-based, inclusive) in the plain-text message body this annotation corresponds to. |
Union field metadata . Additional metadata about the annotation. metadata can be only one of the following: | |
user_mention | The metadata of user mention. |
slash_command | The metadata for a slash command. |
rich_link_metadata | The metadata for a rich link. |
custom_emoji_metadata | The metadata for a custom emoji. |
AnnotationType
Type of the annotation.
Перечисления | |
---|---|
ANNOTATION_TYPE_UNSPECIFIED | Default value for the enum. Don't use. |
USER_MENTION | A user is mentioned. |
SLASH_COMMAND | A slash command is invoked. |
RICH_LINK | A rich link annotation. |
CUSTOM_EMOJI | A custom emoji annotation. |
AppCommandMetadata
Metadata about a Chat app command .
Поля | |
---|---|
app_command_id | The ID for the command specified in the Chat API configuration. |
app_command_type | The type of Chat app command. |
AppCommandType
The type of Chat app command. For details, see Types of Chat app commands .
Перечисления | |
---|---|
APP_COMMAND_TYPE_UNSPECIFIED | Значение по умолчанию. Unspecified. |
SLASH_COMMAND | A slash command. The user sends the command in a Chat message. |
QUICK_COMMAND | A quick command. The user selects the command from the Chat menu in the message reply area. |
AttachedGif
A GIF image that's specified by a URL.
Поля | |
---|---|
uri | Output only. The URL that hosts the GIF image. |
Вложение
An attachment in Google Chat.
Поля | |
---|---|
name | Optional. Resource name of the attachment, in the form |
content_name | Output only. The original file name for the content, not the full path. |
content_type | Output only. The content type (MIME type) of the file. |
thumbnail_uri | Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps shouldn't use this URL to download attachment content. |
download_uri | Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps shouldn't use this URL to download attachment content. |
source | Output only. The source of the attachment. |
Union field data_ref . The data reference to the attachment. data_ref can be only one of the following: | |
attachment_data_ref | Optional. A reference to the attachment data. This field is used to create or update messages with attachments, or with the media API to download the attachment data. |
drive_data_ref | Output only. A reference to the Google Drive attachment. This field is used with the Google Drive API. |
Источник
The source of the attachment.
Перечисления | |
---|---|
SOURCE_UNSPECIFIED | Сдержанный. |
DRIVE_FILE | The file is a Google Drive file. |
UPLOADED_CONTENT | The file is uploaded to Chat. |
AttachmentDataRef
A reference to the attachment data.
Поля | |
---|---|
resource_name | Optional. The resource name of the attachment data. This field is used with the media API to download the attachment data. |
attachment_upload_token | Optional. Opaque token containing a reference to an uploaded attachment. Treated by clients as an opaque string and used to create or update Chat messages with attachments. |
CardWithId
A card in a Google Chat message.
Only Chat apps can create cards. If your Chat app authenticates as a user , the message can't contain cards.
Design and preview cards with the Card Builder.
Open the Card BuilderПоля | |
---|---|
card_id | Required if the message contains multiple cards. A unique identifier for a card in a message. |
card | A card. Maximum size is 32 KB. |
ChatSpaceLinkData
Data for Chat space links.
Поля | |
---|---|
space | The space of the linked Chat space resource. Format: |
thread | The thread of the linked Chat space resource. Format: |
message | The message of the linked Chat space resource. Format: |
CompleteImportSpaceRequest
Request message for completing the import process for a space.
Поля | |
---|---|
name | Required. Resource name of the import mode space. Format: |
CompleteImportSpaceResponse
Response message for completing the import process for a space.
Поля | |
---|---|
space | The import mode space. |
ContextualAddOnMarkup
This type has no fields.
The markup for developers to specify the contents of a contextual AddOn.
Карта
A card is a UI element that can contain UI widgets such as text and images.
Поля | |
---|---|
header | The header of the card. A header usually contains a title and an image. |
sections[] | Sections are separated by a line divider. |
card_actions[] | The actions of this card. |
name | Name of the card. |
CardAction
A card action is the action associated with the card. For an invoice card, a typical action would be: delete invoice, email invoice or open the invoice in browser.
Not supported by Google Chat apps.
Поля | |
---|---|
action_label | The label used to be displayed in the action menu item. |
on_click | The onclick action for this action item. |
CardHeader
Поля | |
---|---|
title | The title must be specified. The header has a fixed height: if both a title and subtitle is specified, each takes up one line. If only the title is specified, it takes up both lines. |
subtitle | The subtitle of the card header. |
image_style | The image's type (for example, square border or circular border). |
image_url | The URL of the image in the card header. |
ImageStyle
Перечисления | |
---|---|
IMAGE_STYLE_UNSPECIFIED | |
IMAGE | Square border. |
AVATAR | Circular border. |
Раздел
A section contains a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, cards have a narrow fixed width, so there's currently no need for layout properties (for example, float).
Поля | |
---|---|
header | The header of the section. Formatted text is supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons . |
widgets[] | A section must contain at least one widget. |
CreateCustomEmojiRequest
A request to create a custom emoji.
Поля | |
---|---|
custom_emoji | Required. The custom emoji to create. |
CreateMembershipRequest
Request message for creating a membership.
Поля | |
---|---|
parent | Required. The resource name of the space for which to create the membership. Format: spaces/{space} |
membership | Required. The membership relation to create. The When a Chat app creates a membership relation for a human user, it must use certain authorization scopes and set specific values for certain fields:
Inviting users external to the Workspace organization that owns the space requires user authentication . When a Chat app creates a membership relation for itself, it must authenticate as a user and use the |
use_admin_access | Optional. When The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege . Requires the Creating app memberships or creating memberships for users outside the administrator's Google Workspace organization isn't supported using admin access. |
CreateMessageRequest
Creates a message.
Поля | |
---|---|
parent | Required. The resource name of the space in which to create a message. Format: |
message | Required. Message body. |
thread_key | Optional. Deprecated: Use |
request_id | Optional. A unique request ID for this message. Specifying an existing request ID returns the message created with that ID instead of creating a new message. |
message_reply_option | Optional. Specifies whether a message starts a thread or replies to one. Only supported in named spaces. When responding to user interactions , this field is ignored. For interactions within a thread, the reply is created in the same thread. Otherwise, the reply is created as a new thread. |
message_id | Optional. A custom ID for a message. Lets Chat apps get, update, or delete a message without needing to store the system-assigned ID in the message's resource name (represented in the message The value for this field must meet the following requirements:
For details, see Name a message . |
MessageReplyOption
Specifies how to reply to a message. More states might be added in the future.
Перечисления | |
---|---|
MESSAGE_REPLY_OPTION_UNSPECIFIED | Default. Starts a new thread. Using this option ignores any thread ID or that's included. |
REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD | Creates the message as a reply to the thread specified by thread ID or . If it fails, the message starts a new thread instead. |
REPLY_MESSAGE_OR_FAIL | Creates the message as a reply to the thread specified by thread ID or . If a new thread_key is used, a new thread is created. If the message creation fails, a NOT_FOUND error is returned instead. |
CreateReactionRequest
Creates a reaction to a message.
Поля | |
---|---|
parent | Required. The message where the reaction is created. Format: |
reaction | Required. The reaction to create. |
CreateSpaceRequest
A request to create a named space with no members.
Поля | |
---|---|
space | Required. The If you receive the error message The space |
request_id | Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error. |
CustomEmoji
Represents a custom emoji .
Поля | |
---|---|
name | Identifier. The resource name of the custom emoji, assigned by the server. Format: |
uid | Output only. Unique key for the custom emoji resource. |
emoji_name | Optional. Immutable. User-provided name for the custom emoji, which is unique within the organization. Required when the custom emoji is created, output only otherwise. Emoji names must start and end with colons, must be lowercase and can only contain alphanumeric characters, hyphens, and underscores. Hyphens and underscores should be used to separate words and cannot be used consecutively. Example: |
temporary_image_uri | Output only. A temporary image URL for the custom emoji, valid for at least 10 minutes. Note that this is not populated in the response when the custom emoji is created. |
payload | Optional. Input only. Payload data. Required when the custom emoji is created. |
CustomEmojiPayload
Payload data for the custom emoji.
Поля | |
---|---|
file_content | Required. Input only. The image used for the custom emoji. The payload must be under 256 KB and the dimension of the image must be square and between 64 and 500 pixels. The restrictions are subject to change. |
filename | Required. Input only. The image file name. Supported file extensions: |
CustomEmojiMetadata
Annotation metadata for custom emoji.
Поля | |
---|---|
custom_emoji | The custom emoji. |
DeleteCustomEmojiRequest
Request for deleting a custom emoji.
Поля | |
---|---|
name | Required. Resource name of the custom emoji to delete. Format: You can use the emoji name as an alias for |
DeleteMembershipRequest
Request to delete a membership in a space.
Поля | |
---|---|
name | Required. Resource name of the membership to delete. Chat apps can delete human users' or their own memberships. Chat apps can't delete other apps' memberships. When deleting a human membership, requires the When deleting an app membership, requires the Format: |
use_admin_access | Optional. When The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege . Requires the Deleting app memberships in a space isn't supported using admin access. |
DeleteMessageRequest
Request to delete a message.
Поля | |
---|---|
name | Required. Resource name of the message. Format: If you've set a custom ID for your message, you can use the value from the |
force | Optional. When Only applies when authenticating as a user . Has no effect when authenticating as a Chat app . |
DeleteReactionRequest
Deletes a reaction to a message.
Поля | |
---|---|
name | Required. Name of the reaction to delete. Format: |
DeleteSpaceRequest
Request for deleting a space.
Поля | |
---|---|
name | Required. Resource name of the space to delete. Format: |
use_admin_access | Optional. When The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege . Requires the |
DeletionMetadata
Information about a deleted message. A message is deleted when delete_time
is set.
Поля | |
---|---|
deletion_type | Indicates who deleted the message. |
DeletionType
Who deleted the message and how it was deleted. More values may be added in the future. See Edit or delete a message in Google Chat for details on when messages can be deleted.
Перечисления | |
---|---|
DELETION_TYPE_UNSPECIFIED | This value is unused. |
CREATOR | User deleted their own message. |
SPACE_OWNER | A space manager deleted the message. |
ADMIN | A Google Workspace administrator deleted the message. Administrators can delete any message in the space, including messages sent by any space member or Chat app. |
APP_MESSAGE_EXPIRY | A Chat app deleted its own message when it expired. |
CREATOR_VIA_APP | A Chat app deleted the message on behalf of the creator (using user authentication). |
SPACE_OWNER_VIA_APP | A Chat app deleted the message on behalf of a space manager (using user authentication). |
SPACE_MEMBER | A member of the space deleted the message. Users can delete messages sent by apps. |
Диалог
Wrapper around the card body of the dialog.
Поля | |
---|---|
body | Input only. Body of the dialog, which is rendered in a modal. Google Chat apps don't support the following card entities: |
DialogAction
Contains a dialog and request status code.
Поля | |
---|---|
action_status | Input only. Status for a request to either invoke or submit a dialog . Displays a status and message to users, if necessary. For example, in case of an error or success. |
Union field action . Action to perform. action can be only one of the following: | |
dialog | Input only. Dialog for the request. |
DriveDataRef
A reference to the data of a drive attachment.
Поля | |
---|---|
drive_file_id | The ID for the drive file. Use with the Drive API. |
DriveLinkData
Data for Google Drive links.
Поля | |
---|---|
drive_data_ref | A DriveDataRef which references a Google Drive file. |
mime_type | The mime type of the linked Google Drive resource. |
Эмодзи
An emoji that is used as a reaction to a message.
Поля | |
---|---|
Union field content . Required. The content of the emoji. content can be only one of the following: | |
unicode | Optional. A basic emoji represented by a unicode string. |
custom_emoji | A custom emoji. |
EmojiReactionSummary
The number of people who reacted to a message with a specific emoji.
Поля | |
---|---|
emoji | Output only. Emoji associated with the reactions. |
reaction_count | Output only. The total number of reactions using the associated emoji. |
FindDirectMessageRequest
A request to get direct message space based on the user resource.
Поля | |
---|---|
name | Required. Resource name of the user to find direct message with. Format: |
GetAttachmentRequest
Request to get an attachment.
Поля | |
---|---|
name | Required. Resource name of the attachment, in the form |
GetCustomEmojiRequest
A request to return a single custom emoji.
Поля | |
---|---|
name | Required. Resource name of the custom emoji. Format: You can use the emoji name as an alias for |
GetMembershipRequest
Request to get a membership of a space.
Поля | |
---|---|
name | Required. Resource name of the membership to retrieve. To get the app's own membership by using user authentication , you can optionally use Format: You can use the user's email as an alias for |
use_admin_access | Optional. When The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege . Requires the Getting app memberships in a space isn't supported when using admin access. |
GetMessageRequest
Request to get a message.
Поля | |
---|---|
name | Required. Resource name of the message. Format: If you've set a custom ID for your message, you can use the value from the |
GetSpaceEventRequest
Request message for getting a space event.
Поля | |
---|---|
name | Required. The resource name of the space event. Format: |
GetSpaceNotificationSettingRequest
Request message to get space notification setting. Only supports getting notification setting for the calling user.
Поля | |
---|---|
name | Required. Format: users/{user}/spaces/{space}/spaceNotificationSetting
|
GetSpaceReadStateRequest
Request message for GetSpaceReadState API.
Поля | |
---|---|
name | Required. Resource name of the space read state to retrieve. Only supports getting read state for the calling user. To refer to the calling user, set one of the following:
Format: users/{user}/spaces/{space}/spaceReadState |
GetSpaceRequest
A request to return a single space.
Поля | |
---|---|
name | Required. Resource name of the space, in the form Format: |
use_admin_access | Optional. When The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege . Requires the |
GetThreadReadStateRequest
Request message for GetThreadReadStateRequest API.
Поля | |
---|---|
name | Required. Resource name of the thread read state to retrieve. Only supports getting read state for the calling user. To refer to the calling user, set one of the following:
Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState |
Группа
A Google Group in Google Chat.
Поля | |
---|---|
name | Resource name for a Google Group. Represents a group in Cloud Identity Groups API. Format: groups/{group} |
HistoryState
The history state for messages and spaces. Specifies how long messages and conversation threads are kept after creation.
Перечисления | |
---|---|
HISTORY_STATE_UNSPECIFIED | Значение по умолчанию. Do not use. |
HISTORY_OFF | History off. Messages and threads are kept for 24 hours . |
HISTORY_ON | History on. The organization's Vault retention rules specify for how long messages and threads are kept. |
ListCustomEmojisRequest
A request to return a list of custom emojis.
Поля | |
---|---|
page_size | Optional. The maximum number of custom emojis returned. The service can return fewer custom emojis than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200. |
page_token | Optional. (If resuming from a previous query.) A page token received from a previous list custom emoji call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results. |
filter | Optional. A query filter. Supports filtering by creator. To filter by creator, you must specify a valid value. Currently only For example, the following query returns custom emojis created by the caller:
Invalid queries are rejected with an |
ListCustomEmojisResponse
A response to list custom emojis.
Поля | |
---|---|
custom_emojis[] | Unordered list. List of custom emojis. |
next_page_token | A token that you can send as |
ListMembershipsRequest
Request message for listing memberships.
Поля | |
---|---|
parent | Required. The resource name of the space for which to fetch a membership list. Format: spaces/{space} |
page_size | Optional. The maximum number of memberships to return. The service might return fewer than this value. If unspecified, at most 100 memberships are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an |
page_token | Optional. A page token, received from a previous call to list memberships. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results. |
filter | Optional. A query filter. You can filter memberships by a member's role ( To filter by role, set To filter by type, set To filter by both role and type, use the Either For example, the following queries are valid:
The following queries are invalid:
Invalid queries are rejected by the server with an |
show_groups | Optional. When |
show_invited | Optional. When Currently requires user authentication . |
use_admin_access | Optional. When The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege . Requires either the Listing app memberships in a space isn't supported when using admin access. |
ListMembershipsResponse
Response to list memberships of the space.
Поля | |
---|---|
memberships[] | Unordered list. List of memberships in the requested (or first) page. |
next_page_token | A token that you can send as |
ListMessagesRequest
Lists messages in the specified space, that the user is a member of.
Поля | |
---|---|
parent | Required. The resource name of the space to list messages from. Format: |
page_size | Optional. The maximum number of messages returned. The service might return fewer messages than this value. If unspecified, at most 25 are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an |
page_token | Optional. A page token received from a previous list messages call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results. |
filter | Optional. A query filter. You can filter messages by date ( To filter messages by the date they were created, specify the To filter by thread, specify the To filter by both thread and date, use the For example, the following queries are valid:
Invalid queries are rejected by the server with an |
order_by | Optional. How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows:
The default ordering is |
show_deleted | Optional. Whether to include deleted messages. Deleted messages include deleted time and metadata about their deletion, but message content is unavailable. |
ListMessagesResponse
Response message for listing messages.
Поля | |
---|---|
messages[] | List of messages. |
next_page_token | You can send a token as |
ListReactionsRequest
Lists reactions to a message.
Поля | |
---|---|
parent | Required. The message users reacted to. Format: |
page_size | Optional. The maximum number of reactions returned. The service can return fewer reactions than this value. If unspecified, the default value is 25. The maximum value is 200; values above 200 are changed to 200. |
page_token | Optional. (If resuming from a previous query.) A page token received from a previous list reactions call. Provide this to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results. |
filter | Optional. A query filter. You can filter reactions by emoji (either To filter reactions for multiple emojis or users, join similar fields with the To filter reactions by emoji and user, use the If your query uses both For example, the following queries are valid:
The following queries are invalid:
Invalid queries are rejected with an |
ListReactionsResponse
Response to a list reactions request.
Поля | |
---|---|
reactions[] | List of reactions in the requested (or first) page. |
next_page_token | Continuation token to retrieve the next page of results. It's empty for the last page of results. |
ListSpaceEventsRequest
Request message for listing space events.
Поля | |
---|---|
parent | Required. Resource name of the Google Chat space where the events occurred. Format: |
page_size | Optional. The maximum number of space events returned. The service might return fewer than this value. Negative values return an |
page_token | Optional. A page token, received from a previous list space events call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to list space events must match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results. |
filter | Required. A query filter. You must specify at least one event type ( Optionally, you can also filter by start time (
To specify a start or end time, use the equals For example, the following queries are valid:
The following queries are invalid:
Invalid queries are rejected by the server with an |
ListSpaceEventsResponse
Response message for listing space events.
Поля | |
---|---|
space_events[] | Results are returned in chronological order (oldest event first). Note: The |
next_page_token | Continuation token used to fetch more events. If this field is omitted, there are no subsequent pages. |
ListSpacesRequest
A request to list the spaces the caller is a member of.
Поля | |
---|---|
page_size | Optional. The maximum number of spaces to return. The service might return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. Negative values return an |
page_token | Optional. A page token, received from a previous list spaces call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value may lead to unexpected results. |
filter | Optional. A query filter. You can filter spaces by the space type ( To filter by space type, you must specify valid enum value, such as For example, the following queries are valid:
Invalid queries are rejected by the server with an |
ListSpacesResponse
The response for a list spaces request.
Поля | |
---|---|
spaces[] | List of spaces in the requested (or first) page. Note: The |
next_page_token | You can send a token as |
MatchedUrl
A matched URL in a Chat message. Chat apps can preview matched URLs. For more information, see Preview links .
Поля | |
---|---|
url | Output only. The URL that was matched. |
Членство
Represents a membership relation in Google Chat, such as whether a user or Chat app is invited to, part of, or absent from a space.
Поля | |
---|---|
name | Identifier. Resource name of the membership, assigned by the server. Format: |
state | Output only. State of the membership. |
role | Optional. User's role within a Chat space, which determines their permitted actions in the space. This field can only be used as input in |
create_time | Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces. |
delete_time | Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces. |
Union field memberType . Member associated with this membership. Other member types might be supported in the future. memberType can be only one of the following: | |
member | Optional. The Google Chat user or app the membership corresponds to. If your Chat app authenticates as a user , the output populates the user |
group_member | Optional. The Google Group the membership corresponds to. Reading or mutating memberships for Google Groups requires user authentication . |
MembershipRole
Represents a user's permitted actions in a Chat space. More enum values might be added in the future.
Перечисления | |
---|---|
MEMBERSHIP_ROLE_UNSPECIFIED | Значение по умолчанию. For users : they aren't a member of the space, but can be invited. For Google Groups : they're always assigned this role (other enum values might be used in the future). |
ROLE_MEMBER | A member of the space. The user has basic permissions, like sending messages to the space. In 1:1 and unnamed group conversations, everyone has this role. |
ROLE_MANAGER | A space manager. The user has all basic permissions plus administrative permissions that let them manage the space, like adding or removing members. Only supported in SpaceType.SPACE . |
MembershipState
Specifies the member's relationship with a space. Other membership states might be supported in the future.
Перечисления | |
---|---|
MEMBERSHIP_STATE_UNSPECIFIED | Значение по умолчанию. Don't use. |
JOINED | The user is added to the space, and can participate in the space. |
INVITED | The user is invited to join the space, but hasn't joined it. |
NOT_A_MEMBER | The user doesn't belong to the space and doesn't have a pending invitation to join the space. |
MembershipBatchCreatedEventData
Event payload for multiple new memberships.
Event type: google.workspace.chat.membership.v1.batchCreated
Поля | |
---|---|
memberships[] | A list of new memberships. |
MembershipBatchDeletedEventData
Event payload for multiple deleted memberships.
Event type: google.workspace.chat.membership.v1.batchDeleted
Поля | |
---|---|
memberships[] | A list of deleted memberships. |
MembershipBatchUpdatedEventData
Event payload for multiple updated memberships.
Event type: google.workspace.chat.membership.v1.batchUpdated
Поля | |
---|---|
memberships[] | A list of updated memberships. |
MembershipCreatedEventData
Event payload for a new membership.
Event type: google.workspace.chat.membership.v1.created
.
Поля | |
---|---|
membership | The new membership. |
MembershipDeletedEventData
Event payload for a deleted membership.
Event type: google.workspace.chat.membership.v1.deleted
Поля | |
---|---|
membership | The deleted membership. Only the |
MembershipUpdatedEventData
Event payload for an updated membership.
Event type: google.workspace.chat.membership.v1.updated
Поля | |
---|---|
membership | The updated membership. |
Сообщение
A message in a Google Chat space.
Поля | |
---|---|
name | Identifier. Resource name of the message. Format: Where If you set a custom ID when you create a message, you can use this ID to specify the message in a request by replacing |
sender | Output only. The user who created the message. If your Chat app authenticates as a user , the output populates the user |
create_time | Optional. Immutable. For spaces created in Chat, the time at which the message was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the message was created in the source in order to preserve the original creation time. |
last_update_time | Output only. The time at which the message was last edited by a user. If the message has never been edited, this field is empty. |
delete_time | Output only. The time at which the message was deleted in Google Chat. If the message is never deleted, this field is empty. |
text | Optional. Plain-text body of the message. The first link to an image, video, or web page generates a preview chip . You can also @mention a Google Chat user , or everyone in the space. To learn about creating text messages, see Send a message . |
formatted_text | Output only. Contains the message
For more information, see View text formatting sent in a message |
cards[] | Deprecated: Use Rich, formatted, and interactive cards that you can use to display UI elements such as: formatted texts, buttons, and clickable images. Cards are normally displayed below the plain-text body of the message. |
cards_v2[] | Optional. An array of cards . Only Chat apps can create cards. If your Chat app authenticates as a user , the messages can't contain cards. To learn how to create a message that contains cards, see Send a message . Design and preview cards with the Card Builder. Open the Card Builder |
annotations[] | Output only. Annotations associated with the |
thread | The thread the message belongs to. For example usage, see Start or reply to a message thread . |
space | Output only. If your Chat app authenticates as a user , the output only populates the space |
fallback_text | Optional. A plain-text description of the message's cards, used when the actual cards can't be displayed—for example, mobile notifications. |
action_response | Input only. Parameters that a Chat app can use to configure how its response is posted. |
argument_text | Output only. Plain-text body of the message with all Chat app mentions stripped out. |
slash_command | Output only. Slash command information, if applicable. |
attachment[] | Optional. User-uploaded attachment. |
matched_url | Output only. A URL in |
thread_reply | Output only. When If the space doesn't support reply in threads, this field is always |
client_assigned_message_id | Optional. A custom ID for the message. You can use field to identify a message, or to get, delete, or update a message. To set a custom ID, specify the |
emoji_reaction_summaries[] | Output only. The list of emoji reaction summaries on the message. |
private_message_viewer | Optional. Immutable. Input for creating a message, otherwise output only. The user that can view the message. When set, the message is private and only visible to the specified user and the Chat app. To include this field in your request, you must call the Chat API using app authentication and omit the following: For details, see Send a message privately . |
deletion_metadata | Output only. Information about a deleted message. A message is deleted when |
quoted_message_metadata | Output only. Information about a message that's quoted by a Google Chat user in a space. Google Chat users can quote a message to reply to it. |
attached_gifs[] | Output only. GIF images that are attached to the message. |
accessory_widgets[] | Optional. One or more interactive widgets that appear at the bottom of a message. You can add accessory widgets to messages that contain text, cards, or both text and cards. Not supported for messages that contain dialogs. For details, see Add interactive widgets at the bottom of a message . Creating a message with accessory widgets requires app authentication . |
MessageBatchCreatedEventData
Event payload for multiple new messages.
Event type: google.workspace.chat.message.v1.batchCreated
Поля | |
---|---|
messages[] | A list of new messages. |
MessageBatchDeletedEventData
Event payload for multiple deleted messages.
Event type: google.workspace.chat.message.v1.batchDeleted
Поля | |
---|---|
messages[] | A list of deleted messages. |
MessageBatchUpdatedEventData
Event payload for multiple updated messages.
Event type: google.workspace.chat.message.v1.batchUpdated
Поля | |
---|---|
messages[] | A list of updated messages. |
MessageCreatedEventData
Event payload for a new message.
Event type: google.workspace.chat.message.v1.created
Поля | |
---|---|
message | The new message. |
MessageDeletedEventData
Event payload for a deleted message.
Event type: google.workspace.chat.message.v1.deleted
Поля | |
---|---|
message | The deleted message. Only the |
MessageUpdatedEventData
Event payload for an updated message.
Event type: google.workspace.chat.message.v1.updated
Поля | |
---|---|
message | The updated message. |
QuotedMessageMetadata
Information about a quoted message.
Поля | |
---|---|
name | Output only. Resource name of the quoted message. Format: |
last_update_time | Output only. The timestamp when the quoted message was created or when the quoted message was last updated. |
Реакция
A reaction to a message.
Поля | |
---|---|
name | Identifier. The resource name of the reaction. Format: |
user | Output only. The user who created the reaction. |
emoji | Required. The emoji used in the reaction. |
ReactionBatchCreatedEventData
Event payload for multiple new reactions.
Event type: google.workspace.chat.reaction.v1.batchCreated
Поля | |
---|---|
reactions[] | A list of new reactions. |
ReactionBatchDeletedEventData
Event payload for multiple deleted reactions.
Event type: google.workspace.chat.reaction.v1.batchDeleted
Поля | |
---|---|
reactions[] | A list of deleted reactions. |
ReactionCreatedEventData
Event payload for a new reaction.
Event type: google.workspace.chat.reaction.v1.created
Поля | |
---|---|
reaction | The new reaction. |
ReactionDeletedEventData
Event payload for a deleted reaction.
Type: google.workspace.chat.reaction.v1.deleted
Поля | |
---|---|
reaction | The deleted reaction. |
RichLinkMetadata
A rich link to a resource.
Поля | |
---|---|
uri | The URI of this link. |
rich_link_type | The rich link type. |
Union field data . Data for the linked resource. data can be only one of the following: | |
drive_link_data | Data for a drive link. |
chat_space_link_data | Data for a chat space link. |
RichLinkType
The rich link type. More types might be added in the future.
Перечисления | |
---|---|
RICH_LINK_TYPE_UNSPECIFIED | Default value for the enum. Don't use. |
DRIVE_FILE | A Google Drive rich link type. |
CHAT_SPACE | A Chat space rich link type. For example, a space smart chip. |
SearchSpacesRequest
Request to search for a list of spaces based on a query.
Поля | |
---|---|
use_admin_access | When The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege . Requires either the This method currently only supports admin access, thus only |
page_size | The maximum number of spaces to return. The service may return fewer than this value. If unspecified, at most 100 spaces are returned. The maximum value is 1000. If you use a value more than 1000, it's automatically changed to 1000. |
page_token | A token, received from the previous search spaces call. Provide this parameter to retrieve the subsequent page. When paginating, all other parameters provided should match the call that provided the page token. Passing different values to the other parameters might lead to unexpected results. |
query | Required. A search query. You can search by using the following parameters:
Across different fields, only Among the same field, The following example queries are valid:
|
order_by | Optional. How the list of spaces is ordered. Supported attributes to order by are:
Valid ordering operation values are:
The supported syntax are:
|
SearchSpacesResponse
Response with a list of spaces corresponding to the search spaces request.
Поля | |
---|---|
spaces[] | A page of the requested spaces. |
next_page_token | A token that can be used to retrieve the next page. If this field is empty, there are no subsequent pages. |
total_size | The total number of spaces that match the query, across all pages. If the result is over 10,000 spaces, this value is an estimate. |
SetUpSpaceRequest
Request to create a space and add specified users to it.
Поля | |
---|---|
space | Required. The To create a space, set To create a group chat, set To create a 1:1 conversation between humans, set To create an 1:1 conversation between a human and the calling Chat app, set If a |
request_id | Optional. A unique identifier for this request. A random UUID is recommended. Specifying an existing request ID returns the space created with that ID instead of creating a new space. Specifying an existing request ID from the same Chat app with a different authenticated user returns an error. |
memberships[] | Optional. The Google Chat users or groups to invite to join the space. Omit the calling user, as they are added automatically. The set currently allows up to 49 memberships (in addition to the caller). For human membership, the For Google group membership, the Optional when setting Required when setting Required when setting Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting |
SlashCommand
Metadata about a slash command in Google Chat.
Поля | |
---|---|
command_id | The ID of the slash command. |
SlashCommandMetadata
Annotation metadata for slash commands (/).
Поля | |
---|---|
bot | The Chat app whose command was invoked. |
type | The type of slash command. |
command_name | The name of the invoked slash command. |
command_id | The command ID of the invoked slash command. |
triggers_dialog | Indicates whether the slash command is for a dialog. |
Тип
Перечисления | |
---|---|
TYPE_UNSPECIFIED | Default value for the enum. Don't use. |
ADD | Add Chat app to space. |
INVOKE | Invoke slash command in space. |
Космос
A space in Google Chat. Spaces are conversations between two or more users or 1:1 messages between a user and a Chat app.
Поля | |
---|---|
name | Identifier. Resource name of the space. Format: Where |
type | Output only. Deprecated: Use |
space_type | Optional. The type of space. Required when creating a space or updating the space type of a space. Output only for other usage. |
single_user_bot_dm | Optional. Whether the space is a DM between a Chat app and a single human. |
threaded | Output only. Deprecated: Use |
display_name | Optional. The space's display name. Required when creating a space with a For direct messages, this field might be empty. Supports up to 128 characters. |
external_user_allowed | Optional. Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions:
For existing spaces, this field is output only. |
space_threading_state | Output only. The threading state in the Chat space. |
space_details | Optional. Details about the space including description and rules. |
space_history_state | Optional. The message history state for messages and threads in this space. |
import_mode | Optional. Whether this space is created in Creating a space in |
create_time | Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when |
last_active_time | Output only. Timestamp of the last message in the space. |
admin_installed | Output only. For direct message (DM) spaces with a Chat app, whether the space was created by a Google Workspace administrator. Administrators can install and set up a direct message with a Chat app on behalf of users in their organization. To support admin install, your Chat app must feature direct messaging. |
membership_count | Output only. The count of joined memberships grouped by member type. Populated when the |
access_settings | Optional. Specifies the access setting of the space. Only populated when the |
space_uri | Output only. The URI for a user to access the space. |
import_mode_expire_time | Output only. The time when the space will be automatically deleted by the system if it remains in import mode. Each space created in import mode must exit this mode before this expire time using This field is only populated for spaces that were created with import mode. |
customer | Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with app authentication and In the format For DMs, this field isn't populated. |
Union field space_permission_settings . Represents the permission settings of a space. Only populated when the space_type is SPACE . space_permission_settings can be only one of the following: | |
predefined_permission_settings | Optional. Input only. Predefined space permission settings, input only when creating a space. If the field is not set, a collaboration space is created. After you create the space, settings are populated in the Setting predefined permission settings supports:
|
permission_settings | Optional. Space permission settings for existing spaces. Input for updating exact space permission settings, where existing permission settings are replaced. Output lists current permission settings. Reading and updating permission settings supports:
|
AccessSettings
Represents the access setting of the space.
Поля | |
---|---|
access_state | Output only. Indicates the access state of the space. |
audience | Optional. The resource name of the target audience who can discover the space, join the space, and preview the messages in the space. If unset, only users or Google Groups who have been individually invited or added to the space can access it. For details, see Make a space discoverable to a target audience . Format: To use the default target audience for the Google Workspace organization, set to Reading the target audience supports:
This field is not populated when using the Setting the target audience requires user authentication . |
AccessState
Represents the access state of the space.
Перечисления | |
---|---|
ACCESS_STATE_UNSPECIFIED | Access state is unknown or not supported in this API. |
PRIVATE | Only users or Google Groups that have been individually added or invited by other users or Google Workspace administrators can discover and access the space. |
DISCOVERABLE | A space manager has granted a target audience access to the space. Users or Google Groups that have been individually added or invited to the space can also discover and access the space. To learn more, see Make a space discoverable to specific users . Creating discoverable spaces requires user authentication . |
MembershipCount
Represents the count of memberships of a space, grouped into categories.
Поля | |
---|---|
joined_direct_human_user_count | Output only. Count of human users that have directly joined the space, not counting users joined by having membership in a joined group. |
joined_group_count | Output only. Count of all groups that have directly joined the space. |
PermissionSetting
Represents a space permission setting.
Поля | |
---|---|
managers_allowed | Optional. Whether spaces managers have this permission. |
members_allowed | Optional. Whether non-manager members have this permission. |
PermissionSettings
Permission settings that you can specify when updating an existing named space.
To set permission settings when creating a space, specify the PredefinedPermissionSettings
field in your request.
Поля | |
---|---|
manage_members_and_groups | Optional. Setting for managing members and groups in a space. |
modify_space_details | Optional. Setting for updating space name, avatar, description and guidelines. |
toggle_history | Optional. Setting for toggling space history on and off. |
use_at_mention_all | Optional. Setting for using @all in a space. |
manage_apps | Optional. Setting for managing apps in a space. |
manage_webhooks | Optional. Setting for managing webhooks in a space. |
post_messages | Output only. Setting for posting messages in a space. |
reply_messages | Optional. Setting for replying to messages in a space. |
PredefinedPermissionSettings
Predefined permission settings that you can only specify when creating a named space. More settings might be added in the future. For details about permission settings for named spaces, see Learn about spaces .
Перечисления | |
---|---|
PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED | Unspecified. Don't use. |
COLLABORATION_SPACE | Setting to make the space a collaboration space where all members can post messages. |
ANNOUNCEMENT_SPACE | Setting to make the space an announcement space where only space managers can post messages. |
SpaceDetails
Details about the space including description and rules.
Поля | |
---|---|
description | Optional. A description of the space. For example, describe the space's discussion topic, functional purpose, or participants. Supports up to 150 characters. |
guidelines | Optional. The space's rules, expectations, and etiquette. Supports up to 5,000 characters. |
SpaceThreadingState
Specifies the type of threading state in the Chat space.
Перечисления | |
---|---|
SPACE_THREADING_STATE_UNSPECIFIED | Сдержанный. |
THREADED_MESSAGES | Named spaces that support message threads. When users respond to a message, they can reply in-thread, which keeps their response in the context of the original message. |
GROUPED_MESSAGES | Named spaces where the conversation is organized by topic. Topics and their replies are grouped together. |
UNTHREADED_MESSAGES | Direct messages (DMs) between two people and group conversations between 3 or more people. |
SpaceType
The type of space. Required when creating or updating a space. Output only for other usage.
Перечисления | |
---|---|
SPACE_TYPE_UNSPECIFIED | Сдержанный. |
SPACE | A place where people send messages, share files, and collaborate. A SPACE can include Chat apps. |
GROUP_CHAT | Group conversations between 3 or more people. A GROUP_CHAT can include Chat apps. |
DIRECT_MESSAGE | 1:1 messages between two humans or a human and a Chat app. |
Тип
Deprecated: Use SpaceType
instead.
Перечисления | |
---|---|
TYPE_UNSPECIFIED | Сдержанный. |
ROOM | Conversations between two or more humans. |
DM | 1:1 Direct Message between a human and a Chat app, where all messages are flat. Note that this doesn't include direct messages between two humans. |
SpaceBatchUpdatedEventData
Event payload for multiple updates to a space.
Event type: google.workspace.chat.space.v1.batchUpdated
Поля | |
---|---|
spaces[] | A list of updated spaces. |
SpaceEvent
An event that represents a change or activity in a Google Chat space. To learn more, see Work with events from Google Chat .
Поля | |
---|---|
name | Resource name of the space event. Format: |
event_time | Time when the event occurred. |
event_type | Type of space event. Each event type has a batch version, which represents multiple instances of the event type that occur in a short period of time. For Supported event types for messages :
Supported event types for memberships :
Supported event types for reactions :
Supported event types about the space :
|
Union field | |
message_created_event_data | Event payload for a new message. Event type: |
message_updated_event_data | Event payload for an updated message. Event type: |
message_deleted_event_data | Event payload for a deleted message. Event type: |
message_batch_created_event_data | Event payload for multiple new messages. Event type: |
message_batch_updated_event_data | Event payload for multiple updated messages. Event type: |
message_batch_deleted_event_data | Event payload for multiple deleted messages. Event type: |
space_updated_event_data | Event payload for a space update. Event type: |
space_batch_updated_event_data | Event payload for multiple updates to a space. Event type: |
membership_created_event_data | Event payload for a new membership. Event type: |
membership_updated_event_data | Event payload for an updated membership. Event type: |
membership_deleted_event_data | Event payload for a deleted membership. Event type: |
membership_batch_created_event_data | Event payload for multiple new memberships. Event type: |
membership_batch_updated_event_data | Event payload for multiple updated memberships. Event type: |
membership_batch_deleted_event_data | Event payload for multiple deleted memberships. Event type: |
reaction_created_event_data | Event payload for a new reaction. Event type: |
reaction_deleted_event_data | Event payload for a deleted reaction. Event type: |
reaction_batch_created_event_data | Event payload for multiple new reactions. Event type: |
reaction_batch_deleted_event_data | Event payload for multiple deleted reactions. Event type: |
SpaceNotificationSetting
The notification setting of a user in a space.
Поля | |
---|---|
name | Identifier. The resource name of the space notification setting. Format: |
notification_setting | The notification setting. |
mute_setting | The space notification mute setting. |
MuteSetting
The space notification mute setting types.
Перечисления | |
---|---|
MUTE_SETTING_UNSPECIFIED | Сдержанный. |
UNMUTED | The user will receive notifications for the space based on the notification setting. |
MUTED | The user will not receive any notifications for the space, regardless of the notification setting. |
NotificationSetting
The notification setting types. Other types might be supported in the future.
Перечисления | |
---|---|
NOTIFICATION_SETTING_UNSPECIFIED | Сдержанный. |
ALL | Notifications are triggered by @mentions, followed threads, first message of new threads. All new threads are automatically followed, unless manually unfollowed by the user. |
MAIN_CONVERSATIONS | The notification is triggered by @mentions, followed threads, first message of new threads. Not available for 1:1 direct messages. |
FOR_YOU | The notification is triggered by @mentions, followed threads. Not available for 1:1 direct messages. |
OFF | Notification is off. |
SpaceReadState
A user's read state within a space, used to identify read and unread messages.
Поля | |
---|---|
name | Resource name of the space read state. Format: |
last_read_time | Optional. The time when the user's space read state was updated. Usually this corresponds with either the timestamp of the last read message, or a timestamp specified by the user to mark the last read position in a space. |
SpaceUpdatedEventData
Event payload for an updated space.
Event type: google.workspace.chat.space.v1.updated
Поля | |
---|---|
space | The updated space. |
Нить
A thread in a Google Chat space. For example usage, see Start or reply to a message thread .
If you specify a thread when creating a message, you can set the messageReplyOption
field to determine what happens if no matching thread is found.
Поля | |
---|---|
name | Identifier. Resource name of the thread. Example: |
thread_key | Optional. Input for creating or updating a thread. Otherwise, output only. ID for the thread. Supports up to 4000 characters. This ID is unique to the Chat app that sets it. For example, if multiple Chat apps create a message using the same thread key, the messages are posted in different threads. To reply in a thread created by a person or another Chat app, specify the thread |
ThreadReadState
A user's read state within a thread, used to identify read and unread messages.
Поля | |
---|---|
name | Resource name of the thread read state. Format: |
last_read_time | The time when the user's thread read state was updated. Usually this corresponds with the timestamp of the last read message in a thread. |
UpdateMembershipRequest
Request message for updating a membership.
Поля | |
---|---|
membership | Required. The membership to update. Only fields specified by |
update_mask | Required. The field paths to update. Separate multiple values with commas or use Currently supported field paths:
|
use_admin_access | Optional. When The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege . Requires the |
UpdateMessageRequest
Request to update a message.
Поля | |
---|---|
message | Required. Message with fields updated. |
update_mask | Required. The field paths to update. Separate multiple values with commas or use Currently supported field paths:
|
allow_missing | Optional. If |
UpdateSpaceNotificationSettingRequest
Request to update the space notification settings. Only supports updating notification setting for the calling user.
Поля | |
---|---|
space_notification_setting | Required. The resource name for the space notification settings must be populated in the form of |
update_mask | Required. Supported field paths:
|
UpdateSpaceReadStateRequest
Request message for UpdateSpaceReadState API.
Поля | |
---|---|
space_read_state | Required. The space read state and fields to update. Only supports updating read state for the calling user. To refer to the calling user, set one of the following:
Format: users/{user}/spaces/{space}/spaceReadState |
update_mask | Required. The field paths to update. Currently supported field paths:
When the To mark the space as read, set |
UpdateSpaceRequest
A request to update a single space.
Поля | |
---|---|
space | Required. Space with fields to be updated. |
update_mask | Required. The updated field paths, comma separated if there are multiple. You can update the following fields for a space:
|
use_admin_access | Optional. When The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege . Requires the Some |
Пользователь
A user in Google Chat. When returned as an output from a request, if your Chat app authenticates as a user , the output for a User
resource only populates the user's name
and type
.
Поля | |
---|---|
name | Resource name for a Google Chat Format: For
|
display_name | Output only. The user's display name. |
domain_id | Unique identifier of the user's Google Workspace domain. |
type | User type. |
is_anonymous | Output only. When |
Тип
Перечисления | |
---|---|
TYPE_UNSPECIFIED | Default value for the enum. DO NOT USE. |
HUMAN | Human user. |
BOT | Chat app user. |
UserMentionMetadata
Annotation metadata for user mentions (@).
Поля | |
---|---|
user | The user mentioned. |
type | The type of user mention. |
Тип
Перечисления | |
---|---|
TYPE_UNSPECIFIED | Default value for the enum. Don't use. |
ADD | Add user to space. |
MENTION | Mention user in space. |
WidgetMarkup
A widget is a UI element that presents text and images.
Поля | |
---|---|
buttons[] | A list of buttons. Buttons is also |
Union field data . A WidgetMarkup can only have one of the following items. You can use multiple WidgetMarkup fields to display more items. data can be only one of the following: | |
text_paragraph | Display a text paragraph in this widget. |
image | Display an image in this widget. |
key_value | Display a key value item in this widget. |
Кнопка
A button. Can be a text button or an image button.
Поля | |
---|---|
Union field | |
text_button | A button with text and |
image_button | A button with image and |
FormAction
A form action describes the behavior when the form is submitted. For example, you can invoke Apps Script to handle the form.
Поля | |
---|---|
action_method_name | The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the Chat app as part of the card click event. You can use the same method name for several elements that trigger a common behavior. |
parameters[] | List of action parameters. |
ActionParameter
List of string parameters to supply when the action method is invoked. For example, consider three snooze buttons: snooze now, snooze one day, snooze next week. You might use action method = snooze()
, passing the snooze type and snooze time in the list of string parameters.
Поля | |
---|---|
key | The name of the parameter for the action script. |
value | The value of the parameter. |
Икона
The set of supported icons.
Перечисления | |
---|---|
ICON_UNSPECIFIED | |
AIRPLANE | |
BOOKMARK | |
BUS | |
CAR | |
CLOCK | |
CONFIRMATION_NUMBER_ICON | |
DOLLAR | |
DESCRIPTION | |
EMAIL | |
EVENT_PERFORMER | |
EVENT_SEAT | |
FLIGHT_ARRIVAL | |
FLIGHT_DEPARTURE | |
HOTEL | |
HOTEL_ROOM_TYPE | |
INVITE | |
MAP_PIN | |
MEMBERSHIP | |
MULTIPLE_PEOPLE | |
OFFER | |
PERSON | |
PHONE | |
RESTAURANT_ICON | |
SHOPPING_CART | |
STAR | |
STORE | |
TICKET | |
TRAIN | |
VIDEO_CAMERA | |
VIDEO_PLAY |
Изображение
An image that's specified by a URL and can have an onclick
action.
Поля | |
---|---|
image_url | The URL of the image. |
on_click | The |
aspect_ratio | The aspect ratio of this image (width and height). This field lets you reserve the right height for the image while waiting for it to load. It's not meant to override the built-in aspect ratio of the image. If unset, the server fills it by prefetching the image. |
ImageButton
An image button with an onclick
action.
Поля | |
---|---|
on_click | The |
name | The name of this |
Union field icons . The icon can be specified by an Icon enum or a URL. icons can be only one of the following: | |
icon | The icon specified by an |
icon_url | The icon specified by a URL. |
KeyValue
A UI element contains a key (label) and a value (content). This element can also contain some actions such as onclick
button.
Поля | |
---|---|
top_label | The text of the top label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons . |
content | The text of the content. Formatted text supported and always required. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons . |
content_multiline | If the content should be multiline. |
bottom_label | The text of the bottom label. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons . |
on_click | The |
Union field icons . At least one of icons, top_label and bottom_label must be defined. icons can be only one of the following: | |
icon | An enum value that's replaced by the Chat API with the corresponding icon image. |
icon_url | The icon specified by a URL. |
Union field control . A control widget. You can set either button or switch_widget , but not both. control can be only one of the following: | |
button | A button that can be clicked to trigger an action. |
OnClick
An onclick
action (for example, open a link).
Поля | |
---|---|
Union field | |
action | A form action is triggered by this |
open_link | This |
ОткрытьСсылку
A link that opens a new window.
Поля | |
---|---|
url | The URL to open. |
TextButton
A button with text and onclick
action.
Поля | |
---|---|
text | The text of the button. |
on_click | The |
TextParagraph
A paragraph of text. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons .
Поля | |
---|---|
text | |