Package google.chat.v1

Индекс

Чат-сервис

Позволяет разработчикам создавать приложения для чата и интеграции на платформе Google Chat.

CompleteImportSpace

rpc CompleteImportSpace( CompleteImportSpaceRequest ) returns ( CompleteImportSpaceResponse )

Завершает процесс импорта указанного пространства и делает его видимым для пользователей.

Требуется аутентификация пользователя и делегирование полномочий в масштабе домена с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.import

Для получения дополнительной информации см. раздел «Разрешить приложениям Google Chat импортировать данные» .

Области полномочий

Требуется следующая область действия OAuth:

  • https://www.googleapis.com/auth/chat.import

Для получения более подробной информации см. руководство по авторизации .

Создать пользовательские эмодзи

rpc CreateCustomEmoji( CreateCustomEmojiRequest ) returns ( CustomEmoji )

Создаёт пользовательский эмодзи.

Пользовательские эмодзи доступны только для учетных записей Google Workspace, и администратор должен включить их использование для всей организации. Для получения дополнительной информации см. разделы « Узнайте больше о пользовательских эмодзи в Google Chat» и «Управление разрешениями на использование пользовательских эмодзи» .

Требуется аутентификация пользователя с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.customemojis
Области полномочий

Требуется следующая область действия OAuth:

  • https://www.googleapis.com/auth/chat.customemojis

Для получения более подробной информации см. руководство по авторизации .

Создать членство

rpc CreateMembership( CreateMembershipRequest ) returns ( Membership )

Создает членство для вызывающего чат-приложения, пользователя или группы Google. Создание членств для других чат-приложений не поддерживается. При создании членства, если у указанного участника отключена политика автоматического принятия приглашений, он получает приглашение и должен принять приглашение в пространство, прежде чем присоединиться. В противном случае, создание членства добавляет участника непосредственно в указанное пространство.

Поддерживаются следующие типы аутентификации :

  • Аутентификация приложения с подтверждением администратора и указанием области авторизации:

    • https://www.googleapis.com/auth/chat.app.memberships
  • Аутентификация пользователя с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.memberships
    • https://www.googleapis.com/auth/chat.memberships.app (для добавления приложения для звонков в пространство)
    • https://www.googleapis.com/auth/chat.import (только для пробелов в режиме импорта)
    • Аутентификация пользователя предоставляет права администратора, когда учетная запись администратора проходит аутентификацию, use_admin_access имеет true , и используется следующая область авторизации:
      • https://www.googleapis.com/auth/chat.admin.memberships

Аутентификация приложений не поддерживается в следующих случаях:

  • Приглашение пользователей, не входящих в организацию Workspace, которой принадлежит данное пространство.
  • Добавление группы Google в пространство.
  • Добавление приложения для чата в пространство.

Примеры использования см. в:

Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.app.memberships
  • https://www.googleapis.com/auth/chat.admin.memberships
  • https://www.googleapis.com/auth/chat.import
  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.app

Для получения более подробной информации см. руководство по авторизации .

Создать сообщение

rpc CreateMessage( CreateMessageRequest ) returns ( Message )

Создает сообщение в чате Google. Пример см. в разделе «Отправка сообщения» .

Поддерживаются следующие типы аутентификации :

  • Аутентификация приложения с указанием области авторизации:
    • https://www.googleapis.com/auth/chat.bot
  • Аутентификация пользователя с использованием одной из следующих областей авторизации:
    • https://www.googleapis.com/auth/chat.messages.create
    • https://www.googleapis.com/auth/chat.messages
    • https://www.googleapis.com/auth/chat.import (только для пробелов в режиме импорта)

В зависимости от типа аутентификации, используемого в запросе, чат по-разному определяет отправителя сообщения.

На следующем изображении показано, как Chat присваивает сообщениям атрибуты при использовании аутентификации приложения. Chat отображает приложение Chat в качестве отправителя сообщения. Содержимое сообщения может включать текст ( text ), карточки ( cardsV2 ) и дополнительные виджеты ( accessoryWidgets ).

Сообщение отправлено с аутентификацией приложения.

На следующем изображении показано, как Chat присваивает сообщениям атрибуты при использовании аутентификации пользователя. Chat отображает пользователя как отправителя сообщения и присваивает сообщению имя приложения Chat. Содержимое сообщения может содержать только текст ( text ).

Сообщение отправлено с аутентификацией пользователя.

Максимальный размер сообщения, включая его содержимое, составляет 32 000 байт.

В случае запросов через веб-перехватчик ответ не содержит полного сообщения. В ответ, помимо информации, содержащейся в запросе, заполняются только поля name и thread.name

Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.bot
  • https://www.googleapis.com/auth/chat.import
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.create

Для получения более подробной информации см. руководство по авторизации .

Создать реакцию

rpc CreateReaction( CreateReactionRequest ) returns ( Reaction )

Создает реакцию и добавляет ее к сообщению. Пример см. в разделе «Добавление реакции к сообщению» .

Требуется аутентификация пользователя с использованием одной из следующих областей авторизации :

  • https://www.googleapis.com/auth/chat.messages.reactions.create
  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.import (только для пробелов в режиме импорта)
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.import
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages.reactions.create

Для получения более подробной информации см. руководство по авторизации .

СоздатьСекцию

rpc CreateSection( CreateSectionRequest ) returns ( Section )

Создает раздел в Google Chat. Разделы помогают пользователям группировать беседы и настраивать список разделов, отображаемых на панели навигации чата. Можно создавать только разделы типа CUSTOM_SECTION . Подробнее см. раздел «Создание и организация разделов в Google Chat» .

Требуется аутентификация пользователя с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.users.sections
Области полномочий

Требуется следующая область действия OAuth:

  • https://www.googleapis.com/auth/chat.users.sections

Для получения более подробной информации см. руководство по авторизации .

CreateSpace

rpc CreateSpace( CreateSpaceRequest ) returns ( Space )

Создает пространство. Может использоваться для создания именованного пространства или группового чата в Import mode . Пример см. в разделе «Создание пространства» .

Поддерживаются следующие типы аутентификации :

При аутентификации в качестве приложения поле space.customer должно быть указано в запросе.

При аутентификации в качестве приложения приложение «Чат» добавляется в качестве участника пространства. Однако, в отличие от аутентификации человека, приложение «Чат» не добавляется в качестве менеджера пространства. По умолчанию приложение «Чат» может быть удалено из пространства всеми участниками пространства. Чтобы разрешить удаление приложения из пространства только менеджерам пространства, установите space.permission_settings.manage_apps в значение managers_allowed .

Состав участников пространства при его создании зависит от того, создано ли пространство в Import mode :

  • Режим импорта: Участники не создаются.
  • Во всех остальных режимах: вызывающий пользователь добавляется в качестве участника. Это:
    • Само приложение при использовании аутентификации приложения.
    • Пользователь-человек при использовании аутентификации пользователя.

Если при создании пространства вы получаете сообщение об ошибке ALREADY_EXISTS , попробуйте использовать другое displayName . Возможно, это отображаемое имя уже используется в существующем пространстве в организации Google Workspace.

Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.app.spaces.create
  • https://www.googleapis.com/auth/chat.app.spaces
  • https://www.googleapis.com/auth/chat.import
  • https://www.googleapis.com/auth/chat.spaces
  • https://www.googleapis.com/auth/chat.spaces.create

Для получения более подробной информации см. руководство по авторизации .

DeleteCustomEmoji

rpc DeleteCustomEmoji( DeleteCustomEmojiRequest ) returns ( Empty )

Удаляет созданный пользователем эмодзи. По умолчанию пользователи могут удалять только созданные ими самими эмодзи. Менеджеры эмодзи , назначенные администратором, могут удалять любые созданные ими эмодзи в организации. См. раздел «Подробнее о созданных пользователем эмодзи в Google Chat» .

Пользовательские эмодзи доступны только для учетных записей Google Workspace, и администратор должен включить их использование для всей организации. Для получения дополнительной информации см. разделы « Узнайте больше о пользовательских эмодзи в Google Chat» и «Управление разрешениями на использование пользовательских эмодзи» .

Требуется аутентификация пользователя с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.customemojis
Области полномочий

Требуется следующая область действия OAuth:

  • https://www.googleapis.com/auth/chat.customemojis

Для получения более подробной информации см. руководство по авторизации .

Удалить членство

rpc DeleteMembership( DeleteMembershipRequest ) returns ( Membership )

Удаляет членство. Пример см. в разделе «Удаление пользователя или приложения Google Chat из пространства» .

Поддерживаются следующие типы аутентификации :

  • Аутентификация приложения с подтверждением администратора и указанием области авторизации:

    • https://www.googleapis.com/auth/chat.app.memberships
  • Аутентификация пользователя с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.memberships
    • https://www.googleapis.com/auth/chat.memberships.app (чтобы удалить приложение для звонков из этого пространства)
    • https://www.googleapis.com/auth/chat.import (только для пробелов в режиме импорта)
    • Аутентификация пользователя предоставляет права администратора, когда учетная запись администратора проходит аутентификацию, use_admin_access имеет true , и используется следующая область авторизации:
      • https://www.googleapis.com/auth/chat.admin.memberships

Аутентификация приложений не поддерживается в следующих случаях:

  • Удаление группы Google из пространства.
  • Удаление приложения чата из рабочего пространства.

Для удаления членства для администраторов пространства запрашивающий должен быть администратором пространства. Если вы используете аутентификацию через приложение, то приложение «Чат» должно быть создано пользователем пространства.

Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.app.memberships
  • https://www.googleapis.com/auth/chat.admin.memberships
  • https://www.googleapis.com/auth/chat.import
  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.app

Для получения более подробной информации см. руководство по авторизации .

Удалить сообщение

rpc DeleteMessage( DeleteMessageRequest ) returns ( Empty )

Удаляет сообщение. Пример см. в разделе «Удаление сообщения» .

Поддерживаются следующие типы аутентификации :

При использовании аутентификации приложения запросы могут удалять только сообщения, созданные вызывающим приложением чата.

Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.bot
  • https://www.googleapis.com/auth/chat.import
  • https://www.googleapis.com/auth/chat.messages

Для получения более подробной информации см. руководство по авторизации .

DeleteReaction

rpc DeleteReaction( DeleteReactionRequest ) returns ( Empty )

Удаляет реакцию на сообщение. Пример см. в разделе «Удаление реакции» .

Требуется аутентификация пользователя с использованием одной из следующих областей авторизации :

  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.import (только для пробелов в режиме импорта)
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.import
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.reactions

Для получения более подробной информации см. руководство по авторизации .

Удалить раздел

rpc DeleteSection( DeleteSectionRequest ) returns ( Empty )

Удаляет раздел типа CUSTOM_SECTION .

Если раздел содержит такие элементы, как пробелы, эти элементы перемещаются в разделы по умолчанию Google Chat и не удаляются.

Подробнее см. раздел «Создание и организация разделов в Google Chat» .

Требуется аутентификация пользователя с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.users.sections
Области полномочий

Требуется следующая область действия OAuth:

  • https://www.googleapis.com/auth/chat.users.sections

Для получения более подробной информации см. руководство по авторизации .

DeleteSpace

rpc DeleteSpace( DeleteSpaceRequest ) returns ( Empty )

Удаляет именованное пространство. Всегда выполняет каскадное удаление, что означает, что дочерние ресурсы пространства — такие как сообщения, опубликованные в пространстве, и членство в пространстве — также удаляются. Пример см. в разделе «Удаление пространства» .

Поддерживаются следующие типы аутентификации :

  • Аутентификация приложения с подтверждением администратора и указанием области авторизации:

    • https://www.googleapis.com/auth/chat.app.delete (только в тех местах, которые создало приложение)
  • Аутентификация пользователя с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.delete
    • https://www.googleapis.com/auth/chat.import (только для пробелов в режиме импорта)
    • Аутентификация пользователя предоставляет права администратора, когда учетная запись администратора проходит аутентификацию, use_admin_access имеет true , и используется следующая область авторизации:
      • https://www.googleapis.com/auth/chat.admin.delete
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.app.delete
  • https://www.googleapis.com/auth/chat.admin.delete
  • https://www.googleapis.com/auth/chat.import
  • https://www.googleapis.com/auth/chat.delete

Для получения более подробной информации см. руководство по авторизации .

FindDirectMessage

rpc FindDirectMessage( FindDirectMessageRequest ) returns ( Space )

Возвращает существующее личное сообщение с указанным пользователем. Если место для личных сообщений не найдено, возвращает ошибку 404 NOT_FOUND . Пример см. в разделе «Поиск личного сообщения» .

При использовании аутентификации приложения возвращается пространство для прямых сообщений между указанным пользователем и вызывающим приложением чата.

При аутентификации пользователя возвращается пространство прямых сообщений между указанным пользователем и аутентифицированным пользователем.

Поддерживаются следующие типы аутентификации :

Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.spaces
  • https://www.googleapis.com/auth/chat.spaces.readonly
  • https://www.googleapis.com/auth/chat.bot

Для получения более подробной информации см. руководство по авторизации .

FindGroupChats

rpc FindGroupChats( FindGroupChatsRequest ) returns ( FindGroupChatsResponse )

Возвращает все пространства с spaceType == GROUP_CHAT , в которых в списке участников точно указан вызывающий пользователь и пользователи, указанные в FindGroupChatsRequest.users . Поддерживаются только участники, присоединившиеся к беседе. Пример см. в разделе «Поиск групповых чатов» .

Если вызывающий пользователь блокирует или сам блокируется некоторыми пользователями, и не найдено ни одного пространства, содержащего весь указанный набор пользователей, этот метод возвращает пространства, которые не включают заблокированных или блокирующих пользователей.

Указанный набор пользователей должен содержать только данные о пользователях-людях (не приложениях). Запрос, содержащий данные о пользователях-нелюдях, не возвращает никаких пробелов.

Требуется аутентификация пользователя с использованием одной из следующих областей авторизации :

  • https://www.googleapis.com/auth/chat.memberships.readonly
  • https://www.googleapis.com/auth/chat.memberships
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.readonly

Для получения более подробной информации см. руководство по авторизации .

Получить вложение

rpc GetAttachment( GetAttachmentRequest ) returns ( Attachment )

Получает метаданные вложения сообщения. Данные вложения извлекаются с помощью API мультимедиа . Пример см. в разделе «Получение метаданных о вложении сообщения» .

Требуется аутентификация приложения с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.bot
Области полномочий

Требуется следующая область действия OAuth:

  • https://www.googleapis.com/auth/chat.bot

Для получения более подробной информации см. руководство по авторизации .

GetCustomEmoji

rpc GetCustomEmoji( GetCustomEmojiRequest ) returns ( CustomEmoji )

Возвращает подробную информацию о пользовательском эмодзи.

Пользовательские эмодзи доступны только для учетных записей Google Workspace, и администратор должен включить их использование для всей организации. Для получения дополнительной информации см. разделы « Узнайте больше о пользовательских эмодзи в Google Chat» и «Управление разрешениями на использование пользовательских эмодзи» .

Требуется аутентификация пользователя с использованием одной из следующих областей авторизации :

  • https://www.googleapis.com/auth/chat.customemojis.readonly
  • https://www.googleapis.com/auth/chat.customemojis
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.customemojis
  • https://www.googleapis.com/auth/chat.customemojis.readonly

Для получения более подробной информации см. руководство по авторизации .

