This notebook goes over how to use the Twilio API wrapper to send a text message.
To use this tool you need to install the Python Twilio package
# !pip install twilio
You’ll also need to set up a Twilio account and get your credentials. You’ll need your Account String Identifier (SID) and your Auth Token. You’ll also need a number to send messages from.
You can either pass these in to the TwilioAPIWrapper as named parameters
from_number, or you can set the environment variables
Sending a message#
from langchain.utilities.twilio import TwilioAPIWrapper
twilio = TwilioAPIWrapper( # account_sid="foo", # auth_token="bar", # from_number="baz," )
twilio.run("hello world", "+16162904619")