2023年7月31日发(作者:)

WebService接口说明

Ver 1.0

四川恒光科技信息有限公司

2006.5

一、 调用地址

二、 接口定义

1( SendSMS 发送短信

a. 定义

public SendResult SendSMS(string Username, string Password, string

Content, string

Numbers)

b. 参数

参数 说明

Username 所分配的用户名

Password 密码

Content 短信内容。70字以内

Numbers 目标号码。以逗号(,)分隔。一万条以内

c. 返回值

public class SendResult {

///

/// 发送状态(0:成功;-102:余额不足;-201:用户名/密码错误)

///

public int State; ///

/// 短信编号

///

public string SID;

}

2( QuerySMS 查询短信发送状态

a. 定义

public QueryResult QuerySMS(string Username, string Password, string

SID)

b. 参数

参数 说明

Username 所分配的用户名

Password 密码

SID 短信编号 c. 返回值

public class QueryResult {

///

/// 查询状态(0:成功;-201:用户名/密码错误;-203:编号错误)

///

public int QueryState;

///

/// 发送总数

///

public int Total;

///

/// 成功数

///

public int Success;

///

/// 发送状态

///

public int SendState;

///

/// 内容

///

public string Content;

///

/// 失败号码

///

public string[] FailedNum;

}

3( QueryRest 查询余额

a. 定义

public RestResult QueryRest(string Username, string Password)

b. 参数

参数 说明

Username 所分配的用户名

Password 密码 c. 返回值

public class RestResult { ///

/// 状态(0:成功;-201:用户名/密码错误)

///

public int State;

///

/// 余额

///

public int Count; }

4( ChangePwd 修改密码

a. 定义

public int ChangePwd(string Username, string OldPwd, string NewPwd)

b. 参数

参数 说明

Username 所分配的用户名

OldPwd 原密码

NewPwd 新密码 c. 返回值

0:成功

-201:用户名/原密码错误

5( ReceiveSMS 接收上行短信

a. 定义

public ReceiveResult ReceiveSMS(string Username, string Password)

b. 参数

参数 说明

Username 所分配的用户名 Password 密码 c. 返回值

public class ReceiveResult {

///

/// 状态(0:成功;-201:用户名/密码错误)

///

public int State;

///

/// 总数

///

public int Count;

///

/// 来源

///

public string[] From;

///

/// 内容

///

public string[] Content;

///

/// 时间

///

public string[] Time; }

三、 常见问题

1. 每个号码之间使用半角逗号(,)分隔。 2. 请做好号码有效性检查。对于无效号码在提交时不会提示且所扣额不会返还。

3. 对于短信字数超出限制所引起的后果请自行负责。

4. 查询发送状态请在发送后间隔5秒以上进行。

2023年7月31日发(作者:)

WebService接口说明

Ver 1.0

四川恒光科技信息有限公司

2006.5

一、 调用地址

二、 接口定义

1( SendSMS 发送短信

a. 定义

public SendResult SendSMS(string Username, string Password, string

Content, string

Numbers)

b. 参数

参数 说明

Username 所分配的用户名

Password 密码

Content 短信内容。70字以内

Numbers 目标号码。以逗号(,)分隔。一万条以内

c. 返回值

public class SendResult {

///

/// 发送状态(0:成功;-102:余额不足;-201:用户名/密码错误)

///

public int State; ///

/// 短信编号

///

public string SID;

}

2( QuerySMS 查询短信发送状态

a. 定义

public QueryResult QuerySMS(string Username, string Password, string

SID)

b. 参数

参数 说明

Username 所分配的用户名

Password 密码

SID 短信编号 c. 返回值

public class QueryResult {

///

/// 查询状态(0:成功;-201:用户名/密码错误;-203:编号错误)

///

public int QueryState;

///

/// 发送总数

///

public int Total;

///

/// 成功数

///

public int Success;

///

/// 发送状态

///

public int SendState;

///

/// 内容

///

public string Content;

///

/// 失败号码

///

public string[] FailedNum;

}

3( QueryRest 查询余额

a. 定义

public RestResult QueryRest(string Username, string Password)

b. 参数

参数 说明

Username 所分配的用户名

Password 密码 c. 返回值

public class RestResult { ///

/// 状态(0:成功;-201:用户名/密码错误)

///

public int State;

///

/// 余额

///

public int Count; }

4( ChangePwd 修改密码

a. 定义

public int ChangePwd(string Username, string OldPwd, string NewPwd)

b. 参数

参数 说明

Username 所分配的用户名

OldPwd 原密码

NewPwd 新密码 c. 返回值

0:成功

-201:用户名/原密码错误

5( ReceiveSMS 接收上行短信

a. 定义

public ReceiveResult ReceiveSMS(string Username, string Password)

b. 参数

参数 说明

Username 所分配的用户名 Password 密码 c. 返回值

public class ReceiveResult {

///

/// 状态(0:成功;-201:用户名/密码错误)

///

public int State;

///

/// 总数

///

public int Count;

///

/// 来源

///

public string[] From;

///

/// 内容

///

public string[] Content;

///

/// 时间

///

public string[] Time; }

三、 常见问题

1. 每个号码之间使用半角逗号(,)分隔。 2. 请做好号码有效性检查。对于无效号码在提交时不会提示且所扣额不会返还。

3. 对于短信字数超出限制所引起的后果请自行负责。

4. 查询发送状态请在发送后间隔5秒以上进行。