GetMembership

rpc GetMembership( GetMembershipRequest ) returns ( Membership )

Возвращает подробную информацию о членстве. Пример см. в разделе «Получение подробной информации о членстве пользователя или приложения Google Chat» .

Поддерживаются следующие типы аутентификации :

  • Аутентификация приложения с использованием одной из следующих областей авторизации:

  • Аутентификация пользователя с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.memberships.readonly
    • https://www.googleapis.com/auth/chat.memberships
    • Аутентификация пользователя предоставляет права администратора, когда учетная запись администратора проходит аутентификацию, use_admin_access имеет true и используется одна из следующих областей авторизации:
      • https://www.googleapis.com/auth/chat.admin.memberships.readonly
      • https://www.googleapis.com/auth/chat.admin.memberships
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.admin.memberships
  • https://www.googleapis.com/auth/chat.admin.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.memberships
  • https://www.googleapis.com/auth/chat.bot
  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.readonly

Для получения более подробной информации см. руководство по авторизации .

GetMessage

rpc GetMessage( GetMessageRequest ) returns ( Message )

Возвращает подробную информацию о сообщении. Пример см. в разделе «Получение подробной информации о сообщении» .

Поддерживаются следующие типы аутентификации :

  • Аутентификация приложения с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.bot : При использовании этой области авторизации данный метод возвращает подробную информацию о сообщении, к которому имеет доступ приложение чата, например, прямые сообщения и команды с косой чертой, которые вызывают приложение чата.
    • https://www.googleapis.com/auth/chat.app.messages.readonly с одобрения администратора . При использовании этой области аутентификации данный метод возвращает подробную информацию о публичном сообщении в пространстве.
  • Аутентификация пользователя с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.messages.readonly
    • https://www.googleapis.com/auth/chat.messages

Примечание: Возможно, ответ будет получен от заблокированного пользователя или сообщества.

Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.bot
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.app.messages.readonly

Для получения более подробной информации см. руководство по авторизации .

GetSpace

rpc GetSpace( GetSpaceRequest ) returns ( Space )

Возвращает подробную информацию о пространстве. Пример см. в разделе «Получение подробной информации о пространстве» .

Поддерживаются следующие типы аутентификации :

  • Аутентификация приложения с использованием одной из следующих областей авторизации:

  • Аутентификация пользователя с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.spaces.readonly
    • https://www.googleapis.com/auth/chat.spaces
    • Аутентификация пользователя предоставляет права администратора, когда учетная запись администратора проходит аутентификацию, use_admin_access имеет true и используется одна из следующих областей авторизации:
      • https://www.googleapis.com/auth/chat.admin.spaces.readonly
      • https://www.googleapis.com/auth/chat.admin.spaces

Аутентификация приложений имеет следующие ограничения:

  • Параметр space.access_settings заполняется только при использовании области видимости chat.app.spaces .
  • space.predefind_permission_settings и space.permission_settings заполняются только при использовании области действия chat.app.spaces и только для пространств, созданных приложением.
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.admin.spaces
  • https://www.googleapis.com/auth/chat.admin.spaces.readonly
  • https://www.googleapis.com/auth/chat.spaces
  • https://www.googleapis.com/auth/chat.spaces.readonly
  • https://www.googleapis.com/auth/chat.bot
  • https://www.googleapis.com/auth/chat.app.spaces

Для получения более подробной информации см. руководство по авторизации .

GetSpaceEvent

rpc GetSpaceEvent( GetSpaceEventRequest ) returns ( SpaceEvent )

Возвращает событие из пространства Google Чата. Полезная нагрузка события содержит самую последнюю версию ресурса, которая изменилась. Например, если вы запрашиваете событие о новом сообщении, но сообщение позже было обновлено, сервер возвращает обновленный ресурс Message в полезной нагрузке события.

Примечание: Поле permissionSettings не возвращается в объекте Space данных события Space для этого запроса.

Поддерживаются следующие типы аутентификации с областью авторизации , соответствующей чтению запрашиваемых данных:

  • Аутентификация приложения с подтверждением администратора с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.app.spaces
    • https://www.googleapis.com/auth/chat.app.spaces.readonly
    • https://www.googleapis.com/auth/chat.app.messages.readonly
    • https://www.googleapis.com/auth/chat.app.memberships
    • https://www.googleapis.com/auth/chat.app.memberships.readonly
  • Аутентификация пользователя с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.spaces.readonly
    • https://www.googleapis.com/auth/chat.spaces
    • https://www.googleapis.com/auth/chat.messages.readonly
    • https://www.googleapis.com/auth/chat.messages
    • https://www.googleapis.com/auth/chat.messages.reactions.readonly
    • https://www.googleapis.com/auth/chat.messages.reactions
    • https://www.googleapis.com/auth/chat.memberships.readonly
    • https://www.googleapis.com/auth/chat.memberships

Для подключения к мероприятию авторизованный абонент должен быть членом данного пространства.

В качестве примера см. раздел «Получение подробной информации о событии из пространства Google Chat» .

Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.app.memberships
  • https://www.googleapis.com/auth/chat.app.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.messages.readonly
  • https://www.googleapis.com/auth/chat.app.spaces
  • https://www.googleapis.com/auth/chat.app.spaces.readonly
  • https://www.googleapis.com/auth/chat.spaces
  • https://www.googleapis.com/auth/chat.spaces.readonly
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.readonly
  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages.reactions.readonly

Для получения более подробной информации см. руководство по авторизации .

GetSpaceNotificationSetting

rpc GetSpaceNotificationSetting( GetSpaceNotificationSettingRequest ) returns ( SpaceNotificationSetting )

Получает настройки уведомлений о наличии свободного места. Пример см. в разделе «Получение настроек уведомлений о наличии свободного места для вызывающего абонента» .

Требуется аутентификация пользователя с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.users.spacesettings
Области полномочий

Требуется следующая область действия OAuth:

  • https://www.googleapis.com/auth/chat.users.spacesettings

Для получения более подробной информации см. руководство по авторизации .

GetSpaceReadState

rpc GetSpaceReadState( GetSpaceReadStateRequest ) returns ( SpaceReadState )

Возвращает подробную информацию о состоянии чтения пользователя в пространстве, используемую для идентификации прочитанных и непрочитанных сообщений. Пример см. в разделе «Получение подробной информации о состоянии чтения пользователя в пространстве» .

Требуется аутентификация пользователя с использованием одной из следующих областей авторизации :

  • https://www.googleapis.com/auth/chat.users.readstate.readonly
  • https://www.googleapis.com/auth/chat.users.readstate
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.users.readstate
  • https://www.googleapis.com/auth/chat.users.readstate.readonly

Для получения более подробной информации см. руководство по авторизации .

GetThreadReadState

rpc GetThreadReadState( GetThreadReadStateRequest ) returns ( ThreadReadState )

Возвращает подробную информацию о состоянии чтения пользователя в потоке, используемую для идентификации прочитанных и непрочитанных сообщений. Пример см. в разделе «Получение подробной информации о состоянии чтения пользователя в потоке» .

Требуется аутентификация пользователя с использованием одной из следующих областей авторизации :

  • https://www.googleapis.com/auth/chat.users.readstate.readonly
  • https://www.googleapis.com/auth/chat.users.readstate
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.users.readstate
  • https://www.googleapis.com/auth/chat.users.readstate.readonly

Для получения более подробной информации см. руководство по авторизации .

ListCustomEmojis

rpc ListCustomEmojis( ListCustomEmojisRequest ) returns ( ListCustomEmojisResponse )

Отображает список пользовательских эмодзи, видимых авторизованному пользователю.

Пользовательские эмодзи доступны только для учетных записей Google Workspace, и администратор должен включить их использование для всей организации. Для получения дополнительной информации см. разделы « Узнайте больше о пользовательских эмодзи в Google Chat» и «Управление разрешениями на использование пользовательских эмодзи» .

Требуется аутентификация пользователя с использованием одной из следующих областей авторизации :

  • https://www.googleapis.com/auth/chat.customemojis.readonly
  • https://www.googleapis.com/auth/chat.customemojis
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.customemojis
  • https://www.googleapis.com/auth/chat.customemojis.readonly

Для получения более подробной информации см. руководство по авторизации .

ListMemberships

rpc ListMemberships( ListMembershipsRequest ) returns ( ListMembershipsResponse )

Отображает список участников в пространстве. Например, см. раздел «Список пользователей и приложений Google Chat в пространстве» . Отображение списка участников с аутентификацией приложения отображает участников в пространствах, к которым имеет доступ приложение Chat, но исключает участников самого приложения Chat, включая его собственное. Отображение списка участников с аутентификацией пользователя отображает участников в пространствах, к которым имеет доступ авторизованный пользователь.

Поддерживаются следующие типы аутентификации :

  • Аутентификация приложения с использованием одной из следующих областей авторизации:

  • Аутентификация пользователя с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.memberships.readonly
    • https://www.googleapis.com/auth/chat.memberships
    • https://www.googleapis.com/auth/chat.import (только для пробелов в режиме импорта)
    • Аутентификация пользователя предоставляет права администратора, когда учетная запись администратора проходит аутентификацию, use_admin_access имеет true и используется одна из следующих областей авторизации:
      • https://www.googleapis.com/auth/chat.admin.memberships.readonly
      • https://www.googleapis.com/auth/chat.admin.memberships
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.admin.memberships
  • https://www.googleapis.com/auth/chat.admin.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.memberships
  • https://www.googleapis.com/auth/chat.bot
  • https://www.googleapis.com/auth/chat.import
  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.readonly

Для получения более подробной информации см. руководство по авторизации .

ListMessages

rpc ListMessages( ListMessagesRequest ) returns ( ListMessagesResponse )

Выводит список сообщений в пространстве, членом которого является вызывающий абонент, включая сообщения от заблокированных участников и пространств. Системные сообщения, например, сообщения о новых участниках пространства, не включаются. Если вы выводите список сообщений из пространства, в котором нет сообщений, ответ будет пустым объектом. При использовании интерфейса REST/HTTP ответ содержит пустой JSON-объект {} . Пример см. в разделе «Вывод списка сообщений» .

Поддерживаются следующие типы аутентификации :

  • Аутентификация приложения с подтверждением администратора и указанием области авторизации:

    • https://www.googleapis.com/auth/chat.app.messages.readonly . При использовании этой области аутентификации данный метод возвращает только общедоступные сообщения в пространстве. Он не включает личные сообщения.
  • Аутентификация пользователя с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.messages.readonly
    • https://www.googleapis.com/auth/chat.messages
    • https://www.googleapis.com/auth/chat.import (только для пробелов в режиме импорта)
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.import
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.app.messages.readonly

Для получения более подробной информации см. руководство по авторизации .

ListReactions

rpc ListReactions( ListReactionsRequest ) returns ( ListReactionsResponse )

Выводит список реакций на сообщение. Пример см. в разделе «Список реакций на сообщение» .

Требуется аутентификация пользователя с использованием одной из следующих областей авторизации :

  • https://www.googleapis.com/auth/chat.messages.reactions.readonly
  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.messages
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages.reactions.readonly

Для получения более подробной информации см. руководство по авторизации .

ListSectionItems

rpc ListSectionItems( ListSectionItemsRequest ) returns ( ListSectionItemsResponse )

Отображает список товаров в разделе.

В качестве элементов раздела могут выступать только пробелы. Подробнее см. раздел «Создание и организация разделов в Google Chat» .

Требуется аутентификация пользователя с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.users.sections
  • https://www.googleapis.com/auth/chat.users.sections.readonly
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.users.sections
  • https://www.googleapis.com/auth/chat.users.sections.readonly

Для получения более подробной информации см. руководство по авторизации .

ListSections

rpc ListSections( ListSectionsRequest ) returns ( ListSectionsResponse )

Отображает разделы, доступные пользователю чата. Разделы помогают пользователям группировать свои беседы и настраивать список разделов, отображаемых на панели навигации чата. Подробнее см. раздел «Создание и организация разделов в Google Chat» .

Требуется аутентификация пользователя с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.users.sections
  • https://www.googleapis.com/auth/chat.users.sections.readonly
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.users.sections
  • https://www.googleapis.com/auth/chat.users.sections.readonly

Для получения более подробной информации см. руководство по авторизации .

ListSpaceEvents

rpc ListSpaceEvents( ListSpaceEventsRequest ) returns ( ListSpaceEventsResponse )

Отображает список событий из пространства Google Chat. Для каждого события полезная нагрузка содержит самую последнюю версию ресурса Chat. Например, если вы перечисляете события о новых участниках пространства, сервер возвращает ресурсы Membership , содержащие последние сведения об участниках. Если новые участники были удалены в течение запрошенного периода, полезная нагрузка события содержит пустой ресурс Membership .

Поддерживаются следующие типы аутентификации с областью авторизации , соответствующей чтению запрашиваемых данных:

  • Аутентификация приложения с подтверждением администратора с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.app.spaces
    • https://www.googleapis.com/auth/chat.app.spaces.readonly
    • https://www.googleapis.com/auth/chat.app.messages.readonly
    • https://www.googleapis.com/auth/chat.app.memberships
    • https://www.googleapis.com/auth/chat.app.memberships.readonly
  • Аутентификация пользователя с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.spaces.readonly
    • https://www.googleapis.com/auth/chat.spaces
    • https://www.googleapis.com/auth/chat.messages.readonly
    • https://www.googleapis.com/auth/chat.messages
    • https://www.googleapis.com/auth/chat.messages.reactions.readonly
    • https://www.googleapis.com/auth/chat.messages.reactions
    • https://www.googleapis.com/auth/chat.memberships.readonly
    • https://www.googleapis.com/auth/chat.memberships

Для отображения списка событий авторизованный звонящий должен быть участником данного пространства.

В качестве примера см. раздел «Список событий из пространства Google Chat» .

Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.app.memberships
  • https://www.googleapis.com/auth/chat.app.memberships.readonly
  • https://www.googleapis.com/auth/chat.app.messages.readonly
  • https://www.googleapis.com/auth/chat.app.spaces
  • https://www.googleapis.com/auth/chat.app.spaces.readonly
  • https://www.googleapis.com/auth/chat.spaces
  • https://www.googleapis.com/auth/chat.spaces.readonly
  • https://www.googleapis.com/auth/chat.messages
  • https://www.googleapis.com/auth/chat.messages.readonly
  • https://www.googleapis.com/auth/chat.memberships
  • https://www.googleapis.com/auth/chat.memberships.readonly
  • https://www.googleapis.com/auth/chat.messages.reactions
  • https://www.googleapis.com/auth/chat.messages.reactions.readonly

Для получения более подробной информации см. руководство по авторизации .

ListSpaces

rpc ListSpaces( ListSpacesRequest ) returns ( ListSpacesResponse )

Отображает список сообществ, в которых состоит звонящий. Групповые чаты и личные сообщения отображаются только после отправки первого сообщения. Пример см. в разделе «Список сообществ» .

Поддерживаются следующие типы аутентификации :

Чтобы получить список всех именованных пространств по организации Google Workspace, используйте метод spaces.search() с правами администратора Workspace.

Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.spaces
  • https://www.googleapis.com/auth/chat.spaces.readonly
  • https://www.googleapis.com/auth/chat.bot

Для получения более подробной информации см. руководство по авторизации .

Переместить элемент секции

rpc MoveSectionItem( MoveSectionItemRequest ) returns ( MoveSectionItemResponse )

