如何通过特威利奥中的蟒蛇/烧瓶 API 编辑特威利奥帐户的“呼叫进来”网络钩子,以使用这种类型的功能?account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'auth_token = 'your_auth_token'client = Client(account_sid, auth_token)# example functionality:# number = client.incoming_phone_numbers.list()[0]# number.webhook.voice_a_call_comes_in = 'https://myurl.com'
1 回答
斯蒂芬大帝
TA贡献1827条经验 获得超8个赞
请参阅下面的代码:
# Your Account Sid and Auth Token from twilio.com/console
# DANGER! This is insecure. See http://twil.io/secure
from twilio.rest import Client
account_sid = 'ACdefg5dxxxxxxeeb8beaba1234567890'
auth_token = 'SECRET'
client = Client(account_sid, auth_token)
incoming_phone_number = client \
.incoming_phone_numbers('PN0185dd75921b77441c0af9e9123456789') \
.update(
voice_url='https://example.com'
)
print(incoming_phone_number.friendly_name)
添加回答
举报
0/150
提交
取消