###前提・実現したいこと
Pythonモジュールを使ってTwilioでSMSを送信したい。
実装中に以下のエラーメッセージが発生しました。
Windowsにアナコンダをインストールして使っています。
###発生している問題・エラーメッセージ
Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> twilio_cli=TwilioRestClient(account_SID,auth_token) File "Anaconda3\lib\site-packages\twilio\base\obsolete.py", line 20, in new_func .format(func.__name__) twilio.base.obsolete.ObsoleteException: TwilioRestClient has been removed from this version of the library. Please refer to current documentation for guidance.
###該当のソースコード
Python
1from twilio.rest import TwilioRestClient 2account_SID='ACxxxxxxxxxxxxxxxxxxxxxxxxx' 3auth_token='xxxxxxxxxxxxxxxxxxxxxxxxxxxx' 4twilio_cli=TwilioRestClient(account_SID,auth_token)
と打ち込むとエラーが出る。
###試したこと
Twilioアカウントの登録。Twilioモジュールのインストール。
###補足情報(言語/FW/ツール等のバージョンなど)
Python
1from twilio.rest import TwilioRestClient 2account_SID='ACxxxxxxxxxxxxxxxxxxxxxxxxx' 3auth_token='xxxxxxxxxxxxxxxxxxxxxxxxxxxx' 4twilio_cli=TwilioRestClient(account_SID,auth_token) 5my_twilio_number='+12345678901' 6my_cell_phone='+819012345678' 7message=twilio_cli.messages.create(body='hello',from_=my_twilio_number,to=my_cell_phone)
実行するにあたっての全ソースコードです。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/09/04 10:24