No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
wilddog
.gitignore
README.md
requirements.txt
setup.py

README.md

wilddog-sms

Wilddog SMS SDK for Python

Getting started

安装:

download the source code (ZIP) for sms-sdk-python, and then run:

python setup.py install

不同环境下,可能需要root或sudo权限执行

初始化

from wilddog import SmsClient

smsclinet = SmsClient('YOUR_APPID', 'SMS_KEY')

发送验证码短信

使用野狗生成验证码

mobile = 'PHONE1'
templateId = 'YOUR_TEMPLATE_ID'
res = smsclient.send_code(mobile, templateId, None)

使用自生成验证码

templateId = 'YOUR_TEMPLATE_ID'
mobiles = 'PHONE1'
params = "['Var1', 'Var2']"
res = smsclient.send_code(mobile, templateId, params)

校验验证码

mobile = 'PHONE1'
code = 'USER CAPTCHA'
res = smsclient.check_code(mobile, code)

发送通知短信

templateId = 'YOUR_TEMPLATE_ID'
mobiles = '["PHONE1", "PHONE2"]'
params = "['Var1', 'Var2']"
res = smsclinet.send_notify(mobiles, templateId, params)

查询发送状态

rrid = 'The rrid in send_code/send_notify response'
res = smsclient.query_status(rrid)

查询账户余额

res = smsclient.query_balance()