def contact(intent, session):
card_title = intent['name']
session_attributes = {}
reprompt_text = None
account_sid = "AC39d9722bca359c3885bd8e876492859d"
auth_token = "222f8028aa78ffbdecbb558badf6db93"
client = TwilioRestClient(account_sid, auth_token)
speech_output = "Something went wrong, sorry."
should_end_session = True
try:
message = client.messages.create(body="Save me it's an emergency #mhacks",
to="+16478367351", # Replace with your phone number
from_="+15675100423") # Replace with your Twilio number
print(message.sid)
speech_output = "I contacted your physician"
except twilio.TwilioRestException as e:
print(e)
return build_response(session_attributes, build_speechlet_response(
card_title, speech_output, reprompt_text, should_end_session))
lambda_function.py 文件源码
python
阅读 32
收藏 0
点赞 0
评论 0
评论列表
文章目录