【问题标题】:Twilio converstation Cannot read properties of undefined (reading 'myConversationsRead')Twilio 转换无法读取未定义的属性(读取 \'myConversationsRead\')
【发布时间】:2022-10-20 17:06:21
【问题描述】:

使用 Twilio JS SDK 并尝试通过 getConversationBySid() 方法访问对话。

const client = new Client(tokenValue);
let value=await client.getConversationBySid(conversationSID)

但出现错误 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'myConversationsRead') 谁能帮我解决这个问题?

【问题讨论】:

  • 你好,我也遇到了同样的问题,请问你有没有弄清楚是什么原因造成的?

标签: reactjs twilio


【解决方案1】:

这个错误是正确的。您需要等待客户端初始化,如文档中所述。

https://sdk.twilio.com/js/conversations/releases/2.2.0/docs/classes/Client.html#constructor

【讨论】:

    猜你喜欢
    • 2021-04-15
    • 2023-03-11
    • 2022-01-15
    • 2021-12-31
    • 2021-12-13
    • 2021-11-28
    • 2021-11-15
    • 2021-11-06
    • 2021-11-20
    相关资源
    最近更新 更多