短信接口 短信验证码 短信通知 短信群发【106全国三网】

106三网短信接口,3秒极速,安全稳定。低至3分一条。适用于验证码短信、触发短信、短信通知、会员短信提醒等应用,支持199/166/177等最新号段。专注短信行业8年运营与技术积累,7x24小时技术服务。

使用期限

价格

1
用户评价: 暂无评价

购买人数:8

规格与周期

1.00元/28次”,“一年

联系电话

服务保障

精选优质服务商
7*8小时在线客服
专业测试保证品质
退款售后无忧
API文档

创信_短信通知_短信验证码_短信群发接口

调用地址:https://service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com/release/chuangxinsms/dxjk

请求方式:GET

返回类型:JSON

API调用: API调用说明(secret_id & secret_key)

去调试

请求参数(Headers)

名称
类型
是否必须
描述
暂无数据

请求参数(Qurey)

名称
类型
是否必须
描述
content
string
短信内容
mobile
string
发送目标手机号码

请求参数(Body)

名称
类型
是否必须
描述
暂无数据

请求示例

import urllib2, ssl, datetime, hmac, base64, hashlib

host = 'service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com'
url = 'https://service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com/release'
path = '/chuangxinsms/dxjk'
source = 'source'
method ='GET'
querys = "content=%E3%80%90%E5%88%9B%E4%BF%A1%E3%80%91%E4%BD%A0%E7%9A%84%E9%AA%8C%E8%AF%81%E7%A0%81%E6%98%AF%EF%BC%9A5873%EF%BC%8C3%E5%88%86%E9%92%9F%E5%86%85%E6%9C%89%E6%95%88%EF%BC%81&mobile=13568813957";
GMT_FORMAT = '%a, %d %b %Y %H:%M:%S GMT'

#云市场分配的密钥Id
SecretId='xxx'
#云市场分配的密钥Key
SecretKey='xxx'
dateTime = datetime.datetime.utcnow().strftime(GMT_FORMAT)
auth = "hmac id=\"" + SecretId + "\", algorithm=\"hmac-sha1\", headers=\"date source\", signature=\""
signStr = "date: " + dateTime + "\n" + "source: " + source
sign = hmac.new(SecretKey, signStr, hashlib.sha1).digest()
sign = base64.b64encode(sign)
sign = auth + sign + "\""

url = url + path + '?' + querys
request = urllib2.Request(url)

request.add_header('Authorization', sign)
request.add_header('Host', host)
request.add_header('Source', 'source')
request.add_header('Date', dateTime)
request.add_header('X-Requested-With', 'XMLHttpRequest')
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
response = urllib2.urlopen(request, context=ctx)
content = response.read()
if (content):
    print(content)
curl -v -X GET https://service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com/release/chuangxinsms/dxjk ?content=【创信】你的验证码是:5873,3分钟内有效!&mobile=13568813957-H 'Host:service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com' -H 'Source:source' -H 'Date:Mon, 19 Mar 2018 12:08:40 GMT' -H 'Authorization:hmac id = "AKIDi6qE41WgJ9w8h4h9zq68Vq24d1beIuN0qIwU", algorithm = "hmac-sha1", headers = "date source", signature = yMCxXNytW5nvVGNZ8aBtRxmiLJ4=' -H 'X-Requested-With:XMLHttpRequest' 
//请用云市场分配给您的密钥计算签名并放入请求头,Date为当前的GMT时间
<?php
$host = 'service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com';
$url = 'https://service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com/release';
$path = '/chuangxinsms/dxjk';
$method = 'GET';
$source = 'source';

#云市场分配的密钥Id
$SecretId = 'xxx';
#云市场分配的密钥Key
$SecretKey = 'xxx';
$dateTime = gmdate('D, d M Y H:i:s T');
$auth = 'hmac id="' . $SecretId . '", algorithm="hmac-sha1", headers="date source", signature="';
$signStr = 'date: ' . $dateTime . "\n" . 'source: ' . $source;
$sign = base64_encode(hash_hmac('sha1', $signStr, $SecretKey, true));
$sign = $auth . $sign . '"';

$querys = "content=%E3%80%90%E5%88%9B%E4%BF%A1%E3%80%91%E4%BD%A0%E7%9A%84%E9%AA%8C%E8%AF%81%E7%A0%81%E6%98%AF%EF%BC%9A5873%EF%BC%8C3%E5%88%86%E9%92%9F%E5%86%85%E6%9C%89%E6%95%88%EF%BC%81&mobile=13568813957";
$url = $url . $path . "?" . $querys;

