Der Python Bot.py kann mit Ngrok Textnachrichten von meinem Computer senden. Der Python Bot.py kann die Textnachricht auch über einen virtuellen Server auf Pythonanywhere.com versenden
Code: Select all
#Send text message only
#create twilio client using the account_sid, auth_token
client = Client(account_sid, auth_token)
message = client.messages.create(
to= from_number, # to phone number
from\_=to_number,# from phone number
body= return_body # return_body is the text to send
)
Code: Select all
#Sending a text message and image URLs
#create twilio client using the account_sid, auth_token
client = Client(account_sid, auth_token)
message = client.messages.create(
to= from_number, #to phone number
from\_=to_number, # from phone number
body= return_body, # return_body is the text to send
media_url=\['https://www.example.com/images/logo.jpg', 'https://www.example.com/bot/Help-Desk.jpg'\] # send the image Url's
)
Mobile version