How to use Ruby to call Chuanglan 253 SMS verification code

Very simple, here is the code example:

# This code is only used for learning and research interfaces, it just provides a reference

 

require 'typhoeus'

 

# Send SMS interface URL, if not necessary, this parameter does not need to be modified

api_send_url="http://222.73.117.156/msg/HttpBatchSendSM"

# Create a blue account, replace it with your own account

account="xxxxxx"

# Create a blue password, replace it with your own password

pswd="xxxxxx"

 

body={account:account,pswd:pswd,mobile:"13800138000",msg:"Hello, your verification code is 1234",needstatus:"true"}

 

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

puts resp.body

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324900054&siteId=291194637