欢迎讨论:飞鸽短信使用文档!

-发帖者:
-参与讨论....
【主题】:飞鸽短信使用文档

前言

飞鸽短信平台发送短信api说明:

文字短信API 是 飞鸽传书(上海)信息科技有限公司针对短信开放出的接口

采用 HTTP POST 发送模式,飞鸽传书API  主要针对用户为需要传送自定义内容以及号码的需求,即通过传递真实内容模板和短信内容以及短信签名实现短信发送

代码示例

 public void SendSms() {
        try {
            CloseableHttpClient client = null;
            CloseableHttpResponse response = null;
            try {
                List<BasicNameValuePair> formparams = new ArrayList<>();
                formparams.add(new BasicNameValuePair("Account","账号"));
			    formparams.add(new BasicNameValuePair("Pwd","接口秘钥"));//登录后台 首页显示
			    formparams.add(new BasicNameValuePair("Content","您的验证码是1234"));
			    formparams.add(new BasicNameValuePair("Mobile","138****1234"));
			    formparams.add(new BasicNameValuePair("SignId","签名id"));//登录后台 添加签名获取id	
			   
                HttpPost httpPost = new HttpPost("http://api.feige.ee/SmsService/Send");
                httpPost.setEntity(new UrlEncodedFormEntity(formparams,"UTF-8"));
                client = HttpClients.createDefault();
                response = client.execute(httpPost);
                HttpEntity entity = response.getEntity();
                String result = EntityUtils.toString(entity);
                System.out.println(result);
            } finally {
                if (response != null) {
                    response.close();
                }
                if (client != null) {
                    client.close();
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

 

 发表评论     发表时间:『2020-05-29 15:59:28』


扫描二维码关注网站最新动态