$headers = array(
    "Host: $host",
    'Accept: text/html, */*; q=0.01',
    "Source: $source",
    "Date: $dateTime",
    "Authorization: $sign",
    'X-Requested-With: XMLHttpRequest',
    'Accept-Encoding: gzip, deflate, sdch'
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $method);
$data = curl_exec($ch);
if (curl_errno($ch)) {
    echo "Error: " . curl_error($ch);
} else {
    // Show me the result
    var_dump($data);
    curl_close($ch);
}
using System.IO;
using System.Text;
using System.Net;
using System.Net.Security;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System;

public class CsharpTest
{
    public static String HMACSHA1Text(String EncryptText, String EncryptKey)
    {
            HMACSHA1 hmacsha1 = new HMACSHA1();
            hmacsha1.Key = System.Text.Encoding.UTF8.GetBytes(EncryptKey);

            byte[] dataBuffer = System.Text.Encoding.UTF8.GetBytes(EncryptText);
            byte[] hashBytes = hmacsha1.ComputeHash(dataBuffer);
            return Convert.ToBase64String(hashBytes);
    }

    public static void Main(String[] args)
    {
        String url = "https://service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com/release";
        String host = "service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com";
        String path = "/chuangxinsms/dxjk";
        String method = "GET";
        String querys = "content=%E3%80%90%E5%88%9B%E4%BF%A1%E3%80%91%E4%BD%A0%E7%9A%84%E9%AA%8C%E8%AF%81%E7%A0%81%E6%98%AF%EF%BC%9A5873%EF%BC%8C3%E5%88%86%E9%92%9F%E5%86%85%E6%9C%89%E6%95%88%EF%BC%81&mobile=13568813957";
        String source = "source";

        //云市场分配的密钥Id
        String  secretId = "xxx";
        //云市场分配的密钥Key
        String  secretKey = "xxx";

        String dt = DateTime.UtcNow.GetDateTimeFormats('r')[0]; //Mon, 19 Mar 2018 12:00:44 GMT
        url = url + path + "?" + querys;

        String signStr = "x-date: " + dt + "\n" + "source: " + source;
        String sign = HMACSHA1Text(signStr, secretKey);

        String auth = "hmac id=\"" + secretId + "\", algorithm=\"hmac-sha1\", headers=\"x-date source\", signature=\"";
        auth = auth + sign + "\"";
        Console.WriteLine(auth + "\n");

        HttpWebRequest httpRequest = null;
        HttpWebResponse httpResponse = null;

        if (url.Contains("https://"))
        {
            ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
            httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));
        }
        else
        {
            httpRequest = (HttpWebRequest)WebRequest.Create(url);
        }

        httpRequest.Method = method;
        httpRequest.Headers.Add("Authorization", auth);
        httpRequest.Headers.Add("Source", source);
        httpRequest.Headers.Add("X-date", dt);

        try
        {
            httpResponse = (HttpWebResponse)httpRequest.GetResponse();
        }
        catch (WebException ex)
        {
            httpResponse = (HttpWebResponse)ex.Response;
        }

        Console.WriteLine(httpResponse.StatusCode);
        Console.WriteLine(httpResponse.Headers);
        Stream st = httpResponse.GetResponseStream();
        StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));
        Console.WriteLine(reader.ReadToEnd());
        Console.WriteLine("\n");

    }

    public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
    {
        return true;
    }
}
package main

import (
    "time"
    "fmt"
    "crypto/hmac"
    "crypto/sha1"
    "io"
    "io/ioutil"
    "encoding/base64"
    "net/http"
)


func calcAuthorization(source string, secretId string, secretKey string) (sign string, dateTime string, err error) {
    timeLocation, _ := time.LoadLocation("Etc/GMT")
    dateTime = time.Now().In(timeLocation).Format("Mon, 02 Jan 2006 15:04:05 GMT")
    sign = fmt.Sprintf("x-date: %s\nsource: %s", dateTime, source)
    fmt.Println(sign)

    //hmac-sha1
    h := hmac.New(sha1.New, []byte(secretKey))
    io.WriteString(h, sign)
    sign = fmt.Sprintf("%x", h.Sum(nil))
    sign = string(h.Sum(nil))
    fmt.Println("sign:", fmt.Sprintf("%s", h.Sum(nil)))

    //base64
    sign = base64.StdEncoding.EncodeToString([]byte(sign))
    fmt.Println("sign:", sign)

    auth := fmt.Sprintf("hmac id=\"%s\", algorithm=\"hmac-sha1\", headers=\"x-date source\", signature=\"%s\"",
        secretId, sign)
    fmt.Println("auth:", auth)

    return auth, dateTime, nil
}

