短信免费接口调用

url = 'http://v.juhe.cn/sms/send'
res = Net::HTTP.post_form(
  URI.parse(url),
  key: "1232121",
  mobile: phone,
  tpl_id: 1304,
  tpl_value: '#code#=' + captcha,
  dtype: 'json'
)
reuslt = JSON.parse(res.body)

posted @ 2021-01-29 11:01  吕兴杰  阅读(318)  评论(0编辑  收藏  举报