Перемещает элемент из одного раздела в другой. Например, если раздел содержит пробелы, этот метод можно использовать для перемещения пробела в другой раздел. Подробнее см. раздел «Создание и организация разделов в Google Chat» .

Требуется аутентификация пользователя с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.users.sections
Области полномочий

Требуется следующая область действия OAuth:

  • https://www.googleapis.com/auth/chat.users.sections

Для получения более подробной информации см. руководство по авторизации .

Раздел позиции

rpc PositionSection( PositionSectionRequest ) returns ( PositionSectionResponse )

Изменяет порядок сортировки раздела. Подробнее см. раздел «Создание и организация разделов в Google Chat» .

Требуется аутентификация пользователя с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.users.sections
Области полномочий

Требуется следующая область действия OAuth:

  • https://www.googleapis.com/auth/chat.users.sections

Для получения более подробной информации см. руководство по авторизации .

ReplaceMessageCards

rpc ReplaceMessageCards( ReplaceMessageCardsRequest ) returns ( ReplaceMessageCardsResponse )

Заменяет карточки, включенные в сообщение.

Приложение для чата может заменить карточки в сообщении, созданном человеком, только в том случае, если сообщение уже содержит карточки, и эти карточки были созданы приложением.

Если приложение заменяет карточки пустым списком, карточки удаляются. После удаления карточек приложение не может добавить их обратно в сообщение.

Требуется аутентификация приложения с использованием следующего разрешения : - https://www.googleapis.com/auth/chat.bot

Области полномочий

Требуется следующая область действия OAuth:

  • https://www.googleapis.com/auth/chat.bot

Для получения более подробной информации см. руководство по авторизации .

SearchSpaces

rpc SearchSpaces( SearchSpacesRequest ) returns ( SearchSpacesResponse )

Возвращает список пространств в организации Google Workspace на основе поиска администратора. В запросе установите use_admin_access в true . Пример см. в разделе «Поиск и управление пространствами» .

Требуется аутентификация пользователя с правами администратора и одной из следующих областей авторизации :

  • https://www.googleapis.com/auth/chat.admin.spaces.readonly
  • https://www.googleapis.com/auth/chat.admin.spaces
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.admin.spaces
  • https://www.googleapis.com/auth/chat.admin.spaces.readonly

Для получения более подробной информации см. руководство по авторизации .

SetUpSpace

rpc SetUpSpace( SetUpSpaceRequest ) returns ( Space )

Создает пространство и добавляет в него указанных пользователей. Вызывающий пользователь автоматически добавляется в пространство и не должен указываться в запросе как член группы. Пример см. в разделе «Настройка пространства с первоначальным составом участников» .

Чтобы указать, каких пользователей следует добавить, добавьте членство с соответствующим параметром membership.member.name . Для добавления пользователя используйте users/{user} , где {user} может быть адресом электронной почты пользователя. Для пользователей в одной организации Workspace {user} также может быть id пользователя из People API или id пользователя из Directory API. Например, если идентификатор профиля пользователя People API для user@example.com равен 123456789 , вы можете добавить пользователя в пространство, установив membership.member.name равным users/user@example.com или users/123456789 .

Чтобы указать группы Google для добавления, добавьте участников с соответствующим параметром membership.group_member.name . Чтобы добавить группу Google или пригласить её, используйте groups/{group} , где {group} — это id группы из API Cloud Identity Groups. Например, вы можете использовать API поиска Cloud Identity Groups , чтобы получить ID 123456789 для группы email group@example.com , а затем добавить группу в пространство, установив membership.group_member.name равным groups/123456789 . Групповая электронная почта не поддерживается, и группы Google можно добавлять только в качестве участников в именованные пространства.

В случае именованного пространства или группового чата, если звонящий блокирует или блокируется некоторыми участниками, или не имеет разрешения на добавление некоторых участников, то эти участники не добавляются в созданное пространство.

Для создания личного сообщения (ЛС) между вызывающим пользователем и другим пользователем необходимо указать ровно одно членство, представляющее этого пользователя. Если один пользователь блокирует другого, запрос не выполняется, и ЛС не создается.

Чтобы создать личное сообщение между вызывающим пользователем и вызывающим приложением, установите Space.singleUserBotDm в true и не указывайте никаких членств. Этот метод можно использовать только для создания личного сообщения с вызывающим приложением. Чтобы добавить вызывающее приложение в качестве участника пространства или существующего личного сообщения между двумя пользователями, см. раздел «Приглашение или добавление пользователя или приложения в пространство» .

Если между двумя пользователями уже существует личное сообщение, даже если один пользователь блокирует другого в момент отправки запроса, то возвращается существующее личное сообщение.

Пространства с цепочками ответов не поддерживаются. Если при настройке пространства вы получаете сообщение об ошибке ALREADY_EXISTS , попробуйте другое displayName . Возможно, в существующем пространстве в организации Google Workspace уже используется это отображаемое имя.

Требуется аутентификация пользователя с использованием одной из следующих областей авторизации :

  • https://www.googleapis.com/auth/chat.spaces.create
  • https://www.googleapis.com/auth/chat.spaces
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.spaces
  • https://www.googleapis.com/auth/chat.spaces.create

Для получения более подробной информации см. руководство по авторизации .

Обновить членство

rpc UpdateMembership( UpdateMembershipRequest ) returns ( Membership )

Обновляет данные о членстве. Пример см. в разделе «Обновление данных пользователя в пространстве» .

Поддерживаются следующие типы аутентификации :

  • Аутентификация приложения с подтверждением администратора и указанием области авторизации:

    • https://www.googleapis.com/auth/chat.app.memberships (только в созданных приложением полях)
  • Аутентификация пользователя с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.memberships
    • https://www.googleapis.com/auth/chat.import (только для пробелов в режиме импорта)
    • Аутентификация пользователя предоставляет права администратора, когда учетная запись администратора проходит аутентификацию, use_admin_access имеет true , и используется следующая область авторизации:
      • https://www.googleapis.com/auth/chat.admin.memberships
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.app.memberships
  • https://www.googleapis.com/auth/chat.admin.memberships
  • https://www.googleapis.com/auth/chat.import
  • https://www.googleapis.com/auth/chat.memberships

Для получения более подробной информации см. руководство по авторизации .

Обновление сообщения

rpc UpdateMessage( UpdateMessageRequest ) returns ( Message )

Обновляет сообщение. Существует разница между методами patch и update . Метод patch использует запрос patch , а метод update — запрос put . Мы рекомендуем использовать метод patch . Пример см. в разделе «Обновление сообщения» .

Поддерживаются следующие типы аутентификации :

При использовании аутентификации приложения запросы могут обновлять только сообщения, созданные вызывающим приложением чата.

Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.bot
  • https://www.googleapis.com/auth/chat.import
  • https://www.googleapis.com/auth/chat.messages

Для получения более подробной информации см. руководство по авторизации .

UpdateSection

rpc UpdateSection( UpdateSectionRequest ) returns ( Section )

Обновляет раздел. Обновлять можно только разделы типа CUSTOM_SECTION . Подробнее см. раздел «Создание и организация разделов в Google Chat» .

Требуется аутентификация пользователя с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.users.sections
Области полномочий

Требуется следующая область действия OAuth:

  • https://www.googleapis.com/auth/chat.users.sections

Для получения более подробной информации см. руководство по авторизации .

ОбновлениеПространства

rpc UpdateSpace( UpdateSpaceRequest ) returns ( Space )

Обновляет пространство. Пример см. в разделе «Обновить пространство» .

Если при обновлении поля displayName вы получаете сообщение об ошибке ALREADY_EXISTS , попробуйте другое отображаемое имя. Возможно, это отображаемое имя уже используется в существующем пространстве в организации Google Workspace.

Поддерживаются следующие типы аутентификации :

  • Аутентификация приложения с подтверждением администратора и одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.app.spaces
  • Аутентификация пользователя с использованием одной из следующих областей авторизации:

    • https://www.googleapis.com/auth/chat.spaces
    • https://www.googleapis.com/auth/chat.import (только для пробелов в режиме импорта)
    • Аутентификация пользователя предоставляет права администратора, когда учетная запись администратора проходит аутентификацию, use_admin_access имеет true , и используются следующие области авторизации:
      • https://www.googleapis.com/auth/chat.admin.spaces

Аутентификация приложений имеет следующие ограничения:

  • Для обновления параметров space.predefined_permission_settings или space.permission_settings приложение должно быть создателем пространства.
  • Обновление параметра space.access_settings.audience для аутентификации приложений не поддерживается.
Области полномочий

Требуется один из следующих диапазонов аутентификации OAuth:

  • https://www.googleapis.com/auth/chat.app.spaces
  • https://www.googleapis.com/auth/chat.admin.spaces
  • https://www.googleapis.com/auth/chat.import
  • https://www.googleapis.com/auth/chat.spaces

Для получения более подробной информации см. руководство по авторизации .

UpdateSpaceNotificationSetting

rpc UpdateSpaceNotificationSetting( UpdateSpaceNotificationSettingRequest ) returns ( SpaceNotificationSetting )

Обновляет настройку уведомлений о свободном доступе. Пример см. в разделе «Обновление настройки уведомлений о свободном доступе для вызывающего абонента» .

Требуется аутентификация пользователя с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.users.spacesettings
Области полномочий

Требуется следующая область действия OAuth:

  • https://www.googleapis.com/auth/chat.users.spacesettings

Для получения более подробной информации см. руководство по авторизации .

UpdateSpaceReadState

rpc UpdateSpaceReadState( UpdateSpaceReadStateRequest ) returns ( SpaceReadState )

Обновляет состояние чтения пользователя в пространстве, используется для идентификации прочитанных и непрочитанных сообщений. Пример см. в разделе «Обновление состояния чтения пространства пользователя» .

Требуется аутентификация пользователя с указанием области авторизации :

  • https://www.googleapis.com/auth/chat.users.readstate
Области полномочий

Требуется следующая область действия OAuth:

  • https://www.googleapis.com/auth/chat.users.readstate

Для получения более подробной информации см. руководство по авторизации .

AccessoryWidget

Один или несколько интерактивных виджетов, которые отображаются внизу сообщения. Подробнее см. раздел «Добавление интерактивных виджетов внизу сообщения» .

Поля
Полевые action профсоюза. Тип действия. action может быть только одним из следующих:
button_list

ButtonList

Список кнопок.

ДействиеОтвет

Параметры, которые приложение чата может использовать для настройки способа отправки ответа.

Поля
type

ResponseType

Только ввод. Тип ответа приложения для чата.

url

string

Только для ввода. URL-адрес для аутентификации или настройки пользователей. (Только для типов ответов REQUEST_CONFIG .)

dialog_action

DialogAction

Только ввод. Ответ на событие взаимодействия, связанное с диалогом . Должен сопровождаться ResponseType.Dialog .

updated_widget

UpdatedWidget

Только ввод данных. Ответ обновленного виджета.

Тип ответа

Тип ответа приложения для чата.

Перечисления
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 Варианты автозаполнения текста виджета.

Элементы выбора

Список результатов автозаполнения виджета.

Поля
items[]

SelectionItem

Массив объектов SelectionItem.

Обновленный виджет

Для виджетов selectionInput возвращаются подсказки автозаполнения для меню с множественным выбором.

Поля
widget

string

Идентификатор обновляемого виджета. Идентификатор должен совпадать с идентификатором виджета, который инициировал запрос на обновление.

Поле объединения updated_widget . Виджет обновляется в ответ на действие пользователя. updated_widget может принимать только одно из следующих значений:
suggestions

SelectionItems

Список результатов автозаполнения виджета

ActionStatus

Отображает статус запроса на запуск или отправку диалога .

Поля
status_code

Code

Код состояния.

user_facing_message

string

Сообщение, которое необходимо отправить пользователям о статусе их запроса. Если параметр не задан, отправляется стандартное сообщение, основанное на status_code .

Аннотация

Только для вывода. Аннотации могут быть связаны с текстовым телом сообщения или с фрагментами, которые ссылаются на ресурсы Google Workspace, такие как Google Docs или Google Sheets, с start_index и length 0. Чтобы добавить базовое форматирование к текстовому сообщению, см. раздел «Форматирование текстовых сообщений» .

Пример текста сообщения в открытом виде:

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

AnnotationType

Тип данной аннотации.

length

int32

Длина подстроки в текстовом теле сообщения, которой соответствует эта аннотация. Если отсутствует, указывается длина 0.

start_index

int32

Эта аннотация соответствует начальному индексу (начиная с 0 включительно) в текстовом теле сообщения.

metadata поля объединения. Дополнительные метаданные об аннотации. metadata могут быть только одним из следующих типов:
user_mention

UserMentionMetadata

Метаданные упоминания пользователя.

slash_command

SlashCommandMetadata

Метаданные для команды с косой чертой.

custom_emoji_metadata

CustomEmojiMetadata

Метаданные для пользовательского эмодзи.

AnnotationType

Тип аннотации.

Перечисления
ANNOTATION_TYPE_UNSPECIFIED Значение по умолчанию для перечисления. Не использовать.
USER_MENTION Упоминается пользователь.
SLASH_COMMAND Выполняется команда с косой чертой.
CUSTOM_EMOJI Пользовательская аннотация в виде эмодзи.

AppCommandMetadata

Метаданные о команде приложения чата .

Поля
app_command_id

int32

Идентификатор команды, указанной в конфигурации API чата.

app_command_type

AppCommandType

Тип команды приложения «Чат».

AppCommandType

Тип команды приложения «Чат». Подробнее см. раздел «Типы команд приложения «Чат»» .

Перечисления
APP_COMMAND_TYPE_UNSPECIFIED Значение по умолчанию. Не указано.
SLASH_COMMAND Команда, состоящая из двух символов (слэша). Пользователь отправляет команду в сообщении чата.
QUICK_COMMAND Быстрая команда. Пользователь выбирает команду из меню чата в области ответа на сообщение.

AttachedGif

GIF-изображение, заданное URL-адресом.

Поля
uri

string

Только вывод. URL-адрес, на котором размещено GIF-изображение.

Вложение

Вложение в Google Чате.

Поля
name

string

Идентификатор. Имя ресурса вложения.

Формат: spaces/{space}/messages/{message}/attachments/{attachment} .

content_name

string

Только вывод. Исходное имя файла с содержимым, а не полный путь.

content_type

string

Только вывод. Тип содержимого (MIME-тип) файла.

thumbnail_uri

string

Только для вывода. URL-адрес миниатюры, который следует использовать для предварительного просмотра вложения пользователем. Приложения для чата не должны использовать этот URL-адрес для загрузки содержимого вложений.

download_uri

string

Только для вывода. URL-адрес для загрузки, который должен использоваться для того, чтобы пользователь мог загрузить вложение. Приложения для чата не должны использовать этот URL-адрес для загрузки содержимого вложений.

source

Source

Только вывод. Источник вложения.

Поле объединения data_ref . Ссылка на данные вложения. data_ref может принимать только одно из следующих значений:
attachment_data_ref

AttachmentDataRef

Необязательно. Ссылка на данные вложений. Это поле используется для создания или обновления сообщений с вложениями, либо для загрузки данных вложений через API мультимедиа.

drive_data_ref

DriveDataRef

Только для вывода. Ссылка на вложение в Google Диск. Это поле используется с API Google Диска.

Источник

Источник вложения.

Перечисления
SOURCE_UNSPECIFIED Сдержанный.
DRIVE_FILE Это файл из Google Диска.
UPLOADED_CONTENT Файл загружен в чат.

AttachmentDataRef

Ссылка на прикрепленные данные.

Поля
resource_name

string

Необязательно. Имя ресурса данных вложения. Это поле используется с API для работы с медиафайлами для загрузки данных вложения.

attachment_upload_token

string

Необязательный параметр. Непрозрачный токен, содержащий ссылку на загруженное вложение. Клиенты обрабатывают его как непрозрачную строку и используют для создания или обновления сообщений чата с вложениями.

CalendarEventLinkData

Данные для ссылок на события календаря.

Поля
calendar_id

string

Идентификатор календаря , к которому ведет ссылка.

event_id

string

Идентификатор события связанного события календаря.

CardWithId

Карточка в сообщении Google Chat.

Приложения для чата могут создавать карточки с аутентификацией приложения . В рамках программы предварительного просмотра для разработчиков , если ваше приложение для чата проходит аутентификацию как пользователь , оно может создавать сообщения в виде карточек. Если ваше приложение для чата не участвует в программе предварительного просмотра для разработчиков, оно не может создавать карточки с аутентификацией пользователя.

Чтобы узнать, как создать сообщение, содержащее карточки, см. раздел «Отправить сообщение» .

Создавайте и просматривайте карточки с помощью конструктора карточек.

Откройте конструктор карточек.

Поля
card_id

string

Обязательно, если сообщение содержит несколько карточек. Уникальный идентификатор для карточки в сообщении.

card

Card

Карта памяти. Максимальный размер — 32 КБ.

ChatSpaceLinkData

Данные для ссылок в чате.

Поля
space

string

Пространство связанного ресурса чата.

Формат: spaces/{space}

thread

string

Обсуждение в связанном чате.

Формат: spaces/{space}/threads/{thread}

message

string

Сообщение, содержащееся в связанном ресурсе чата.

Формат: spaces/{space}/messages/{message}

CompleteImportSpaceRequest

Запрос на завершение процесса импорта пространства.

Поля
name

string

Обязательно. Имя ресурса пространства режима импорта.

Формат: spaces/{space}

CompleteImportSpaceResponse

Сообщение об успешном завершении процесса импорта пространства.

Поля
space

Space

Пространство режимов импорта.

ContextualAddOnMarkup

Этот тип не содержит полей.

Разметка, позволяющая разработчикам указывать содержимое контекстного дополнения.

Карта

Карточка — это элемент пользовательского интерфейса, который может содержать виджеты пользовательского интерфейса, такие как текст и изображения.

Поля
header

CardHeader

Заголовок карточки. Заголовок обычно содержит название и изображение.

sections[]

Section

Разделы обозначены разделительной линией.

card_actions[]

CardAction

Действия этой карты.

name

string

Название карты.

CardAction

Действие, выполняемое с помощью карты, — это действие, связанное с данной картой. Для карты счета-фактуры типичным действием может быть: удалить счет-фактуру, отправить счет-фактуру по электронной почте или открыть счет-фактуру в браузере.

Не поддерживается приложениями Google Chat.

Поля
action_label

string

Ранее эта метка отображалась в пункте меню действий.

on_click

OnClick

Действие по клику для этого элемента действия.

CardHeader

Поля
title

string

Необходимо указать заголовок. Высота верхнего колонтитула фиксирована: если указаны и заголовок, и подзаголовок, каждый занимает одну строку. Если указан только заголовок, он занимает обе строки.

subtitle

string

Подзаголовок заголовка карточки.

image_style

ImageStyle

Тип изображения (например, квадратная или круглая рамка).

image_url

string

URL изображения в заголовке карточки.

ImageStyle

Перечисления
IMAGE_STYLE_UNSPECIFIED
IMAGE Квадратная рамка.
AVATAR Круглая граница.

Раздел

Раздел содержит набор виджетов, которые отображаются (вертикально) в том порядке, в котором они указаны. На всех платформах карточки имеют узкую фиксированную ширину, поэтому в настоящее время нет необходимости в свойствах компоновки (например, float).

Поля
header

string

Заголовок раздела. Поддерживается форматированный текст. Для получения дополнительной информации о форматировании текста см. разделы «Форматирование текста в приложениях Google Chat» и «Форматирование текста в надстройках Google Workspace».

widgets[]

WidgetMarkup

Раздел должен содержать как минимум один виджет.

CreateCustomEmojiRequest

Запрос на создание пользовательского эмодзи.

Поля
custom_emoji

CustomEmoji

Обязательно. Пользовательский эмодзи для создания.

Создать запрос на членство

Запрос на создание членства.

Поля
parent

string

Обязательно. Название ресурса пространства, для которого необходимо создать членство.

Формат: пробелы/{пробел}

membership

Membership

Обязательно. Необходимо указать связь членства.

Поле memberType должно содержать имя пользователя, у которого заполнены поля user.name и user.type . Сервер присвоит ресурсу имя и перезапишет все указанные данные.

Когда приложение для чата создает связь членства для пользователя, оно должно использовать определенные области авторизации и устанавливать конкретные значения для определенных полей:

  • При аутентификации пользователя требуется область авторизации chat.memberships .

  • При аутентификации в качестве приложения требуется область авторизации chat.app.memberships .

  • Установите user.type в значение HUMAN и user.name в формате users/{user} , где {user} может быть адресом электронной почты пользователя. Для пользователей в одной организации Workspace {user} также может быть id человека из People API или id пользователя в Directory API. Например, если идентификатор профиля пользователя в People API для user@example.com равен 123456789 , вы можете добавить пользователя в пространство, установив membership.member.name в значение users/user@example.com или users/123456789 .

Для приглашения пользователей, не входящих в организацию Workspace, которой принадлежит данное пространство, требуется аутентификация пользователя .

Когда приложение чата создает для себя связь членства, оно должно пройти аутентификацию как пользователь и использовать область chat.memberships.app , установить user.type в BOT и user.name в значение users/app .

use_admin_access

bool

Необязательный параметр. Если true , метод выполняется с использованием прав администратора Google Workspace пользователя.

Звонящий пользователь должен быть администратором Google Workspace с правами управления чатами и обсуждениями в пространстве .

Требуется область действия OAuth 2.0 chat.admin.memberships .

Создание членства в приложениях или создание членства для пользователей за пределами организации Google Workspace администратора не поддерживается с использованием прав администратора.

CreateMessageRequest

Создаёт сообщение.

Поля
parent

string

Обязательно. Имя ресурса пространства, в котором будет создано сообщение.

Формат: spaces/{space}

message

Message

Обязательно. Текст сообщения.

thread_key
(deprecated)

string

Необязательный параметр. Устарело: используйте thread.thread_key вместо него. Идентификатор потока. Поддерживает до 4000 символов. Чтобы начать поток или добавить сообщение, создайте сообщение и укажите threadKey или thread.name . Пример использования см. в разделе «Начало или ответ на поток сообщений» .

request_id

string

Необязательно. Уникальный идентификатор запроса для этого сообщения. Указание существующего идентификатора запроса возвращает сообщение, созданное с этим идентификатором, вместо создания нового сообщения.

message_reply_option

MessageReplyOption

Необязательный параметр. Указывает, начинает ли сообщение обсуждение или отвечает на него. Поддерживается только в именованных пространствах.

При ответе на действия пользователя это поле игнорируется. Для взаимодействий в рамках одной ветки обсуждения ответ создается в той же ветке. В противном случае ответ создается в новой ветке обсуждения.

message_id

string

Необязательно. Пользовательский идентификатор для сообщения. Позволяет приложениям чата получать, обновлять или удалять сообщения без необходимости хранить присвоенный системой идентификатор в имени ресурса сообщения (представленном в поле name сообщения).

Значение этого поля должно соответствовать следующим требованиям:

  • Начинается с client- . Например, client-custom-name — это допустимый пользовательский идентификатор, а custom-name — нет.
  • Содержит до 63 символов и только строчные буквы, цифры и дефисы.
  • Это уникальный идентификатор в пределах одного пространства. Приложение для чата не может использовать один и тот же пользовательский идентификатор для разных сообщений.

Подробности см. в разделе «Назовите сообщение» .

MessageReplyOption

Указывает, как ответить на сообщение. В будущем могут быть добавлены и другие состояния.

Перечисления
MESSAGE_REPLY_OPTION_UNSPECIFIED По умолчанию. Запускает новый поток. Использование этой опции игнорирует любой thread ID или thread_key , которые указаны.
REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD Создает сообщение в качестве ответа на ветку обсуждения, указанную по thread ID или thread_key . В случае неудачи сообщение запускает новую ветку обсуждения.
REPLY_MESSAGE_OR_FAIL Создает сообщение в качестве ответа на ветку обсуждения, указанную по thread ID или thread_key . Если используется новый thread_key , создается новая ветка. Если создание сообщения не удается, возвращается ошибка NOT_FOUND .

CreateReactionRequest

Создает реакцию на сообщение.

Поля
parent

string

Обязательно. Сообщение, в котором создается реакция.

Формат: spaces/{space}/messages/{message}

reaction

Reaction

Необходимо. Реакция, необходимая для создания.

CreateSectionRequest

Запрос на создание раздела.

Поля
parent

string

Обязательно. Имя родительского ресурса, в котором создан раздел.

Формат: users/{user}

section

Section

Обязательно. Раздел для создания.

CreateSpaceRequest

Запрос на создание именованного пространства без участников.

Поля
space

Space

Обязательно. Поля displayName и spaceType должны быть заполнены. Поддерживаются только SpaceType.SPACE и SpaceType.GROUP_CHAT . SpaceType.GROUP_CHAT можно использовать только в том случае, если importMode установлено значение true.

Если вы получили сообщение об ошибке ALREADY_EXISTS , попробуйте другое displayName . Возможно, в организации Google Workspace уже существует рабочее пространство, использующее это отображаемое имя.

name пространства присваивается на сервере, поэтому все, что указано в этом поле, будет проигнорировано.

request_id

string

Необязательно. Уникальный идентификатор для этого запроса. Рекомендуется использовать случайный UUID. Указание существующего идентификатора запроса возвращает пространство, созданное с этим идентификатором, вместо создания нового пространства. Указание существующего идентификатора запроса из того же приложения чата с другим авторизованным пользователем приводит к ошибке.

Пользовательские эмодзи

Представляет собой пользовательский эмодзи .

Поля
name

string

Идентификатор. Имя ресурса пользовательского эмодзи, присвоенное сервером.

Формат: customEmojis/{customEmoji}

uid

string

Только для вывода. Уникальный ключ для ресурса пользовательских эмодзи.

emoji_name

string

Необязательно. Неизменяемо. Пользовательское имя для пользовательского эмодзи, уникальное в рамках организации.

Этот параметр обязателен при создании пользовательского эмодзи, в противном случае он только выводится.

Названия эмодзи должны начинаться и заканчиваться двоеточием, быть написаны строчными буквами и содержать только буквенно-цифровые символы, дефисы и подчеркивания. Дефисы и подчеркивания используются для разделения слов и не могут использоваться подряд.

Пример: :valid-emoji-name:

temporary_image_uri

string

Только для вывода. Временный URL-адрес изображения для пользовательского эмодзи, действительный как минимум 10 минут. Обратите внимание, что этот адрес не заполняется в ответе при создании пользовательского эмодзи.

payload

CustomEmojiPayload

Необязательно. Только для ввода. Данные полезной нагрузки. Обязательно при создании пользовательского эмодзи.

CustomEmojiPayload

Данные полезной нагрузки для пользовательских эмодзи.

Поля
file_content

bytes

Обязательно. Только для ввода. Изображение, используемое для пользовательского эмодзи.

Размер полезной нагрузки не должен превышать 256 КБ, а размер изображения должен быть квадратным и составлять от 64 до 500 пикселей. Ограничения могут быть изменены.

filename

string

Обязательно. Только для ввода. Имя файла изображения.

Поддерживаемые расширения файлов: .png , .jpg , .gif .

CustomEmojiMetadata

Метаданные аннотаций для пользовательских эмодзи.

Поля
custom_emoji

CustomEmoji

Пользовательские эмодзи.

DeleteCustomEmojiRequest

Запрос на удаление пользовательского эмодзи.

Поля
name

string

Обязательно. Имя ресурса пользовательского эмодзи для удаления.

Формат: customEmojis/{customEmoji}

Вы можете использовать имя эмодзи в качестве псевдонима для {customEmoji} . Например, customEmojis/:example-emoji: где :example-emoji: — это имя пользовательского эмодзи.

DeleteMembershipRequest

Запрос на удаление членства в пространстве.

Поля
name

string

Обязательно. Имя ресурса для удаления членства. Приложения для чата могут удалять членства пользователей или свои собственные. Приложения для чата не могут удалять членства других приложений.

При удалении пользователя из группы требуется область видимости chat.memberships с аутентификацией пользователя или chat.memberships.app с аутентификацией приложения и формат spaces/{space}/members/{member} . Вы можете использовать адрес электронной почты в качестве псевдонима для {member} . Например, spaces/{space}/members/example@gmail.com где example@gmail.com — это адрес электронной почты пользователя Google Chat.

При удалении членства в приложении требуется область видимости chat.memberships.app и формат spaces/{space}/members/app .

Формат: spaces/{space}/members/{member} или spaces/{space}/members/app .

use_admin_access

bool

Необязательный параметр. Если true , метод выполняется с использованием прав администратора Google Workspace пользователя.

Звонящий пользователь должен быть администратором Google Workspace с правами управления чатами и обсуждениями в пространстве .

Требуется область действия OAuth 2.0 chat.admin.memberships .

Удаление членства в приложении в рамках пространства не поддерживается с использованием прав администратора.

DeleteMessageRequest

Запрос на удаление сообщения.

Поля
name

string

Обязательно. Имя ресурса сообщения.

Формат: spaces/{space}/messages/{message}

Если вы задали собственный идентификатор для своего сообщения, вы можете использовать значение из поля clientAssignedMessageId для {message} . Подробнее см. раздел «Присвоение имени сообщению» .

force

bool

Необязательный параметр. Если true , удаление сообщения также приводит к удалению ответов, объединенных в цепочку. Если false , удаление сообщения, имеющего ответы, завершается неудачей.

Применяется только при аутентификации в качестве пользователя . Не оказывает никакого эффекта при аутентификации в качестве приложения чата .

DeleteReactionRequest

Удаляет реакцию на сообщение.

Поля
name

string

Обязательно. Название реакции, которую нужно удалить.

Формат: spaces/{space}/messages/{message}/reactions/{reaction}

DeleteSectionRequest

Сообщение с запросом на удаление раздела.

Поля
name

string

Обязательно. Название раздела для удаления.

Формат: users/{user}/sections/{section}

DeleteSpaceRequest

Запрос на удаление пробела.

Поля
name

string

Обязательно. Имя ресурса пространства, которое нужно удалить.

Формат: spaces/{space}

use_admin_access

bool

Необязательный параметр. Если true , метод выполняется с использованием прав администратора Google Workspace пользователя.

Звонящий пользователь должен быть администратором Google Workspace с правами управления чатами и обсуждениями в пространстве .

Требуется область действия OAuth 2.0 chat.admin.delete .

Метаданные удаления

