短信签名查询

 请求URL

平台 企业ID范围 协议 请求地址
平台1 企业ID100000~199999 GET,POST http://sms.mobset.com:8095/SDK3/Sms <推荐>
https://sms.mobset.com:843/SDK3/SMS
平台2 企业ID200000~299999 GET,POST http://sms2.mobset.com:8095/SDK3/Sms <推荐>
https://sms2.mobset.com:843/SDK3/SMS
平台3 企业ID300000~399999 GET,POST http://sms3.mobset.com:8095/SDK3/Sms <推荐>
https://sms3.mobset.com:843/SDK3/SMS

 编码模式

  UTF-8

 Content-Type

  application/x-www-form-urlencoded

请求参数

参数 类型 描述 是否必须 示例
CorpID String 企业ID 305552 在短信易平台开户时为每个企业分配的唯一代码,注意企业ID与域名对应
LoginName String 登录名 admin 不能使用中文作为登录名
SecretKey String 密钥 54334a020bfeef6f9f4c395f47ed29ae 将CorpID、Password(登录密码)、TimeStamp,这三个参数以字符串形式串接在一起,然后再使用MD5加密,MD5结果为32位字符串,不限大小写。密钥:MD5(CorpID+Password+TimeStamp) + 号不需要带入加密
TimeStamp String 时间戳,用于动态加密 20250220151156 格式为YYYYMMDDHHMMSS(年月日时分秒),注意:使用24小时制北京时间,并且保证此时间与标准时间相差不超过20分钟,否则服务器会拒绝请求。
Methods String 请求方法 SmsGetSign

请求示例Postman


POST /SDK3/Sms HTTP/1.1
Host: sms3.mobset.com:8095
Content-Type: application/x-www-form-urlencoded

CorpID=305552&LoginName=admin&SecretKey=54334a020bfeef6f9f4c395f47ed29ae&TimeStamp=20250220151156&Methods=SmsGetSign


OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "CorpID=305552&LoginName=admin&SecretKey=54334a020bfeef6f9f4c395f47ed29ae&TimeStamp=20250220151156&Methods=SmsGetSign");
Request request = new Request.Builder()
  .url("http://sms3.mobset.com:8095/SDK3/Sms")
  .method("POST", body)
  .addHeader("Content-Type", "application/x-www-form-urlencoded")
  .build();
Response response = client.newCall(request).execute();
	

setUrl('http://sms3.mobset.com:8095/SDK3/Sms');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/x-www-form-urlencoded'
));
$request->addPostParameter(array(
  'CorpID' => '305552',
  'LoginName' => 'admin',
  'SecretKey' => '54334a020bfeef6f9f4c395f47ed29ae',
  'TimeStamp' => '20250220151156',
  'Methods' => 'SmsGetSign'
));
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}


var client = new RestClient("http://sms3.mobset.com:8095/SDK3/Sms");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("CorpID", "305552");
request.AddParameter("LoginName", "admin");
request.AddParameter("SecretKey", "54334a020bfeef6f9f4c395f47ed29ae");
request.AddParameter("TimeStamp", "20250220151156");
request.AddParameter("Methods", "SmsGetSign");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

返回参数

 返回类型

  JSON
参数 示例 描述
Code 0 0 取短信签名成功。其它错误,参考错误代码表。
Message 取短信签名成功 代码中文提示
Sign 广州首易 短信签名

返回示例

{
    "Code" : 0,
    "Message" : "取短信签名成功",
    "Sign" : "广州首易"
}