短信
短信

短信

接口类型:生活常用
接口状态:正常
描述:
验证码短信、营销短信,三网合一,极速响应,高并发,99%稳定性。请通过验证码、1分钟请求一次、IP限制等方式做好短信轰炸防范。验证码短信请遵循1分钟4次、1小时5次、1天8次的原则。通知、营销短信批量发送,请采用批量发送方式,具体请参考接口文档。一般情况下,使用前请先建立子账户、添加模板并进行审核,审核QQ:768996893
  • 短信发送
  • 接口地址:http://open.liupai.net/sms/send

    支持格式:JSON,JSONP

    请求方式:GET POST

    请求示例:http://open.liupai.net/sms/send?appkey=yourappsecret

    请求参数:

    参数名称 类型 必填 说明
    mobile string 手机号(不支持群发)
    content string 发送内容 模板必须是审核通过的。
    templateid int 模版ID

    返回参数:

    参数名称 类型 说明
    count string 发送成功条数
    msgid string 消息ID
    accountid int 子账号ID

    JSON返回实例:

  • 账户余额查询
  • 接口地址:http://open.liupai.net/sms/balance

    支持格式:JSON,JSONP

    请求方式:GET POST

    请求示例:http://open.liupai.net/sms/balance?appkey=yourappsecret

    请求参数:

    参数名称 类型 必填 说明
    暂无参数

    返回参数:

    参数名称 类型 说明
    accountid int 子帐号ID
    company string 公司名称
    totalnum int 总次数
    usednum int 已使用次数

    JSON返回实例:

  • 添加子帐号
  • 接口地址:http://open.liupai.net/sms/addaccount

    支持格式:JSON,JSONP

    请求方式:GET POST

    请求示例:http://open.liupai.net/sms/addaccount?appkey=yourappsecret

    请求参数:

    参数名称 类型 必填 说明
    company string 企业全称
    signature string 签名 格式【XXX】
    statusurl string 状态报告回送地址
    replyurl string 短信回送地址
    replyusername string 回送用户名
    replypassword string 回送密码
    totalnum int 分配的次数

    返回参数:

    参数名称 类型 说明
    company string 企业全称
    signature string 签名
    statusurl string 设置的状态报告回送地址
    replyurl string 设置的短信回送地址
    replyusername string 设置的回送用户名
    replypassword string 设置的回送密码
    totalnum int 分配的次数
    accountid int 子账号ID

    JSON返回实例:

  • 获取子帐号列表
  • 接口地址:http://open.liupai.net/sms/accountlist

    支持格式:JSON,JSONP

    请求方式:GET POST

    请求示例:http://open.liupai.net/sms/accountlist?appkey=yourappsecret

    请求参数:

    参数名称 类型 必填 说明
    page int 页码 默认为1
    pageSize int 每页条数 默认为20

    返回参数:

    参数名称 类型 说明
    accountid int 子帐号ID
    company string 企业名称
    signature string 签名
    statusurl string 状态报告回送地址
    replyurl string 短信回送地址
    replyusername string 回送用户名
    replypassword string 回送密码
    totalnum int 总次数
    usednum int 已使用次数
    status int 状态
    istemnocheck int 是否模板免审
    failreason string 审核失败原因
    addtime int 子账号添加时间

    JSON返回实例:

  • 更新子帐号
  • 接口地址:http://open.liupai.net/sms/editaccount

    支持格式:JSON,JSONP

    请求方式:GET POST

    请求示例:http://open.liupai.net/sms/editaccount?appkey=yourappsecret

    请求参数:

    参数名称 类型 必填 说明
    accountid int 要修改的子账号ID
    company string 企业全称
    signature string 签名 格式【XXX】
    statusurl string 状态报告回送地址
    replyurl string 短信回送地址
    replyusername string 回送用户名
    replypassword string 回送密码
    totalnum int 分配的次数

    返回参数:

    参数名称 类型 说明
    company string 企业全称
    signature string 签名
    statusurl string 设置的状态报告回送地址
    replyurl string 设置的短信回送地址
    replyusername string 设置的回送用户名
    replypassword string 设置的回送用户名 设置的回送密码
    totalnum int 分配的次数
    accountid int 子账号ID

    JSON返回实例:

  • 添加模版
  • 接口地址:http://open.liupai.net/sms/addtemplate

    支持格式:JSON,JSONP

    请求方式:GET POST

    请求示例:http://open.liupai.net/sms/addtemplate?appkey=yourappsecret

    请求参数:

    参数名称 类型 必填 说明
    accountid int 子账号ID
    title string 模板标识
    content string 模板内容 营销短信加:回TD退订。替换的内容用@代替,70个字符为一条短信。
    ismarket int 是否为营销短信 1为是,0为不是

    返回参数:

    参数名称 类型 说明
    accountid int 子账号ID
    name int 模板标识
    content string 模板内容
    templateid int 模板ID
    status int 状态
    ismarket int 是否为营销短信

    JSON返回实例:

  • 获取模版列表
  • 接口地址:http://open.liupai.net/sms/templatelist

    支持格式:JSON,JSONP

    请求方式:GET POST

    请求示例:http://open.liupai.net/sms/templatelist?appkey=yourappsecret

    请求参数:

    参数名称 类型 必填 说明
    accountid int 子账号ID
    page int 页码 默认为1
    pageSize int 每页条数 默认为20

    返回参数:

    参数名称 类型 说明
    templateid int 模板ID
    name string 模板名称
    content string 模板内容
    ismarket int 是否为营销短信
    status int 状态
    failreason string 审核失败原因
    addtime int 添加时间

    JSON返回实例:

  • 短信日志
  • 接口地址:http://open.liupai.net/sms/sendlogs

    支持格式:JSON,JSONP

    请求方式:GET POST

    请求示例:http://open.liupai.net/sms/sendlogs?appkey=yourappsecret

    请求参数:

    参数名称 类型 必填 说明
    templateid int 短信模板ID
    start_date string 开始日期
    end_date string 结束日期
    page int 当前页

    返回参数:

    参数名称 类型 说明
    sendtime string 发送时间
    mobile string 发送手机号
    message string 短信内容
    msgid int 短信回执ID
    is_ok int 短信状态

    JSON返回实例: