twilio 如何获取可能的用户

2024-02-08

我从服务器检索了访问令牌并连接了 JavaScript SDK 聊天客户端,例如so https://www.twilio.com/docs/chat/initializing-sdk-clients#javascript_1。我创建了一个类似的频道。下一步我想邀请这样的用户。在该示例中,他们邀请用户“elmo”。我在哪里可以获得“elmo”,或者如何向用户展示一系列可能的“elmo”?这客户端SDK http://media.twiliocdn.com/sdk/js/chat/releases/3.0.2/docs/没有列表用户功能。

Edit:
It looks like the REST API has a list users method. But can't find any examples of it used. Should the 1st person chat client be using the REST API as well to supplement gaps in the client SDK or should it get the identity from backend? Our team has different interpretations of the docs: twilio REST API is strictly for backend vs. twilio REST API can and should be used any where. Moved to twilio REST API: strictly backend? https://stackoverflow.com/questions/53598372/twilio-rest-api-strictly-backend


这里是 Twilio 开发者布道者。

在我看来,Twilio 的聊天 API 不应该成为系统中用户的中心事实来源。除了您在此处编写的内容之外,我对您的应用程序一无所知,但我希望您在自己的系统中有一个用户模型,您已使用该模型来生成或创建一个身份,然后由聊天 API 使用以及您的用户如何登录您的系统。然后,我将使用该用户模型来连接用户并提供他们的身份,以便他们可以一起加入聊天。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

twilio 如何获取可能的用户 的相关文章

随机推荐