def sendsms_task():
client = TwilioRestClient(account_sid, auth_token)
msg = 'Toast is DONE!'
mJson = request.get_json()
if mJson is not None and 'message' in mJson:
msg = mJson['message']
for pn in phoneNumbers:
message = client.messages.create(body=msg,
to='+'+str(pn['phoneNumber']),
from_="+16783355213")
return jsonify({'task': 'sms sent'}), 201
评论列表
文章目录