SendMessages发送短信接口功能描述: 2019-01-03 22:34:14 分类:公司动态
文章标签| 短信平台| 验证码短信接口平台| 群发短信平台| 106短信平台| 国际短信验证码接口|
请求地址是客户接口程序调用的时候请求的url地址,采用的是http post接口,当发生变化的时候,会通知接口用户

 

 

1、功能描述:发送短信接口


参数说明


发送短信接口功能描述:

 

返回一个信息编号(16位)


返回只要不是返回 “负数” (一串编号是成功)就是成功


<?xml version="1.0" encoding="utf-8" ?> 
<string xmlns="http://tempuri.org/">0808191630319344</string>
Asp.net示例
WebService.Service1 ws = new WebService.Service1();
txtResult.Text = ws.SendMessages(用户名, 密码,手机号码, 短信内容, "");

 

 

2、 Sendvoice


功能描述:发送语音接口


参数说明

 

 

语音短信接口

 

返回一个信息编号(16位)


<?xml version="1.0" encoding="utf-8" ?> 
<string xmlns="http://tempuri.org/">0808191530315247</string>

 

 

 

 

 

Asp.net短信接口示例

 


WebService.Service1 ws = new WebService.Service1();
try
        {
            byte[] buffer;
            if (RadioButtonList1.SelectedValue=="3")
            {
                string path = fupFvFilePath.FileName.ToString();
                if (fupFvFilePath.FileName == "")
                {
                    txtResult.Text="请选择语音文件。格式为.WAV 大小不要超过 2M";                 
                    return;
                }
                else
                {               
                    int i = fupFvFilePath.FileName.LastIndexOf(".");
                      //取得文档扩展名
                    string newext = fupFvFilePath.FileName.Substring(i+1).ToLower();
                    if (!newext.Equals("wav"))
                    {
                        txtResult.Text = "语音文件格式不正确";
                        return;
                    }

                }
                FileStream fs = new FileStream(fupFvFilePath.PostedFile.FileName, FileMode.Open);
                buffer = new byte[fs.Length];
                fs.Read(buffer, 0, buffer.Length);
                fs.Close();

            }
            else
            {
                buffer = new byte[0];
            }
      
            WebService.Service1 ws = new WebService.Service1();

            txtResult.Text = ws.SendVoice(txtUID.Text, this.txt_PWD.Text, this.txtFvTo.Text, this.txtFv.Text, RadioButtonList1.SelectedValue.ToString(), buffer, txtSvrNo.Text, "", "");

        }
        catch
        {
            txtResult.Text = "出错了";
   }
        finally
        {
            // fs.Close();
        }

 

请求地址是客户接口程序调用的时候请求的url地址,采用的是http post接口,地址是
http://193.112.55.83:8868/callApi.aspx
入口地址一般不会发生变化,当发生变化的时候,会通知接口用户