Информация об удалённом сообщении. Сообщение удаляется, когда задано значение параметра 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

Card

Только ввод. Тело диалогового окна, которое отображается в модальном окне. Приложения Google Chat не поддерживают следующие сущности карточек: DateTimePicker , OnChangeAction .

DialogAction

Содержит диалоговое окно и код состояния запроса.

Поля
action_status

ActionStatus

Только ввод. Статус запроса на запуск или отправку диалогового окна . При необходимости отображает статус и сообщение для пользователей. Например, в случае ошибки или успеха.

Полевая action профсоюза. Действие по выполнению. action может быть только одним из следующих:
dialog

Dialog

Только ввод данных. Диалоговое окно для запроса.

DriveDataRef

Ссылка на данные подключенного накопителя.

Поля
drive_file_id

string

Идентификатор файла на диске. Используется с API Google Диска.

DriveLinkData

Данные для ссылок Google Диска.

Поля
drive_data_ref

DriveDataRef

Объект DriveDataRef , который ссылается на файл в Google Диске.

mime_type

string

MIME-тип связанного ресурса Google Drive.

Эмодзи

Эмодзи, используемый в качестве реакции на сообщение.

Поля
Поле объединения content . Обязательно. Содержимое эмодзи. content может быть только одним из следующих:
unicode

string

Необязательно. Базовый эмодзи, представленный строкой Юникода.

custom_emoji

CustomEmoji

Пользовательский эмодзи.

EmojiReactionSummary

Количество людей, отреагировавших на сообщение определенным эмодзи.

Поля
emoji

Emoji

Только вывод. Эмодзи, связанные с реакциями.

reaction_count

int32

Только вывод. Общее количество реакций с использованием соответствующих эмодзи.

FindDirectMessageRequest

Запрос на выделение места для личных сообщений на основе пользовательских ресурсов.

Поля
name

string

Обязательно. Имя ресурса пользователя, с которым нужно найти личное сообщение.

Формат: users/{user} , где {user} — это либо id пользователя из People API, либо id пользователя в Directory API. Например, если идентификатор профиля People API — 123456789 , вы можете найти личное сообщение от этого человека, используя users/123456789 в качестве name . После аутентификации в качестве пользователя вы можете использовать адрес электронной почты в качестве псевдонима для {user} . Например, users/example@gmail.com , где example@gmail.com — это адрес электронной почты пользователя Google Chat.

FindGroupChatsRequest

Запрос на создание групповых чатов на основе ресурсов пользователей.

Поля
users[]

string

Необязательно. Имена ресурсов всех пользователей, участвующих в групповом чате с вызывающим пользователем. Приложения для чата в запрос не включаются.

Максимальное количество пользователей, которое можно указать в одном запросе, составляет 49 .

Формат: users/{user} , где {user} — это либо id пользователя из People API, либо id пользователя в Directory API. Например, чтобы найти все групповые чаты с вызывающим пользователем и двумя другими пользователями, имеющими идентификаторы профилей People API 123456789 и 987654321 , можно использовать users/123456789 и users/987654321 . Вы также можете использовать адрес электронной почты в качестве псевдонима для {user} . Например, users/example@gmail.com , где example@gmail.com — это адрес электронной почты пользователя Google Chat.

page_size

int32

Необязательный параметр. Максимальное количество возвращаемых символов. Сервис может вернуть меньшее значение.

Если не указано иное, возвращается не более 100 символов.

Максимальное значение — 1000. Если вы укажете значение больше 1000, оно автоматически изменится на 1000.

Отрицательные значения приводят к ошибке INVALID_ARGUMENT .

page_token

string

Необязательный параметр. Токен страницы, полученный из предыдущего запроса на поиск групповых чатов. Укажите этот параметр, чтобы получить следующую страницу.

При использовании пагинации все остальные параметры должны соответствовать вызову, который предоставил токен. Передача других значений может привести к неожиданным результатам.

space_view

SpaceView

Запрашиваемый тип представления пространства. Если не задано, по умолчанию используется SPACE_VIEW_RESOURCE_NAME_ONLY . Запросы, указывающие SPACE_VIEW_EXPANDED , должны включать области действия, разрешающие чтение данных пространства, например, https://www.googleapis.com/auth/chat.spaces или https://www.googleapis.com/auth/chat.spaces.readonly .

FindGroupChatsResponse

Ответ, содержащий разделы группового чата с указанием имени вызывающего пользователя и запрошенных пользователей.

Поля
spaces[]

Space

Список пробелов на запрошенной (или первой) странице.

next_page_token

string

Токен, который можно отправить в качестве pageToken для получения следующей страницы результатов. Если он пуст, последующих страниц нет.

ForwardedMetadata

Метаданные об исходном пространстве, из которого было переслано сообщение.

Поля
space

string

Только вывод. Имя ресурса исходного пространства. Формат: spaces/{space}

space_display_name

string

Только для вывода. Отображаемое имя исходного пространства или личного сообщения на момент пересылки. Для SPACE это имя пространства. Для DIRECT_MESSAGE это имя другого участника (например, "Пользователь A"). Для GROUP_CHAT это сгенерированное имя на основе имен участников, ограниченное пятью, включая создателя (например, "Пользователь A, Пользователь B").

GetAttachmentRequest

Запрос на прикрепление файла.

Поля
name

string

Обязательно. Имя ресурса вложения в формате spaces/{space}/messages/{message}/attachments/{attachment} .

GetCustomEmojiRequest

Запрос на возврат одного пользовательского эмодзи.

Поля
name

string

Обязательно. Имя ресурса пользовательского эмодзи.

Формат: customEmojis/{customEmoji}

Вы можете использовать имя эмодзи в качестве псевдонима для {customEmoji} . Например, customEmojis/:example-emoji: где :example-emoji: — это имя пользовательского эмодзи.

GetMembershipRequest

Запрос на получение членства в данном пространстве.

Поля
name

string

Обязательно. Название ресурса, по которому необходимо получить информацию о членстве.

Чтобы получить доступ к приложению через аутентификацию пользователя , вы можете дополнительно использовать spaces/{space}/members/app .

Формат: spaces/{space}/members/{member} или spaces/{space}/members/app

Вы можете использовать электронную почту пользователя в качестве псевдонима для {member} . Например, spaces/{space}/members/example@gmail.com , где example@gmail.com — это электронная почта пользователя Google Chat.

use_admin_access

bool

Необязательный параметр. Если true , метод выполняется с использованием прав администратора Google Workspace пользователя.

Звонящий пользователь должен быть администратором Google Workspace с правами управления чатами и обсуждениями в пространстве .

Требуется наличие области действия OAuth 2.0 chat.admin.memberships или chat.admin.memberships.readonly .

Получение членства в приложении в рамках пространства не поддерживается при использовании административного доступа.

GetMessageRequest

Запросить получение сообщения.

Поля
name

string

Обязательно. Имя ресурса сообщения.

Формат: spaces/{space}/messages/{message}

Если вы задали собственный идентификатор для своего сообщения, вы можете использовать значение из поля clientAssignedMessageId для {message} . Подробнее см. раздел «Присвоение имени сообщению» .

GetSpaceEventRequest

Запрос сообщения для получения информации о космическом событии.

Поля
name

string

Обязательно. Название ресурса космического события.

Формат: spaces/{space}/spaceEvents/{spaceEvent}

GetSpaceNotificationSettingRequest

Запрос сообщения для получения настроек уведомлений о свободном месте. Поддерживается получение настроек уведомлений только для вызывающего пользователя.

Поля
name

string

Обязательно. Формат: users/{user}/spaces/{space}/spaceNotificationSetting

  • users/me/spaces/{space}/spaceNotificationSetting , ИЛИ
  • users/user@example.com/spaces/{space}/spaceNotificationSetting , ИЛИ
  • users/123456789/spaces/{space}/spaceNotificationSetting . Примечание: В пути допускается указание только идентификатора пользователя или адреса электронной почты вызывающего абонента.

GetSpaceReadStateRequest

Запрос сообщения для API GetSpaceReadState.

Поля
name

string

Обязательно. Имя ресурса пространства, в котором необходимо получить данные о состоянии чтения.

Поддерживается только получение состояния чтения для вызывающего пользователя.

Чтобы сослаться на вызывающего пользователя, установите один из следующих параметров:

  • Псевдоним me . Например, users/me/spaces/{space}/spaceReadState .

  • Их адрес электронной почты в Workspace. Например, users/user@example.com/spaces/{space}/spaceReadState .

  • Их идентификатор пользователя. Например, users/123456789/spaces/{space}/spaceReadState .

Формат: users/{user}/spaces/{space}/spaceReadState

GetSpaceRequest

Запрос на возврат одного пробела.

Поля
name

string

Обязательно. Имя ресурса пространства в формате spaces/{space} .

Формат: spaces/{space}

use_admin_access

bool

Необязательный параметр. Если true , метод выполняется с использованием прав администратора Google Workspace пользователя.

Звонящий пользователь должен быть администратором Google Workspace с правами управления чатами и обсуждениями в пространстве .

Требуется наличие области действия OAuth 2.0 chat.admin.spaces или chat.admin.spaces.readonly .

GetThreadReadStateRequest

Сообщение запроса для API GetThreadReadStateRequest.

Поля
name

string

Обязательно. Имя ресурса, состояние чтения которого необходимо получить из потока.

Поддерживается только получение состояния чтения для вызывающего пользователя.

Чтобы сослаться на вызывающего пользователя, установите один из следующих параметров:

  • Псевдоним me . Например, users/me/spaces/{space}/threads/{thread}/threadReadState .

  • Их адрес электронной почты в рабочей области. Например, users/user@example.com/spaces/{space}/threads/{thread}/threadReadState .

  • Их идентификатор пользователя. Например, users/123456789/spaces/{space}/threads/{thread}/threadReadState .

Формат: users/{user}/spaces/{space}/threads/{thread}/threadReadState

Группа

Группа Google в Google Chat.

Поля
name

string

Название ресурса для группы Google.

Представляет группу в API Cloud Identity Groups.

Формат: groups/{group}

ИсторияШтата

История сообщений и пространств. Указывает, как долго сообщения и цепочки бесед сохраняются после создания.

Перечисления
HISTORY_STATE_UNSPECIFIED Значение по умолчанию. Не использовать.
HISTORY_OFF История сообщений отключена. Сообщения и ветки обсуждений сохраняются в течение 24 часов .
HISTORY_ON История продолжается. Правила хранения данных в хранилище организации определяют, как долго хранятся сообщения и переписки.

ListCustomEmojisRequest

Запрос на возврат списка пользовательских эмодзи.

Поля
page_size

int32

Необязательный параметр. Максимальное количество возвращаемых пользовательских эмодзи. Сервис может возвращать меньшее количество пользовательских эмодзи, чем это значение. Если параметр не указан, используется значение по умолчанию — 25. Максимальное значение — 200; значения выше 200 изменяются на 200.

page_token

string

Необязательно. (Если возобновляется выполнение предыдущего запроса.)

Токен страницы, полученный из предыдущего вызова функции добавления пользовательских эмодзи в список. Предоставьте его, чтобы получить доступ к следующей странице.

При постраничной навигации значение фильтра должно соответствовать запросу, предоставившему токен страницы. Передача другого значения может привести к неожиданным результатам.

filter

string

Необязательно. Фильтр запроса.

Поддерживается фильтрация по автору.

Для фильтрации по автору необходимо указать допустимое значение. В настоящее время для фильтрации пользовательских эмодзи по признаку того, были ли они созданы вызывающим пользователем или нет принимаются только значения creator("users/me") , а NOT creator("users/me") .

Например, следующий запрос возвращает пользовательские эмодзи, созданные вызывающей стороной:

creator("users/me")

Некорректные запросы отклоняются с ошибкой INVALID_ARGUMENT .

ListCustomEmojisResponse

Ответ для списка пользовательских эмодзи.

Поля
custom_emojis[]

CustomEmoji

Неупорядоченный список. Список пользовательских эмодзи.

next_page_token

string

Токен, который можно отправить в качестве pageToken для получения следующей страницы результатов. Если он пуст, последующих страниц нет.

Запрос на добавление в список участников

Запрос на добавление членства в список.

Поля
parent

string

Обязательно. Имя ресурса пространства, для которого необходимо получить список участников.

Формат: пробелы/{пробел}

page_size

int32

Необязательный параметр. Максимальное количество возвращаемых данных о членстве. Сервис может вернуть меньшее значение.

Если не указано иное, возвращается не более 100 заявок на членство.

Максимальное значение — 1000. Если вы укажете значение больше 1000, оно автоматически изменится на 1000.

Отрицательные значения приводят к ошибке INVALID_ARGUMENT .

page_token

string

Необязательный параметр. Токен страницы, полученный из предыдущего вызова для отображения списка участников. Укажите этот параметр, чтобы получить следующую страницу.

При использовании пагинации все остальные параметры должны соответствовать вызову, предоставившему токен страницы. Передача других значений другим параметрам может привести к неожиданным результатам.

filter

string

Необязательно. Фильтр запроса.

Вы можете фильтровать членство по роли ( role ) и типу ( member.type ).

Для фильтрации по роли установите для role значение ROLE_MEMBER или ROLE_MANAGER .

Для фильтрации по типу установите member.type в HUMAN или BOT . Вы также можете фильтровать по member.type , используя оператор != .

Для фильтрации по роли и типу используйте оператор AND Для фильтрации только по роли или только по типу используйте оператор OR .

Если use_admin_access установлен в значение true, требуется либо member.type = "HUMAN" , либо member.type != "BOT" . Фильтры других типов участников будут отклонены.

Например, следующие запросы являются допустимыми:

role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
member.type = "HUMAN" AND role = "ROLE_MANAGER"

member.type != "BOT"

Следующие запросы недействительны:

member.type = "HUMAN" AND member.type = "BOT"
role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"

Сервер отклоняет некорректные запросы с ошибкой INVALID_ARGUMENT .

show_groups

bool

Необязательный параметр. Если true , то помимо других типов членства возвращается информация о членстве в Google Group . Если установлен filter , информация о членстве Google Group не соответствующая критериям фильтра, не возвращается.

show_invited

bool

Необязательный параметр. Если true , то помимо других типов членства возвращаются также данные о членстве, связанном с invited участниками. Если установлен фильтр, invited участники, не соответствующие критериям фильтра, не возвращаются.

В настоящее время требуется аутентификация пользователя .

use_admin_access

bool

Необязательный параметр. Если true , метод выполняется с использованием прав администратора Google Workspace пользователя.

Звонящий пользователь должен быть администратором Google Workspace с правами управления чатами и обсуждениями в пространстве .

Требуется либо область действия OAuth 2.0 chat.admin.memberships.readonly , либо chat.admin.memberships .

Отображение членства в приложениях в пространстве не поддерживается при использовании прав администратора.

Ответ участников списка

Ответ на запрос о предоставлении списка членов данного пространства.

Поля
memberships[]

Membership

Неупорядоченный список. Список членств на запрошенной (или первой) странице.

next_page_token

string

Токен, который можно отправить в качестве pageToken для получения следующей страницы результатов. Если он пуст, последующих страниц нет.

ListMessagesRequest

Lists messages in the specified space, that the user is a member of.

Поля
parent

string

Required. The resource name of the space to list messages from.

Format: spaces/{space}

page_size

int32

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 INVALID_ARGUMENT error.