func main () {

    //云市场分配的密钥Id
    SecretId := "xxx"
    //云市场分配的密钥Key
    SecretKey := "xxx"
    source := "source"

    sign, dateTime, err := calcAuthorization(source, SecretId, SecretKey)
    if err != nil {
        fmt.Println(err)
        return
    }

    defaultDomain := "service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com"
    path := "/chuangxinsms/dxjk"
    query := "content=%E3%80%90%E5%88%9B%E4%BF%A1%E3%80%91%E4%BD%A0%E7%9A%84%E9%AA%8C%E8%AF%81%E7%A0%81%E6%98%AF%EF%BC%9A5873%EF%BC%8C3%E5%88%86%E9%92%9F%E5%86%85%E6%9C%89%E6%95%88%EF%BC%81&mobile=13568813957"
    url := "https://service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com/release"
    reqUrl := url + path + "?" + query
    client := &http.Client{
        Timeout: 7 * time.Second,//set timeout
    }

    req, err := http.NewRequest("GET", reqUrl, nil) //set body
    if err != nil {
        fmt.Println(err)
        return
    }

    req.Header.Set("Accept", "*/*")
    req.Header.Set("Accept-Charset", "utf-8;")
    req.Header.Set("Host", defaultDomain)
    req.Header.Set("Source", source)
    req.Header.Set("X-Date", dateTime)
    req.Header.Set("Authorization", sign)

    resp, err := client.Do(req)
    if err != nil {
        fmt.Println(err)
        return
    }
    defer resp.Body.Close()

    fmt.Println("status code:", resp.StatusCode)

    //get resp header
    var headerMsg string
    for key, _ := range resp.Header {
        headerMsg += fmt.Sprintf("\n%s:%s", key, resp.Header.Get(key))
    }
    fmt.Println(headerMsg)

    body, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        fmt.Println(err)
        return
    }

    fmt.Println(string(body))
}
import java.io.*;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.text.SimpleDateFormat;
import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.URL;
import java.net.URLConnection;
import java.net.HttpURLConnection;
import sun.misc.BASE64Encoder;

class test
{
    public static String sign(String secret, String timeStr)
        throws NoSuchAlgorithmException, UnsupportedEncodingException, InvalidKeyException {
        //get signStr
        String signStr = "date: " + timeStr + "\n" + "source: " + "source";
        //get sig
        String sig = null;
        Mac mac1 = Mac.getInstance("HmacSHA1");
        byte[] hash;
        SecretKeySpec secretKey = new SecretKeySpec(secret.getBytes("UTF-8"), mac1.getAlgorithm());
        mac1.init(secretKey);
        hash = mac1.doFinal(signStr.getBytes("UTF-8"));
        sig = new BASE64Encoder().encode(hash);
        System.out.println("signValue--->" + sig);
        return sig;
    }

