Ruby短信验证码接口调用文档

创蓝253短信平台---Ruby接口调用demo
# 该代码仅供学习和研究接口使用,只是提供了一个参考

require 'typhoeus'

# 发送短信接口URL,如无必要,该参数可不用修改
api_send_url="http://222.73.117.156/msg/HttpBatchSendSM"
# ,替换成您自己的帐号
account="xxxxxx"
# 替换成您自己的密码
pswd="xxxxxx"

body={account:account,pswd:pswd,mobile:"13800138000",msg:"您好,您的验证码是1234",needstatus:"true"}

resp=Typhoeus::Request.post(api_send_url,body:body)
puts resp.body

猜你喜欢

转载自2880608198.iteye.com/blog/2413108