首页 > 移动平台 > 详细

Python 阿里大于发送手机验证码

时间:2018-01-06 12:57:25      阅读:191      评论:0      收藏:0      [点我收藏+]

1.安装阿里大于的包

pip install top

2.事例脚本

# -*- coding: utf-8 -*-
import top.api

appkey = 2353xxxx
secret = e25296e930689453b6f577e5xxxxxxxx
req = top.api.AlibabaAliqinFcSmsNumSendRequest()
req.set_app_info(top.appinfo(appkey, secret))


req.extend = "123456"
req.sms_type = "normal"
req.sms_free_sign_name = "繁华网络"
req.sms_param = "{code:‘1234‘}"
req.rec_num = "1814439xxxx"
req.sms_template_code = "SMS_2629xxxx"
try :
     resp = req.getResponse()
     print (resp)
except Exception,e:
     print (e)

3.成功返回事例

{u‘alibaba_aliqin_fc_sms_num_send_response‘: {u‘result‘: {u‘msg‘: u‘OK‘, u‘model‘: u‘969322615209028960^0‘, u‘success‘: True, u‘err_code‘: u‘0‘}, u‘request_id‘: u‘2ewzkt9g9c2a‘}}

Python 阿里大于发送手机验证码

原文:https://www.cnblogs.com/fanhua999/p/8213731.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!