tClient= TwilioRestClient(sid, token)
This code throws exception:
twilio.base.obsolete.ObsoleteException: TwilioRestClient has been removed from this version of the library. Please refer to current documentation for guidance.
Can't seem to find a reference to this anywhere, this worked a few days ago!
Using python 3.7 and VS2017
use
from twilio.rest import Client
tClient= Client(sid, token)
as TwilioRestClient was deprecated.
TwilioRestClient was depreciated remove the words 'TwilioRestClient' and replace it as below:
from twilio.rest import Client
account = "Account number for Twilio"
token = "Token for Twilio Account"
client = Client(account, token)
message = client.messages.create(to="+ReceiverPhone#", from_="+TwilioPhone#",
body="Text message you are sending to receiver")
#print response back from Twilio
print message
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With