如何通过Python编辑“呼叫进来”语音网络钩子在Twilio中?

如何通过特威利奥中的蟒蛇/烧瓶 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'


慕仙森
浏览 78回答 1
1回答

斯蒂芬大帝

请参阅下面的代码:# Your Account Sid and Auth Token from twilio.com/console# DANGER! This is insecure. See http://twil.io/securefrom twilio.rest import Clientaccount_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)
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Python