    public static void main(String[] args) {
        String result = "";
        BufferedReader in = null;

        //get current GMT time
        Calendar cd = Calendar.getInstance();
        SimpleDateFormat sdf = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss 'GMT'", Locale.US);
        sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
        String timeStr = sdf.format(cd.getTime());

        String host = "service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com";
        String path = "/chuangxinsms/dxjk";
        String query = "content=%E3%80%90%E5%88%9B%E4%BF%A1%E3%80%91%E4%BD%A0%E7%9A%84%E9%AA%8C%E8%AF%81%E7%A0%81%E6%98%AF%EF%BC%9A5873%EF%BC%8C3%E5%88%86%E9%92%9F%E5%86%85%E6%9C%89%E6%95%88%EF%BC%81&mobile=13568813957";
        String url = "https://service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com/release";
        url = url + path + "?" + query;
        String source = "source";


        //云市场分配的密钥Id
        String secretId = "xxx";
        //云市场分配的密钥Key
        String secretKey = "xxx";

        try {
            String urlNameString = url;
            URL realUrl = new URL(urlNameString);
            // 打开和URL之间的连接
            URLConnection connection = realUrl.openConnection();
            HttpURLConnection httpUrlCon = (HttpURLConnection)connection;
            // 设置通用的请求属性
            httpUrlCon.setRequestProperty("Host", host);
            httpUrlCon.setRequestProperty("Accept", "text/html, */*; q=0.01");
            httpUrlCon.setRequestProperty("Source", source );
            httpUrlCon.setRequestProperty("Date", timeStr);
            String sig = sign(secretKey,timeStr);
            String authen = "hmac id=\"" + secretId + "\", algorithm=\"hmac-sha1\", headers=\"date source\", signature=\"" + sig + "\"";
            System.out.println("authen --->" + authen);
            httpUrlCon.setRequestProperty("Authorization", authen);
            httpUrlCon.setRequestProperty("X-Requested-With", "XMLHttpRequest");
            httpUrlCon.setRequestProperty("Accept-Encoding", "gzip, deflate, sdch");
            // 建立实际的连接
            httpUrlCon.connect();
            // 获取所有响应头字段
            Map<String, List<String>> map = httpUrlCon.getHeaderFields();
            // 遍历所有的响应头字段
            for (String key : map.keySet()) {
                System.out.println(key + "--->" + map.get(key));
            }
            // 定义 BufferedReader输入流来读取URL的响应
            in = new BufferedReader(new InputStreamReader(
            httpUrlCon.getInputStream()));
            String line;
            while ((line = in.readLine()) != null) {
                result += line;
            }

            System.out.println(result);

        } catch (Exception e) {
            System.out.println("发送GET请求出现异常!" + e);
            e.printStackTrace();
        }
        // 使用finally块来关闭输入流
        finally {
            try {
                if (in != null) {
                    in.close();
                }
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
    }
}
/**
 * npm install crypto-js axios
 */
var CryptoJS = require("crypto-js");
var axios = require('axios');

var nowDate = new Date();
var dateTime = nowDate.toGMTString();

var host = "service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com";
var path = "/chuangxinsms/dxjk";
var query = "content=%E3%80%90%E5%88%9B%E4%BF%A1%E3%80%91%E4%BD%A0%E7%9A%84%E9%AA%8C%E8%AF%81%E7%A0%81%E6%98%AF%EF%BC%9A5873%EF%BC%8C3%E5%88%86%E9%92%9F%E5%86%85%E6%9C%89%E6%95%88%EF%BC%81&mobile=13568813957";
var url = "https://service-as6enjfz-1256237604.ap-shanghai.apigateway.myqcloud.com/release";
url = url + path + "?" + query;
var source = "source";

//云市场分配的密钥Id
var secretId = "xxx";
//云市场分配的密钥Key
var secretKey = "xxx";

var auth = "hmac id=\"" + secretId + "\", algorithm=\"hmac-sha1\", headers=\"x-date source\", signature=\"";
var signStr = "x-date: " + dateTime + "\n" + "source: " + source;
var sign = CryptoJS.HmacSHA1(signStr, secretKey)
console.log(sign.toString())
sign = CryptoJS.enc.Base64.stringify(sign)
sign = auth + sign + "\""
console.log(sign)

var instance = axios.create({
    baseURL: url,
    timeout: 5000,
    headers: {
        "Source": source,
        "X-date": dateTime,
        "Authorization": sign
    },
    withCredentials: true
});


instance.get()
    .then(function (response) {
        console.log(response);
    })
    .catch(function (error) {
        console.log(error);
    });

正常返回示例

{
  "ReturnStatus": "Success",
  "Message": "ok",
  "RemainPoint": 420842,
  "TaskID": 18424321,
  "SuccessCounts": 1
}

失败返回示例

{
  "ReturnStatus": "Faild",
  "Message": "短信必须带【】格式签名",
  "RemainPoint": 0,
  "TaskID": 0,
  "SuccessCounts": 0
}

返回码定义

返回码
返回信息
描述
10000
参数异常
必传参数有空值
10001
手机号格式不正确
手机号应为11位手机号
10002
重复调用
由于网络原因重复调用接口
10003
参数错误
参数错误请注意核实
10004
系统内部错误
系统内部错误
产品详情

商品详情

71e8ed43f6fa7016767a9581fab6dce8.png
7cdcf31a1b970d5f2f4d5e04125a1df6.png


接口说明:


1、 短信测试可使用默认短信固定模板:【创信】你的验证码是:5873,3分钟内有效!。报备正式短信内容模板,请联系QQ:748894874。非工作时间报备电话支持:13568813957。

2、 报备模板短信内容中变量用*代替,其中变量为自定义,开发者自由实现逻辑。 

3、 短信格式:【签名】+内容,“签名”可根据自己公司的名称或简称自定义,3-8个字符,比如:公司名、产品名、商城名称、APP名称、系统名称等等。不可以是纯数字、电话号码或者网址,不可以是无意义的签名,比如:“温馨提示”“测试”等。

4、 短信计费方式:发手机一条为70个字。标点、数字、英文都算一个字符。 

5、 操作步骤:选择购买套餐,联系客服配置短信模板,设置参数/测试接口,上线应用服务开展。

6、 短信内容不要包含特殊字符及违反国家相关法律法规内容。


短信内容模板参考:


1、 【创信】验证码为:****,欢迎注册平台!

2、 【创信】您好,***,您已成功订购:****元,订单号:*****,我们会尽快安排发货,祝您购物愉快!

3、 【创信】***您好,您的货物已由***快递公司发出,单号***,请注意查收。

4、 【创信】尊敬的**会员:您于***年***月***日在*****消费***元,余额***元,祝您旅居愉快!


售后支持:


1、联系QQ:748894874

2、非工作时间电话:18980062919


评价详情
暂无评价
购买记录
联系电话

18980062919

联系客服
请提前登录QQ,以获得更好体验

创信客服

服务时间

09:00-22:00

联系邮箱

748894874@qq.com

1
立即购买
联系方式

联系电话

18980062919

在线客服

创信客服

服务时间

09:00-22:00

联系邮箱

748894874@qq.com
必须同意使用协议才可购买