page_token

string

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

string

Optional. A query filter.

You can filter messages by date ( create_time ) and thread ( thread.name ).

To filter messages by the date they were created, specify the create_time with a timestamp in RFC-3339 format and double quotation marks. For example, "2023-04-21T11:30:00-04:00" . You can use the greater than operator > to list messages that were created after a timestamp, or the less than operator < to list messages that were created before a timestamp. To filter messages within a time interval, use the AND operator between two timestamps.

To filter by thread, specify the thread.name , formatted as spaces/{space}/threads/{thread} . You can only specify one thread.name per query.

To filter by both thread and date, use the AND operator in your query.

For example, the following queries are valid:

create_time > "2012-04-21T11:30:00-04:00"

create_time > "2012-04-21T11:30:00-04:00" AND
  thread.name = spaces/AAAAAAAAAAA/threads/123

create_time > "2012-04-21T11:30:00+00:00" AND

create_time < "2013-01-01T00:00:00+00:00" AND
  thread.name = spaces/AAAAAAAAAAA/threads/123

thread.name = spaces/AAAAAAAAAAA/threads/123

Invalid queries are rejected by the server with an INVALID_ARGUMENT error.

order_by

string

Optional. How the list of messages is ordered. Specify a value to order by an ordering operation. Valid ordering operation values are as follows:

  • ASC for ascending.

  • DESC for descending.

The default ordering is create_time ASC .

show_deleted

bool

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[]

Message

List of messages.

next_page_token

string

You can send a token as pageToken to retrieve the next page of results. If empty, there are no subsequent pages.

ListReactionsRequest

Lists reactions to a message.

Поля
parent

string

Required. The message users reacted to.

Format: spaces/{space}/messages/{message}

page_size

int32

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

string

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

string

Optional. A query filter.

You can filter reactions by emoji (either emoji.unicode or emoji.custom_emoji.uid ) and user ( user.name ).

To filter reactions for multiple emojis or users, join similar fields with the OR operator, such as emoji.unicode = "🙂" OR emoji.unicode = "👍" and user.name = "users/AAAAAA" OR user.name = "users/BBBBBB" .

To filter reactions by emoji and user, use the AND operator, such as emoji.unicode = "🙂" AND user.name = "users/AAAAAA" .

If your query uses both AND and OR , group them with parentheses.

For example, the following queries are valid:

user.name = "users/{user}"
emoji.unicode = "🙂"
emoji.custom_emoji.uid = "{uid}"
emoji.unicode = "🙂" OR emoji.unicode = "👍"
emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
emoji.unicode = "🙂" AND user.name = "users/{user}"
(emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}")
AND user.name = "users/{user}"

The following queries are invalid:

emoji.unicode = "🙂" AND emoji.unicode = "👍"
emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}"
emoji.unicode = "🙂" OR user.name = "users/{user}"
emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR
user.name = "users/{user}"
emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}"
AND user.name = "users/{user}"

Invalid queries are rejected with an INVALID_ARGUMENT error.

ListReactionsResponse

Response to a list reactions request.

Поля
reactions[]

Reaction

List of reactions in the requested (or first) page.

next_page_token

string

Continuation token to retrieve the next page of results. It's empty for the last page of results.

ListSectionItemsRequest

Request message for listing section items.

Поля
parent

string

Required. The parent, which is the section resource name that owns this collection of section items. Only supports listing section items for the calling user.

When you're filtering by space, use the wildcard - to search across all sections. For example, users/{user}/sections/- .

Format: users/{user}/sections/{section}

page_size

int32

Optional. The maximum number of section items to return. The service may return fewer than this value.

If unspecified, at most 10 section items will be returned.

The maximum value is 100. If you use a value more than 100, it's automatically changed to 100.

Negative values return an INVALID_ARGUMENT error.

page_token

string

Optional. A page token, received from a previous list section items call. Provide this 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

string

Optional. A query filter.

Currently only supports filtering by space.

For example, space = spaces/{space} .

Invalid queries are rejected with an INVALID_ARGUMENT error.

ListSectionItemsResponse

Response message for listing section items.

Поля
section_items[]

SectionItem

The section items from the specified section.

next_page_token

string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

ListSectionsRequest

Request message for listing sections.

Поля
parent

string

Required. The parent, which is the user resource name that owns this collection of sections. Only supports listing sections for the calling user. To refer to the calling user, set one of the following:

  • The me alias. For example, users/me .

  • Their Workspace email address. For example, users/user@example.com .

  • Their user id. For example, users/123456789 .

Формат: users/{user}

page_size

int32

Optional. The maximum number of sections to return. The service may return fewer than this value.

If unspecified, at most 10 sections will be returned.

The maximum value is 100. If you use a value more than 100, it's automatically changed to 100.

Negative values return an INVALID_ARGUMENT error.

page_token

string

Optional. A page token, received from a previous list sections call. Provide this 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.

ListSectionsResponse

Response message for listing sections.

Поля
sections[]

Section

The sections from the specified user.

next_page_token

string

A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

ListSpaceEventsRequest

Request message for listing space events.

Поля
parent

string

Required. Resource name of the Google Chat space where the events occurred.

Format: spaces/{space} .

page_size

int32

Optional. The maximum number of space events returned. The service might return fewer than this value.

Negative values return an INVALID_ARGUMENT error.

page_token

string

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

string

Required. A query filter.

You must specify at least one event type ( event_type ) using the has : operator. To filter by multiple event types, use the OR operator. Omit batch event types in your filter. The request automatically returns any related batch events. For example, if you filter by new reactions ( google.workspace.chat.reaction.v1.created ), the server also returns batch new reactions events ( google.workspace.chat.reaction.v1.batchCreated ). For a list of supported event types, see the SpaceEvents reference documentation .

Optionally, you can also filter by start time ( start_time ) and end time ( end_time ):

  • start_time : Exclusive timestamp from which to start listing space events. You can list events that occurred up to 28 days ago. If unspecified, lists space events from the past 28 days.
  • end_time : Inclusive timestamp until which space events are listed. If unspecified, lists events up to the time of the request.

To specify a start or end time, use the equals = operator and format in RFC-3339 . To filter by both start_time and end_time , use the AND operator.

For example, the following queries are valid:

start_time="2023-08-23T19:20:33+00:00" AND
end_time="2023-08-23T19:21:54+00:00"
start_time="2023-08-23T19:20:33+00:00" AND
(event_types:"google.workspace.chat.space.v1.updated" OR
event_types:"google.workspace.chat.message.v1.created")

The following queries are invalid:

start_time="2023-08-23T19:20:33+00:00" OR
end_time="2023-08-23T19:21:54+00:00"
event_types:"google.workspace.chat.space.v1.updated" AND
event_types:"google.workspace.chat.message.v1.created"

Invalid queries are rejected by the server with an INVALID_ARGUMENT error.

ListSpaceEventsResponse

Response message for listing space events.

Поля
space_events[]

SpaceEvent

Results are returned in chronological order (oldest event first). Note: The permissionSettings field is not returned in the Space object for list requests.

next_page_token

string

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

int32

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 INVALID_ARGUMENT error.

page_token

string

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

string

Optional. A query filter.

You can filter spaces by the space type ( space_type ).

