由于 'Your administrator prevented you from talking to bots in direct messages',无法向机器人发送消息

Cannot message bot due to 'Your administrator prevented you from talking to bots in direct messages'

我们有一个简单的视频群聊机器人,已经运行了几个月。从昨天开始,1 或 2 位用户表示他们在与机器人交谈时收到一条错误消息,指出:'Your administrator prevented you from talking to bots in direct messages'。在过去的 24 小时内,越来越多的人报告说这个问题开始发生在他们身上,直到每个人都遇到。今天早些时候发生在我身上时,我给机器人发送了两次消息,间隔大约 5 分钟,第一次有效,然后第二次我收到了管理员阻止的消息。

我测试了@meet 和@drive 机器人,它们似乎仍然有效。

我已确认 none 的机器人设置已更改,最重要的是 'Bot works in direct messages' 选项仍处于选中状态。

我已经与我们的 IT 管理员谈过,他说我们的 GSuite 设置中没有任何设置更改。

查看文档,我找不到任何会导致上述错误的问题或设置。有谁知道可能导致上述情况的原因。

Google支持声明

(...) if your domain currently applies a whitelist to restrict the set of G Suite Marketplace apps that users can install, existing internal bots may stop working. In order to appear and continue to function for users, the developers of these bots need to publish the bots to the domain as you can see on link. (...)

解决方案

如前所述Jordansan,此问题与域管理和安全增强有关。您仍然可以使用最多 5 个电子邮件地址来进行测试。一旦您想要您的机器人 public,您将需要将其列在 G Suite Marketplace 上。

为此,请遵循本指南 Listing your bot on G Suite Marketplace。下面提供了摘录:

G Suite Marketplace publication steps

This section tells you the specific steps you need to perform to publish your bot on G Suite Marketplace. The general steps are:

  1. Create an OAuth client ID, if your project doesn't already have one.
  2. Add the G Suite Marketplace SDK to your project and populate its configuration tab.
  3. Populate the SDK's publish tab and submit.

The detailed steps for each of these are described in the following paragraphs.

出于安全原因,大多数组织都启用了(并且应该启用)白名单,这将防止在组织内启用非 white-listed 市场应用程序。

要部署您的机器人,您需要联系您的 GCP 负责人并请他将您的机器人列入白名单

临时解决方案

您可以做的是让组织中的每个人都可以访问该机器人。假设可以发布机器人。

如果机器人不应该 public,您可以实施自己的连接器来过滤传入的查询并仅允许选定的电子邮件地址。但是,该机器人仍会在搜索屏幕上向所有人显示,并且每个人都可以向其发送消息。

我在这里开了工单:https://issuetracker.google.com/issues/137266964

编辑:我们按照此处列出的步骤完成了这项工作:https://developers.google.com/hangouts/chat/how-tos/gsm-list 和我们的 GSuite 管理员 white-listed 供内部使用的 Bot。这消除了 5 个用户的限制,并为所有其他机器人和 GSuite 应用程序保留当前安全设置

您的域可能使用了一项新功能,该功能要求将机器人列入白名单。这是在最近的更新中引入的。以前,管理员设置是二进制的,因为您可以允许所有机器人或 none。现在,如果该域的管理员设置需要白名单,则必须将任何第二方机器人列入白名单。

您可以在此处找到更多信息:https://support.google.com/a/answer/6089179