'客户'对象没有属性'sms'

时间:2018-03-03 05:29:35

标签: python python-2.7

我是编程学生的介绍。以下代码应该向我的手机发送短信,但是它给了我错误信息:

  

'客户'对象没有属性'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

0 个答案:

没有答案