To filter by space type, you must specify valid enum value, such as SPACE or GROUP_CHAT (the space_type can't be SPACE_TYPE_UNSPECIFIED ). To query for multiple space types, use the OR operator.

For example, the following queries are valid:

space_type = "SPACE"
spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE"

Invalid queries are rejected by the server with an INVALID_ARGUMENT error.

ListSpacesResponse

The response for a list spaces request.

Поля
spaces[]

Space

List of spaces in the requested (or first) page. Note: The permissionSettings field is not returned in the Space object for list requests.

next_page_token

string

You can send a token as pageToken to retrieve the next page of results. If empty, there are no subsequent pages.

MatchedUrl

A matched URL in a Chat message. Chat apps can preview matched URLs. For more information, see Preview links .

Поля
url

string

Output only. The URL that was matched.

MeetSpaceLinkData

Data for Meet space links.

Поля
meeting_code

string

Meeting code of the linked Meet space.

type

Type

Indicates the type of the Meet space.

huddle_status

HuddleStatus

Optional. Output only. If the Meet is a Huddle, indicates the status of the huddle. Otherwise, this is unset.

HuddleStatus

The status of the huddle

Перечисления
HUDDLE_STATUS_UNSPECIFIED Default value for the enum. Don't use.
STARTED The huddle has started.
ENDED The huddle has ended. In this case the Meet space URI and identifiers will no longer be valid.
MISSED The huddle has been missed. In this case the Meet space URI and identifiers will no longer be valid.

Тип

The type of the Meet space.

Перечисления
TYPE_UNSPECIFIED Default value for the enum. Don't use.
MEETING The Meet space is a meeting.
HUDDLE The Meet space is a huddle.

Членство

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

string

Identifier. Resource name of the membership, assigned by the server.

Format: spaces/{space}/members/{member}

state

MembershipState

Output only. State of the membership.

role

MembershipRole

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 UpdateMembership .

create_time

Timestamp

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

Timestamp

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

User

Optional. The Google Chat user or app the membership corresponds to. If your Chat app authenticates as a user , the output populates the user name and type .

group_member

Group

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 Default value. 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. In the Chat UI, this role is called Member.

The user has basic permissions, like sending messages to the space. Managers and owners can grant members additional permissions in a space, including:

  • Add or remove members.
  • Modify space details.
  • Turn history on or off.
  • Mention everyone in the space with @all .
  • Manage Chat apps and webhooks installed in the space.

In direct messages and unnamed group conversations, everyone has this role.

ROLE_MANAGER

A space owner. In the Chat UI, this role is called Owner.

The user has the complete set of space permissions to manage the space, including:

  • Change the role of other members in the space to member, manager, or owner.
  • Delete the space.

Only supported in SpaceType.SPACE (named spaces).

To learn more, see Learn more about your role as a space owner or manager .

ROLE_ASSISTANT_MANAGER

A space manager. In the Chat UI, this role is called Manager.

The user has all basic permissions of ROLE_MEMBER , and can be granted a subset of administrative permissions by an owner. By default, managers have all the permissions of an owner except for the ability to:

  • Delete the space.
  • Make another space member an owner.
  • Change an owner's role.

By default, managers permissions include but aren't limited to:

  • Make another member a manager.
  • Delete messages in the space.
  • Manage space permissions.
  • Receive notifications for requests to join the space if the manager has the "manage members" permission in the space settings.
  • Make a space discoverable.

Only supported in SpaceType.SPACE (named spaces).

To learn more, see Manage space settings .

MembershipState

Specifies the member's relationship with a space. Other membership states might be supported in the future.

Перечисления
MEMBERSHIP_STATE_UNSPECIFIED Default value. 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[]

MembershipCreatedEventData

A list of new memberships.

MembershipBatchDeletedEventData

Event payload for multiple deleted memberships.

Event type: google.workspace.chat.membership.v1.batchDeleted

Поля
memberships[]

MembershipDeletedEventData

A list of deleted memberships.

MembershipBatchUpdatedEventData

Event payload for multiple updated memberships.

Event type: google.workspace.chat.membership.v1.batchUpdated

Поля
memberships[]

MembershipUpdatedEventData

A list of updated memberships.

MembershipCreatedEventData

Event payload for a new membership.

Event type: google.workspace.chat.membership.v1.created .

Поля
membership

Membership

The new membership.

MembershipDeletedEventData

Event payload for a deleted membership.

Event type: google.workspace.chat.membership.v1.deleted

Поля
membership

Membership

The deleted membership. Only the name and state fields are populated.

MembershipUpdatedEventData

Event payload for an updated membership.

Event type: google.workspace.chat.membership.v1.updated

Поля
membership

Membership

The updated membership.

Сообщение

A message in a Google Chat space.

Поля
name

string

Identifier. Resource name of the message.

Format: spaces/{space}/messages/{message}

Where {space} is the ID of the space where the message is posted and {message} is a system-assigned ID for the message. For example, spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB .

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 {message} with the value from the clientAssignedMessageId field. For example, spaces/AAAAAAAAAAA/messages/client-custom-name . For details, see Name a message .

sender

User

Output only. The user who created the message. If your Chat app authenticates as a user , the output populates the user name and type .

create_time

Timestamp

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

Timestamp

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

Timestamp

Output only. The time at which the message was deleted in Google Chat. If the message is never deleted, this field is empty.

text

string

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

string

Output only. Contains the message text with markups added to communicate formatting. This field might not capture all formatting visible in the UI, but includes the following:

  • Markup syntax for bold, italic, strikethrough, monospace, monospace block, bulleted list, and block quote.

  • User mentions using the format <users/{user}> .

  • Custom hyperlinks using the format <{url}|{rendered_text}> where the first string is the URL and the second is the rendered text—for example, <http://example.com|custom text> .

  • Custom emoji using the format :{emoji_name}: —for example, :smile: . This doesn't apply to Unicode emoji, such as U+1F600 for a grinning face emoji.

  • Bullet list items using asterisks ( * )—for example, * item .

For more information, see View text formatting sent in a message

cards[]
(deprecated)

Card

Deprecated: Use cards_v2 instead.

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 and cards_v2 can have a maximum size of 32 KB.

cards_v2[]

CardWithId

Optional. An array of cards .

Chat apps can create cards with app authentication . As part of the Developer Preview Program , if your Chat app authenticates as a user , it can create card messages. If your Chat app is not part of Developer Preview Program, it can't create cards with user authentication.

To learn how to create a message that contains cards, see Send a message .

Design and preview cards with the Card Builder.

Откройте конструктор карточек.

annotations[]

Annotation

Output only. Annotations can be associated with the plain-text body of the message or with chips that link to Google Workspace resources like Google Docs or Sheets with start_index and length of 0.

thread

Thread

The thread the message belongs to. For example usage, see Start or reply to a message thread .

space

Space

Output only. If your Chat app authenticates as a user , the output only populates the space name .

fallback_text

string

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

ActionResponse

Input only. Parameters that a Chat app can use to configure how its response is posted.

argument_text

string

Output only. Plain-text body of the message with all Chat app mentions stripped out.

slash_command

SlashCommand

Output only. Slash command information, if applicable.

attachment[]

Attachment

Optional. User-uploaded attachment.

matched_url

MatchedUrl

Output only. A URL in spaces.messages.text that matches a link preview pattern. For more information, see Preview links .

thread_reply

bool

Output only. When true , the message is a response in a reply thread. When false , the message is visible in the space's top-level conversation as either the first message of a thread or a message with no threaded replies.

If the space doesn't support reply in threads, this field is always false .

client_assigned_message_id

string

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 messageId field when you create the message. For details, see Name a message .

emoji_reaction_summaries[]

EmojiReactionSummary

Output only. The list of emoji reaction summaries on the message.

private_message_viewer

User

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

DeletionMetadata

Output only. Information about a deleted message. A message is deleted when delete_time is set.

quoted_message_metadata

QuotedMessageMetadata

Optional. Information about a message that another message quotes.

When you create a message, you can quote messages within the same thread, or quote a root message to create a new root message. However, you can't quote a message reply from a different thread.

When you update a message, you can't add or replace the quotedMessageMetadata field, but you can remove it.

For example usage, see Quote another message .

attached_gifs[]

AttachedGif

Output only. GIF images that are attached to the message.

accessory_widgets[]

AccessoryWidget

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[]

MessageCreatedEventData

A list of new messages.

MessageBatchDeletedEventData

Event payload for multiple deleted messages.

Event type: google.workspace.chat.message.v1.batchDeleted

Поля
messages[]

MessageDeletedEventData

A list of deleted messages.

MessageBatchUpdatedEventData

Event payload for multiple updated messages.

Event type: google.workspace.chat.message.v1.batchUpdated

Поля
messages[]

MessageUpdatedEventData

A list of updated messages.

MessageCreatedEventData

Event payload for a new message.

Event type: google.workspace.chat.message.v1.created

Поля
message

Message

The new message.

MessageDeletedEventData

Event payload for a deleted message.

Event type: google.workspace.chat.message.v1.deleted

Поля
message

Message

The deleted message. Only the name , createTime , and deletionMetadata fields are populated.

MessageUpdatedEventData

Event payload for an updated message.

Event type: google.workspace.chat.message.v1.updated

Поля
message

Message

The updated message.

MoveSectionItemRequest

Request message for moving a section item across sections.

Поля
name

string

Required. The resource name of the section item to move.

Format: users/{user}/sections/{section}/items/{item}

target_section

string

Required. The resource name of the section to move the section item to.

Format: users/{user}/sections/{section}

MoveSectionItemResponse

Response message for moving a section item.

Поля
section_item

SectionItem

The updated section item.

PositionSectionRequest

Request message for positioning a section.

Поля
name

string

Required. The resource name of the section to position.

Format: users/{user}/sections/{section}

Union field position . Required. The new position of the section. position can be only one of the following:
sort_order

int32

Optional. The absolute position of the section in the list of sections. The position must be greater than 0. If the position is greater than the number of sections, the section will be appended to the end of the list. This operation inserts the section at the given position and shifts the original section at that position, and those below it, to the next position.

relative_position

Position

Optional. The relative position of the section in the list of sections.

Позиция

The position of the section.

Перечисления
POSITION_UNSPECIFIED Unspecified position.
START Start of the list of sections.
END End of the list of sections.

PositionSectionResponse

Response message for positioning a section.

Поля
section

Section

The updated section.

QuotedMessageMetadata

Information about a message that another message quotes.

When you create a message, you can quote messages within the same thread, or quote a root message to create a new root message. However, you can't quote a message reply from a different thread.

When you update a message, you can't add or replace the quotedMessageMetadata field, but you can remove it.

For example usage, see Quote another message .

Поля
name

string

Required. Resource name of the message that is quoted.

Format: spaces/{space}/messages/{message}

last_update_time

Timestamp

Required. The timestamp when the quoted message was created or when the quoted message was last updated.

If the message was edited, use this field, last_update_time . If the message was never edited, use create_time .

If last_update_time doesn't match the latest version of the quoted message, the request fails.

quote_type

QuoteType

Optional. Specifies the quote type. If not set, defaults to REPLY in the message read/write path for backward compatibility.

quoted_message_snapshot

QuotedMessageSnapshot

Output only. A snapshot of the quoted message's content.

forwarded_metadata

ForwardedMetadata

Output only. Metadata about the source space of the quoted message. Populated only for FORWARD quote type.

QuoteType

The quote type of the quoted message.

Перечисления
QUOTE_TYPE_UNSPECIFIED Reserved. This value is unused.
REPLY

If quote_type is REPLY , you can do the following:

  • If you're replying in a thread, you can quote another message in that thread.

  • If you're creating a root message, you can quote another root message in that space.

You can't quote a message reply from a different thread.

QuotedMessageSnapshot

Provides a snapshot of the content of the quoted message at the time of quoting or forwarding

Поля
sender

string

Output only. The quoted message's author name. Populated for both REPLY & FORWARD quote types.

text

string

Output only. Snapshot of the quoted message's text content.

formatted_text

string

Output only. Contains the quoted message text with markups added to support rich formatting like hyperlinks,custom emojis, markup, etc. Populated only for FORWARD quote type.

annotations[]

Annotation

Output only. Annotations parsed from the text body of the quoted message. Populated only for FORWARD quote type.

attachments[]

Attachment

Output only. Attachments that were part of the quoted message. These are copies of the quoted message's attachment metadata. Populated only for FORWARD quote type.

Реакция

A reaction to a message.

Поля
name

string

Identifier. The resource name of the reaction.

Format: spaces/{space}/messages/{message}/reactions/{reaction}

user

User

Output only. The user who created the reaction.

emoji

Emoji

Required. The emoji used in the reaction.

ReactionBatchCreatedEventData

Event payload for multiple new reactions.

Event type: google.workspace.chat.reaction.v1.batchCreated

Поля
reactions[]

ReactionCreatedEventData

A list of new reactions.

ReactionBatchDeletedEventData

Event payload for multiple deleted reactions.

Event type: google.workspace.chat.reaction.v1.batchDeleted

Поля
reactions[]

ReactionDeletedEventData

A list of deleted reactions.

ReactionCreatedEventData

Event payload for a new reaction.

Event type: google.workspace.chat.reaction.v1.created

Поля
reaction

Reaction

The new reaction.

ReactionDeletedEventData

Event payload for a deleted reaction.

Type: google.workspace.chat.reaction.v1.deleted

Поля
reaction

Reaction

The deleted reaction.

ReplaceMessageCardsRequest

Request message for ReplaceMessageCards API method.

Поля
name

string

Required. The resource name of the message.

Format: spaces/{space}/messages/{message}

cards_v2[]

CardWithId

Optional. An array of cards to be included in the message. These cards will replace the existing cards of the message. If empty, the original cards included in the message will be cleared.

ReplaceMessageCardsResponse

Этот тип не содержит полей.

Response message for ReplaceMessageCards API.

RichLinkMetadata

A rich link to a resource. Rich links can be associated with the plain-text body of the message or represent chips that link to Google Workspace resources like Google Docs or Sheets with start_index and length of 0.

Поля
uri

string

The URI of this link.

Union field data . Data for the linked resource. data can be only one of the following:

RichLinkType

The rich link type. More types might be added in the future.

Перечисления
DRIVE_FILE A Google Drive rich link type.
CHAT_SPACE A Chat space rich link type. For example, a space smart chip.
GMAIL_MESSAGE A Gmail message rich link type. Specifically, a Gmail chip from Share to Chat . The API only supports reading messages with GMAIL_MESSAGE rich links.
MEET_SPACE A Meet message rich link type. For example, a Meet chip.
CALENDAR_EVENT A Calendar message rich link type. For example, a Calendar chip.

SearchSpacesRequest

Request to search for a list of spaces based on a query.

Поля
use_admin_access

bool

When true , the method runs using the user's Google Workspace administrator privileges.

The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege .

Requires either the chat.admin.spaces.readonly or chat.admin.spaces OAuth 2.0 scope .

This method currently only supports admin access, thus only true is accepted for this field.

page_size

int32

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

string

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

string

Required. A search query.

You can search by using the following parameters:

  • create_time
  • customer
  • display_name
  • external_user_allowed
  • last_active_time
  • space_history_state
  • space_type

create_time and last_active_time accept a timestamp in RFC-3339 format and the supported comparison operators are: = , < , > , <= , >= .

customer is required and is used to indicate which customer to fetch spaces from. customers/my_customer is the only supported value.

display_name only accepts the HAS ( : ) operator. The text to match is first tokenized into tokens and each token is prefix-matched case-insensitively and independently as a substring anywhere in the space's display_name . For example, Fun Eve matches Fun event or The evening was fun , but not notFun event or even .

external_user_allowed accepts either true or false .

space_history_state only accepts values from the historyState field of a space resource.

space_type is required and the only valid value is SPACE .

Across different fields, only AND operators are supported. A valid example is space_type = "SPACE" AND display_name:"Hello" and an invalid example is space_type = "SPACE" OR display_name:"Hello" .

Among the same field, space_type doesn't support AND or OR operators. display_name , 'space_history_state', and 'external_user_allowed' only support OR operators. last_active_time and create_time support both AND and OR operators. AND can only be used to represent an interval, such as last_active_time < "2022-01-01T00:00:00+00:00" AND last_active_time > "2023-01-01T00:00:00+00:00" .

The following example queries are valid:

customer = "customers/my_customer" AND space_type = "SPACE"

customer = "customers/my_customer" AND space_type = "SPACE" AND
display_name:"Hello World"

customer = "customers/my_customer" AND space_type = "SPACE" AND
(last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time >
"2022-01-01T00:00:00+00:00")

customer = "customers/my_customer" AND space_type = "SPACE" AND
(display_name:"Hello World" OR display_name:"Fun event") AND
(last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time <
"2022-01-01T00:00:00+00:00")

customer = "customers/my_customer" AND space_type = "SPACE" AND
(create_time > "2019-01-01T00:00:00+00:00" AND create_time <
"2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND
(space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF")
order_by

string

Optional. How the list of spaces is ordered.

Supported attributes to order by are:

  • membership_count.joined_direct_human_user_count — Denotes the count of human users that have directly joined a space.
  • last_active_time — Denotes the time when last eligible item is added to any topic of this space.
  • create_time — Denotes the time of the space creation.

Valid ordering operation values are:

  • ASC for ascending. Default value.

  • DESC for descending.

The supported syntax are:

  • membership_count.joined_direct_human_user_count DESC
  • membership_count.joined_direct_human_user_count ASC
  • last_active_time DESC
  • last_active_time ASC
  • create_time DESC
  • create_time ASC

SearchSpacesResponse

Response with a list of spaces corresponding to the search spaces request.

Поля
spaces[]

Space

A page of the requested spaces.

next_page_token

string

A token that can be used to retrieve the next page. If this field is empty, there are no subsequent pages.

total_size

int32

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.

Раздел

Represents a section in Google Chat. Sections help users organize their spaces. There are two types of sections:

  1. System Sections: These are predefined sections managed by Google Chat. Their resource names are fixed, and they cannot be created, deleted, or have their display_name modified. Examples include:

    • users/{user}/sections/default-direct-messages
    • users/{user}/sections/default-spaces
    • users/{user}/sections/default-apps
  2. Custom Sections: These are sections created and managed by the user. Creating a custom section using CreateSection requires a display_name . Custom sections can be updated using UpdateSection and deleted using DeleteSection .

Поля
name

string

Identifier. Resource name of the section.

For system sections, the section ID is a constant string:

  • DEFAULT_DIRECT_MESSAGES: users/{user}/sections/default-direct-messages
  • DEFAULT_SPACES: users/{user}/sections/default-spaces
  • DEFAULT_APPS: users/{user}/sections/default-apps

Format: users/{user}/sections/{section}

display_name

string

Optional. The section's display name. Only populated for sections of type CUSTOM_SECTION . Supports up to 80 characters. Required when creating a CUSTOM_SECTION .

sort_order

int32

Output only. The order of the section in relation to other sections. Sections with a lower sort_order value appear before sections with a higher value.

type

SectionType

Required. The type of the section.

SectionType

Section types.

Перечисления
SECTION_TYPE_UNSPECIFIED Unspecified section type.
CUSTOM_SECTION Custom section.
DEFAULT_DIRECT_MESSAGES Default section containing DIRECT_MESSAGE between two human users or GROUP_CHAT spaces that don't belong to any custom section.
DEFAULT_SPACES Default spaces that don't belong to any custom section.
DEFAULT_APPS Default section containing a user's installed apps.

SectionItem

A user's defined section item. This is used to represent section items, such as spaces, grouped under a section.

Поля
name

string

Identifier. The resource name of the section item.

Format: users/{user}/sections/{section}/items/{item}

Union field item . Required. The section item. item can be only one of the following:
space

string

Optional. The space resource name.

Format: spaces/{space}

SetUpSpaceRequest

Request to create a space and add specified users to it.

Поля
space

Space

Required. The Space.spaceType field is required.

To create a space, set Space.spaceType to SPACE and set Space.displayName . If you receive the error message ALREADY_EXISTS when setting up a space, try a different displayName . An existing space within the Google Workspace organization might already use this display name.

To create a group chat, set Space.spaceType to GROUP_CHAT . Don't set Space.displayName .

To create a 1:1 conversation between humans, set Space.spaceType to DIRECT_MESSAGE and set Space.singleUserBotDm to false . Don't set Space.displayName or Space.spaceDetails .

To create an 1:1 conversation between a human and the calling Chat app, set Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true . Don't set Space.displayName or Space.spaceDetails .

If a DIRECT_MESSAGE space already exists, that space is returned instead of creating a new space.

request_id

string

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[]

Membership

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 Membership.member field must contain a user with name populated (format: users/{user} ) and type set to User.Type.HUMAN . You can only add human users when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}. For example, the user.name can be users/example@gmail.com . To invite Gmail users or users from external Google Workspace domains, user's email must be used for {user} .

For Google group membership, the Membership.group_member field must contain a group with name populated (format groups/{group} ). You can only add Google groups when setting Space.spaceType to SPACE .

Optional when setting Space.spaceType to SPACE .

Required when setting Space.spaceType to GROUP_CHAT , along with at least two memberships.

Required when setting Space.spaceType to DIRECT_MESSAGE with a human user, along with exactly one membership.

Must be empty when creating a 1:1 conversation between a human and the calling Chat app (when setting Space.spaceType to DIRECT_MESSAGE and Space.singleUserBotDm to true ).

SlashCommand

Metadata about a slash command in Google Chat.

Поля
command_id

int64

The ID of the slash command.

SlashCommandMetadata

Annotation metadata for slash commands (/).

Поля
bot

User

The Chat app whose command was invoked.

type

Type

The type of slash command.

command_name

string

The name of the invoked slash command.

command_id

int64

The command ID of the invoked slash command.

triggers_dialog

bool

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

string

Identifier. Resource name of the space.

Format: spaces/{space}

Where {space} represents the system-assigned ID for the space. You can obtain the space ID by calling the spaces.list() method or from the space URL. For example, if the space URL is https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA , the space ID is AAAAAAAAA .

type
(deprecated)

Type

Output only. Deprecated: Use space_type instead. The type of a space.

space_type

SpaceType

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

bool

Optional. Whether the space is a DM between a Chat app and a single human.

threaded
(deprecated)

bool

Output only. Deprecated: Use spaceThreadingState instead. Whether messages are threaded in this space.

display_name

string

Optional. The space's display name. Required when creating a space with a spaceType of SPACE . If you receive the error message ALREADY_EXISTS when creating a space or updating the displayName , try a different displayName . An existing space within the Google Workspace organization might already use this display name.

For direct messages, this field might be empty.

Supports up to 128 characters.

external_user_allowed

bool

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:

  • The authenticated user uses a consumer account (unmanaged user account). By default, a space created by a consumer account permits any Google Chat user.

For existing spaces, this field is output only.

space_threading_state

SpaceThreadingState

Output only. The threading state in the Chat space.

space_details

SpaceDetails

Optional. Details about the space including description and rules.

space_history_state

HistoryState

Optional. The message history state for messages and threads in this space.

import_mode

bool

Optional. Whether this space is created in Import Mode as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete.

Creating a space in Import Mode requires user authentication .

create_time

Timestamp

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 spaceType is GROUP_CHAT or SPACE .

last_active_time

Timestamp

Output only. Timestamp of the last message in the space.

admin_installed

bool

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

MembershipCount

Output only. The count of joined memberships grouped by member type. Populated when the space_type is SPACE , DIRECT_MESSAGE or GROUP_CHAT .

access_settings

AccessSettings

Optional. Specifies the access setting of the space. Only populated when the space_type is SPACE .

space_uri

string

Output only. The URI for a user to access the space.

import_mode_expire_time

Timestamp

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 spaces.completeImport .

This field is only populated for spaces that were created with import mode.

customer

string

Optional. Immutable. The customer id of the domain of the space. Required only when creating a space with app authentication and SpaceType is SPACE , otherwise should not be set.

In the format customers/{customer} , where customer is the id from the Admin SDK customer resource . Private apps can also use the customers/my_customer alias to create the space in the same Google Workspace organization as the app.

This field isn't populated for direct messages (DMs) or when the space is created by non-Google Workspace users.

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

PredefinedPermissionSettings

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 PermissionSettings field.

Setting predefined permission settings supports:

permission_settings

PermissionSettings

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

AccessState

Output only. Indicates the access state of the space.

audience

string

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: audiences/{audience}

To use the default target audience for the Google Workspace organization, set to audiences/default .

Reading the target audience supports:

This field is not populated when using the chat.bot scope with app authentication .

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

int32

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

int32

Output only. Count of all groups that have directly joined the space.

PermissionSetting

Represents a space permission setting.

Поля
managers_allowed

bool

Optional. Whether space owners ( ROLE_MANAGER ) have this permission.

members_allowed

bool

Optional. Whether basic space members ( ROLE_MEMBER ) have this permission.

assistant_managers_allowed

bool

Optional. Whether space managers ROLE_ASSISTANT_MANAGER ) 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

PermissionSetting

Optional. Setting for managing members and groups in a space.

modify_space_details

PermissionSetting

Optional. Setting for updating space name, avatar, description and guidelines.

toggle_history

PermissionSetting

Optional. Setting for toggling space history on and off.

use_at_mention_all

PermissionSetting

Optional. Setting for using @all in a space.

manage_apps

PermissionSetting

Optional. Setting for managing apps in a space.

manage_webhooks

PermissionSetting

Optional. Setting for managing webhooks in a space.

post_messages

PermissionSetting

Output only. Setting for posting messages in a space.

reply_messages

PermissionSetting

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

string

Optional. A description of the space. For example, describe the space's discussion topic, functional purpose, or participants.

Supports up to 150 characters.

guidelines

string

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[]

SpaceUpdatedEventData

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

string

Resource name of the space event.

Формат: spaces/{space}/spaceEvents/{spaceEvent}

event_time

Timestamp

Time when the event occurred.

event_type

string

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 spaceEvents.list() requests, omit batch event types in your query filter. By default, the server returns both event type and its batch version.

Supported event types for messages :

  • New message: google.workspace.chat.message.v1.created
  • Updated message: google.workspace.chat.message.v1.updated
  • Deleted message: google.workspace.chat.message.v1.deleted
  • Multiple new messages: google.workspace.chat.message.v1.batchCreated
  • Multiple updated messages: google.workspace.chat.message.v1.batchUpdated
  • Multiple deleted messages: google.workspace.chat.message.v1.batchDeleted

Supported event types for memberships :

  • New membership: google.workspace.chat.membership.v1.created
  • Updated membership: google.workspace.chat.membership.v1.updated
  • Deleted membership: google.workspace.chat.membership.v1.deleted
  • Multiple new memberships: google.workspace.chat.membership.v1.batchCreated
  • Multiple updated memberships: google.workspace.chat.membership.v1.batchUpdated
  • Multiple deleted memberships: google.workspace.chat.membership.v1.batchDeleted

Supported event types for reactions :

  • New reaction: google.workspace.chat.reaction.v1.created
  • Deleted reaction: google.workspace.chat.reaction.v1.deleted
  • Multiple new reactions: google.workspace.chat.reaction.v1.batchCreated
  • Multiple deleted reactions: google.workspace.chat.reaction.v1.batchDeleted

Supported event types about the space :

  • Updated space: google.workspace.chat.space.v1.updated
  • Multiple space updates: google.workspace.chat.space.v1.batchUpdated

Union field payload .

payload can be only one of the following:

message_created_event_data

MessageCreatedEventData

Event payload for a new message.

Event type: google.workspace.chat.message.v1.created

message_updated_event_data

MessageUpdatedEventData

Event payload for an updated message.

Event type: google.workspace.chat.message.v1.updated

message_deleted_event_data

MessageDeletedEventData

Event payload for a deleted message.

Event type: google.workspace.chat.message.v1.deleted

message_batch_created_event_data

MessageBatchCreatedEventData

Event payload for multiple new messages.

Event type: google.workspace.chat.message.v1.batchCreated

message_batch_updated_event_data

MessageBatchUpdatedEventData

Event payload for multiple updated messages.

Event type: google.workspace.chat.message.v1.batchUpdated

message_batch_deleted_event_data

MessageBatchDeletedEventData

Event payload for multiple deleted messages.

Event type: google.workspace.chat.message.v1.batchDeleted

space_updated_event_data

SpaceUpdatedEventData

Event payload for a space update.

Event type: google.workspace.chat.space.v1.updated

space_batch_updated_event_data

SpaceBatchUpdatedEventData

Event payload for multiple updates to a space.

Event type: google.workspace.chat.space.v1.batchUpdated

membership_created_event_data

MembershipCreatedEventData

Event payload for a new membership.

Event type: google.workspace.chat.membership.v1.created

membership_updated_event_data

MembershipUpdatedEventData

Event payload for an updated membership.

Event type: google.workspace.chat.membership.v1.updated

membership_deleted_event_data

MembershipDeletedEventData

Event payload for a deleted membership.

Event type: google.workspace.chat.membership.v1.deleted

membership_batch_created_event_data

MembershipBatchCreatedEventData

Event payload for multiple new memberships.

Event type: google.workspace.chat.membership.v1.batchCreated

membership_batch_updated_event_data

MembershipBatchUpdatedEventData

Event payload for multiple updated memberships.

Event type: google.workspace.chat.membership.v1.batchUpdated

membership_batch_deleted_event_data

MembershipBatchDeletedEventData

Event payload for multiple deleted memberships.

Event type: google.workspace.chat.membership.v1.batchDeleted

reaction_created_event_data

ReactionCreatedEventData

Event payload for a new reaction.

Event type: google.workspace.chat.reaction.v1.created

reaction_deleted_event_data

ReactionDeletedEventData

Event payload for a deleted reaction.

Event type: google.workspace.chat.reaction.v1.deleted

reaction_batch_created_event_data

ReactionBatchCreatedEventData

Event payload for multiple new reactions.

Event type: google.workspace.chat.reaction.v1.batchCreated

reaction_batch_deleted_event_data

ReactionBatchDeletedEventData

Event payload for multiple deleted reactions.

Event type: google.workspace.chat.reaction.v1.batchDeleted

SpaceNotificationSetting

The notification setting of a user in a space.

Поля
name

string

Identifier. The resource name of the space notification setting. Format: users/{user}/spaces/{space}/spaceNotificationSetting .

notification_setting

NotificationSetting

The notification setting.

mute_setting

MuteSetting

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

string

Resource name of the space read state.

Format: users/{user}/spaces/{space}/spaceReadState

last_read_time

Timestamp

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

Space

The updated space.

SpaceView

A view that specifies which fields should be populated on the Space resource. To ensure compatibility with future releases, we recommend that your code account for additional values.

Перечисления
SPACE_VIEW_UNSPECIFIED The default / unset value.
SPACE_VIEW_RESOURCE_NAME_ONLY Populates only the Space resource name.
SPACE_VIEW_EXPANDED Populates Space resource fields. Note: the permissionSettings field will not be populated. Requests that specify SPACE_VIEW_EXPANDED must include scopes that allow reading space data, for example, https://www.googleapis.com/auth/chat.spaces or https://www.googleapis.com/auth/chat.spaces.readonly .

Нить

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

string

Identifier. Resource name of the thread.

Example: spaces/{space}/threads/{thread}

thread_key

string

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 name field instead.

ThreadReadState

A user's read state within a thread, used to identify read and unread messages.

Поля
name

string

Resource name of the thread read state.

Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState

last_read_time

Timestamp

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

Membership

Required. The membership to update. Only fields specified by update_mask are updated.

update_mask

FieldMask

Required. The field paths to update. Separate multiple values with commas or use * to update all field paths.

Currently supported field paths:

  • role
use_admin_access

bool

Optional. When true , the method runs using the user's Google Workspace administrator privileges.

The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege .

Requires the chat.admin.memberships OAuth 2.0 scope .

UpdateMessageRequest

Request to update a message.

Поля
message

Message

Required. Message with fields updated.

update_mask

FieldMask

Required. The field paths to update. Separate multiple values with commas or use * to update all field paths.

Currently supported field paths:

allow_missing

bool

Optional. If true and the message isn't found, a new message is created and updateMask is ignored. The specified message ID must be client-assigned or the request fails.

UpdateSectionRequest

Request message for updating a section.

Поля
section

Section

Required. The section to update.

update_mask

FieldMask

Required. The mask to specify which fields to update.

Currently supported field paths:

  • display_name

UpdateSpaceNotificationSettingRequest

Request to update the space notification settings. Only supports updating notification setting for the calling user.

Поля
space_notification_setting

SpaceNotificationSetting

Required. The resource name for the space notification settings must be populated in the form of users/{user}/spaces/{space}/spaceNotificationSetting . Only fields specified by update_mask are updated.

update_mask

FieldMask

Required. Supported field paths:

  • notification_setting

  • mute_setting

UpdateSpaceReadStateRequest

Request message for UpdateSpaceReadState API.

Поля
space_read_state

SpaceReadState

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:

  • The me alias. For example, users/me/spaces/{space}/spaceReadState .

  • Their Workspace email address. For example, users/user@example.com/spaces/{space}/spaceReadState .

  • Their user id. For example, users/123456789/spaces/{space}/spaceReadState .

Format: users/{user}/spaces/{space}/spaceReadState

update_mask

FieldMask

Required. The field paths to update. Currently supported field paths:

  • last_read_time

When the last_read_time is before the latest message create time, the space appears as unread in the UI.

To mark the space as read, set last_read_time to any value later (larger) than the latest message create time. The last_read_time is coerced to match the latest message create time. Note that the space read state only affects the read state of messages that are visible in the space's top-level conversation. Replies in threads are unaffected by this timestamp, and instead rely on the thread read state.

UpdateSpaceRequest

A request to update a single space.

Поля
space

Space

Required. Space with fields to be updated. Space.name must be populated in the form of spaces/{space} . Only fields specified by update_mask are updated.

update_mask

FieldMask

Required. The updated field paths, comma separated if there are multiple.

You can update the following fields for a space:

space_details : Updates the space's description and guidelines. You must pass both description and guidelines in the update request as SpaceDetails . If you only want to update one of the fields, pass the existing value for the other field.

display_name : Only supports updating the display name for spaces where spaceType field is SPACE . If you receive the error message ALREADY_EXISTS , try a different value. An existing space within the Google Workspace organization might already use this display name.

space_type : Only supports changing a GROUP_CHAT space type to SPACE . Include display_name together with space_type in the update mask and ensure that the specified space has a non-empty display name and the SPACE space type. Including the space_type mask and the SPACE type in the specified space when updating the display name is optional if the existing space already has the SPACE type. Trying to update the space type in other ways results in an invalid argument error. space_type is not supported with useAdminAccess .

space_history_state : Updates space history settings by turning history on or off for the space. Only supported if history settings are enabled for the Google Workspace organization. To update the space history state, you must omit all other field masks in your request. space_history_state is not supported with useAdminAccess .

access_settings.audience : Updates the access setting of who can discover the space, join the space, and preview the messages in named space where spaceType field is SPACE . If the existing space has a target audience, you can remove the audience and restrict space access by omitting a value for this field mask. To update access settings for a space, the authenticating user must be a space manager and omit all other field masks in your request. You can't update this field if the space is in import mode . To learn more, see Make a space discoverable to specific users . access_settings.audience is not supported with useAdminAccess .

permission_settings : Supports changing the permission settings of a space. When updating permission settings, you can only specify permissionSettings field masks; you cannot update other field masks at the same time. The supported field masks include:

  • permission_settings.manageMembersAndGroups
  • permission_settings.modifySpaceDetails
  • permission_settings.toggleHistory
  • permission_settings.useAtMentionAll
  • permission_settings.manageApps
  • permission_settings.manageWebhooks
  • permission_settings.replyMessages
use_admin_access

bool

Optional. When true , the method runs using the user's Google Workspace administrator privileges.

The calling user must be a Google Workspace administrator with the manage chat and spaces conversations privilege .

Requires the chat.admin.spaces OAuth 2.0 scope .

Some FieldMask values are not supported using admin access. For details, see the description of update_mask .

Пользователь

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

string

Resource name for a Google Chat user .

Format: users/{user} . users/app can be used as an alias for the calling app bot user.

For human users , {user} is the same user identifier as:

  • the id for the Person in the People API. For example, users/123456789 in Chat API represents the same person as the 123456789 Person profile ID in People API.

  • the id for a user in the Admin SDK Directory API.

  • the user's email address can be used as an alias for {user} in API requests. For example, if the People API Person profile ID for user@example.com is 123456789 , you can use users/user@example.com as an alias to reference users/123456789 . Only the canonical resource name (for example users/123456789 ) will be returned from the API.

display_name

string

Output only. The user's display name.

domain_id

string

Unique identifier of the user's Google Workspace domain.

type

Type

User type.

is_anonymous

bool

Output only. When true , the user is deleted or their profile is not visible.

Тип

Перечисления
TYPE_UNSPECIFIED Default value for the enum. DO NOT USE.
HUMAN Human user.
BOT Chat app user.

UserMentionMetadata

Annotation metadata for user mentions (@).

Поля
user

User

The user mentioned.

type

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[]

Button

A list of buttons. Buttons is also oneof data and only one of these fields should be set.

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

TextParagraph

Display a text paragraph in this widget.

image

Image

Display an image in this widget.

key_value

KeyValue

Display a key value item in this widget.

Кнопка

A button. Can be a text button or an image button.

Поля

Union field type .

type can be only one of the following:

text_button

TextButton

A button with text and onclick action.

image_button

ImageButton

A button with image and onclick action.

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

string

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[]

ActionParameter

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

string

The name of the parameter for the action script.

value

string

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

string

The URL of the image.

on_click

OnClick

The onclick action.

aspect_ratio

double

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

OnClick

The onclick action.

name

string

The name of this image_button that's used for accessibility. Default value is provided if this name isn't specified.

Union field icons . The icon can be specified by an Icon enum or a URL. icons can be only one of the following:
icon

Icon

The icon specified by an enum that indices to an icon provided by Chat API.

icon_url

string

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

string

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

string

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

bool

If the content should be multiline.

bottom_label

string

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

OnClick

The onclick action. Only the top label, bottom label, and content region are clickable.

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

Icon

An enum value that's replaced by the Chat API with the corresponding icon image.

icon_url

string

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

Button

A button that can be clicked to trigger an action.

OnClick

An onclick action (for example, open a link).

Поля

Union field data .

data can be only one of the following:

action

FormAction

A form action is triggered by this onclick action if specified.

TextButton

A button with text and onclick action.

Поля
text

string

The text of the button.

on_click

OnClick

The onclick action of the button.

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

string