有没有使用restapi向Twilio频道添加用户的方法?在
from twilio.rest import Client
# Initialize the client
account = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
token = "your_auth_token"
client = Client(account, token)
# Update the channel
user = client.chat \
.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").users.list()[0]
channel = client.chat \
.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
.channels("CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").list()[0]
# How to add user to channel?
Twilio开发者布道者。
你可以add a member to a channel by creating a member resource using your user's identity。因此,根据您的代码,您需要:
如果有帮助请告诉我。
相关问题 更多 >
编程相关推荐