top
,通过pip
进行安装:pip install top
import top.api
app_key = 'APP KEY'
app_secret = 'APP SECRET'
req = top.setDefaultAppInfo(app_key,app_secret)
req = top.api.AlibabaAliqinFcSmsNumSendRequest()
req.extend = ""
req.sms_type = 'normal'
req.sms_free_sign_name = '签名名称'
# 给模版的参数
req.sms_param = "{code:'%s'}" % telphone_captcha
req.rec_num = telphone.decode('utf-8').encode('ascii')
req.sms_template_code = '模版的ID'
try:
resp = req.getResponse()
print resp
except Exception,e:
print e
入驻后会有10元代金券。可以完成最基本的短信发送测试功能。如果作为一个公司实际项目,则建议购买套餐,地址如下:点击进入。