我是编程学生的介绍。以下代码应该向我的手机发送短信,但是它给了我错误信息:
'客户'对象没有属性'sms'
from twilio.rest import Client
# Your Account Sid and Auth Token from twilio.com/user/account
account_sid = "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
auth_token = "42xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
client = Client(account_sid, auth_token)
message = client.sms.messages.create(
body="Hello!",
to="+19545555555", # Replace with your phone number
from_="+17725555555") # Replace with your twilio number
print message.sid