【发布时间】:2017-08-27 17:06:22
【问题描述】:
我正在使用 Plivo,一种语音/短信 API。 它目前已正确设置并在我的服务器上运行,但我的编码员无法再处理它,所以我正在努力应对。
我需要一个基本的一步一步来做以下事情:
1: 创建 150 个脚本
使用以下模板:
import plivo
auth_id = "Your AUTH_ID"
auth_token = "Your Auth_TOKEN"
p = plivo.RestAPI(auth_id, auth_token)
params = {
'src': '1111111111', # Sender's phone number with country code
'dst' : '2222222222<3333333333', # Receivers' phone numbers with country code. The numbers are separated by "<" delimiter.
'text' : "Hi, from Plivo" # Your SMS Text Message
}
response = p.send_message(params)
# Print the entire response
print str(response)
# Sample sucessful output
# (202, {
# u'message': u'message(s) queued',
# u'message_uuid': [
# u'2d55d550-8a73-11e4-9bd8-22000afa12b9',
# u'2d5617e0-8a73-11e4-89de-22000ae885b8'
# ],
# u'api_id': u'2d30af46-8a73-11e4-96e3-22000abcb9af'
# }
# )
# Print only the status code
print response[0]
# Sample successful output
# 202
# Print the message uuid
print response[1]['message_uuid']
a)src 需要为每个脚本 1 个,取自 150# 列表
b)dest 需要为每个脚本 200,取自一个巨大的列表文件
然后我需要能够使用命令运行脚本 001..150。
附:请记住,我对一般编码知之甚少。 我基本了解,但我不主动编码。
谢谢!
【问题讨论】:
-
“我不知道我在做什么,我希望你帮我用 TXT 向人们发送垃圾邮件”,不,谢谢。祝你好运
-
短信营销是合法的...
标签: python bash debian sms plivo