File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change 44from twilio .credential .client_credential_provider import ClientCredentialProvider
55
66ACCOUNT_SID = os .environ .get ("TWILIO_ACCOUNT_SID" )
7- API_KEY = os .environ .get ("TWILIO_API_KEY" )
8- API_SECRET = os .environ .get ("TWILIO_API_SECRET" )
9- FROM_NUMBER = os .environ .get ("TWILIO_FROM_NUMBER" )
10- TO_NUMBER = os .environ .get ("TWILIO_TO_NUMBER" )
7+ MESSAGE_SID = os .environ .get ("TWILIO_MESSAGE_SID" )
118
129CLIENT_ID = os .environ .get ("TWILIO_CLIENT_ID" )
13- CLIENT_SECRET = os .environ .get ("CLIENT_SECRET " )
10+ CLIENT_SECRET = os .environ .get ("TWILIO_CLIENT_SECRET " )
1411
1512
1613def example ():
1714 """
18- Some example usage of message resources .
15+ An example usage of message resource .
1916 """
2017 client = Client (
2118 account_sid = ACCOUNT_SID ,
2219 credential_provider = ClientCredentialProvider (CLIENT_ID , CLIENT_SECRET ),
2320 )
2421
25- msg = client .messages . create (
26- to = self . to_number , from_ = self . from_number , body = "hello world"
27- )
22+ msg = client .messages ( MESSAGE_SID ). fetch ()
23+
24+ print ( msg )
2825
2926
3027if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments