正在使用的python版本中不包含TwilioRestClient,对于更高版本的python,还有其他选择吗?我正在尝试编写一个简单的python代码,该代码可以将短信发送到电话号码。
我已经尝试了这段代码。但是它抛出了这样的错误错误:“ TwilioRestClient已从此版本的库中删除。请参考当前文档以获取指导”
from twilio.rest import TwilioRestClient
# put your own credentials here
ACCOUNT_SID = "ACb6d8a2109308b5d4eab82ee56"
AUTH_TOKEN = "a073d775497d71fa626af3487"
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
client.messages.create(
to="+xxxxxxxxxxx",
from_="+xxxxxxxxx",
body=" this is my message:do you copy",
status_callback="http://postb.in/1234abcd"
)
from twilio.rest import TwilioRestClient
# put your own credentials here
ACCOUNT_SID = "ACb6d8a2109308b5d4eab82ee56a67e66a"
AUTH_TOKEN = "a073d775497d71fa626af3487f06a1b9"
client = TwilioRestClient(ACCOUNT_SID, AUTH_TOKEN)
client.messages.create(
to="+xxxxxxxxxxx",
from_="+xxxxxxxxx",
body=" this is my message:do you copy",
status_callback="http://postb.in/1234abcd"
)
我希望收到指定电话号码的邮件。