Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. from twilio.rest import Client
  2.  
  3. account_sid = '' # Found on Twilio Console Dashboard
  4. auth_token = '' # Found on Twilio Console Dashboard
  5.  
  6. myPhone = '+' # Phone number you used to verify your Twilio account
  7. TwilioNumber = '' # Phone number given to you by Twilio
  8.  
  9. client = Client(account_sid, auth_token)
  10.  
  11. def send_message_motion():
  12. client.messages.create(
  13. to=myPhone,
  14. from_=TwilioNumber,
  15. body='Motion Detected' + u'\U0001f680')
  16.  
  17. def send_message_flame():
  18. client.messages.create(
  19. to=myPhone,
  20. from_=TwilioNumber,
  21. body='ALERRTTTTT!! FLAME Detected' + u'\U0001f525')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement