Twilio 可编程聊天 - 旧聊天的访问被拒绝(代码:54007)

发布于 2025-01-10 14:32:24 字数 869 浏览 0 评论 0原文

我们在项目中使用 Twilio 可编程聊天已有一年。在移动端我们使用twilio-chat v.6.0.0 SDK。在后端,我们使用 java 库 - com.twilio.sdk:twilio:7.51.0

问题

但是几天前,我们开始在移动端遇到授权问题。当我们创建新的聊天并与他们合作时,一切都很好。

但是,当我们尝试获取旧聊天消息(在该问题之前创建)时,我们收到以下错误身份访问被禁止(状态:403,代码:54007)

我们尝试过的内容

  • 我们尝试升级/降级移动 SDK 和后端库。
  • 我已阅读代码:54007 文档。我们从未配置过任何同步服务,可能它们是引入的并且没有为旧聊天正确配置?
  • 我们只有一项最近(自动)创建的同步服务,并且启用 ACL 标志设置为false

Twilio 同步服务设置

这是我们的访问令牌的结构: 访问令牌结构

我的猜测是最近聊天 API 中的权限发生了一些变化,默认配置对我们不起作用。

我不知道具体是什么。请帮忙。

We are using Twilio Programmable Chat on our project for 1 year. On the mobile side we use twilio-chat v.6.0.0 SDK. On the backend side we use java library - com.twilio.sdk:twilio:7.51.0

Problem

But a couple of days ago we started experiencing problems with authorization on the mobile side. Everything is ok when we create new chats and work with them.

But when we try to fetch messages for the old chats (created before that problems), we receive the following error access forbidden for identity (status: 403, code: 54007)

What we tried

  • We tried to upgrade/downgrade both mobile SDK and backend libraries.
  • I've read the code: 54007 documentation. We have never configured any Sync services, possible they were introduced and not properly configured for the old chats?
  • We have only one Sync service that was created (automatically) recently and ACL enabled flag is set to false.

Twilio sync service settings

Here is the structure of our access token:
Access token structure

My guess is that something has recently been changed with the permissions in the Chat API and the default config is not working for us.

I don't know exactly what it could be. Please, help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

醉城メ夜风 2025-01-17 14:32:24

在我们的例子中,当我们尝试为用户不是错误:身份访问被禁止(状态:403,代码:54007)成员的通道获取消息时,我们遇到了相同的错误。 Twilio SDK twilio-chat 6.0.0 和 4.1.0 就发生过这种情况。

在查看 Twilio 控制台中的“角色和权限”部分后,我们注意到与另一个子帐户相比,“服务用户”(聊天用户的默认用户角色)没有激活“editChannelAttributes”权限仍然可以为未加入的通道获取消息。

为服务用户激活权限“editChannelAttributes”并获取消息似乎再次起作用。

我不确定此权限和获取消息之间的联系可能是什么,但也许此信息仍然有帮助。

In our case we got the same error when trying to fetch messages for a channel where the user is not a member of Error: Access forbidden for identity (status: 403, code: 54007). This happened with Twilio SDK twilio-chat 6.0.0 and 4.1.0.

After we reviewed the "Roles and Permissions" section in the Twilio Console we noticed that the "service user" (which is the default user role for the chat user) did not have the permission "editChannelAttributes" activated, as compared to another sub account where fetching messages for unjoined channels was still possible.

Activating the permission "editChannelAttributes" for the service user and fetching messages seems to work again.

I'm not sure what the connection between this permission and fetching messages could be, but maybe this information is still helpful.

毁虫ゝ 2025-01-17 14:32:24

这是 Twillio 支持的官方答复,为我们提供了帮助:

最近,工程团队有效地对可编程聊天进行了一些修改;在此更改之前,用户将能够看到他们不属于的频道消息。通过此更新,如果用户尝试读取自己不是其成员的任何频道,他们将收到聊天错误代码 54007。

This is the official answer from Twillio Support that helped us:

Recently the engineering team has effectively deployed some modifications over Programmable Chat; before this change, users would be able to see channel messages that they were not part of. With this update, users will receive error code 54007 for Chat if they try to read any channel that they are not a member of.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文