阿里鱼注册短信发送代码

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了阿里鱼注册短信发送代码相关的知识,希望对你有一定的参考价值。

第一步:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Top.Api;
using Top.Api.Request;
using Top.Api.Response;

namespace SqNum
{
public class SendMsg
{
public string SendMssage(string url,string appkey,string secret)
{
ITopClient client = new DefaultTopClient( url, appkey, secret);
AlibabaAliqinFcSmsNumSendRequest req = new AlibabaAliqinFcSmsNumSendRequest();
req.Extend = "123456";
req.SmsType = "normal";
req.SmsFreeSignName = "注册验证";
req.SmsParam = "{\"code\":\"1234\",\"product\":\"阿里大鱼\",\"item\":\"阿里大鱼\"}";
req.RecNum = "012345678";
req.SmsTemplateCode = "SMS_5087666";
AlibabaAliqinFcSmsNumSendResponse rsp = client.Execute(req);
//Console.WriteLine(rsp.Body);
return rsp.Body;
}

}
}

 第二步: 

using System;

using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Text;
using System.Threading.Tasks;

namespace SqNum
{
class Program
{
static void Main(string[] args)
{
//NumHelper numHelper = new SqNum.NumHelper();
//string str = numHelper.getRNum();
//Console.WriteLine(str);
//Console.ReadKey();


// RedisHelper redisHelper = new RedisHelper();
//redisHelper.TestRedis();

SendMsg sm = new SendMsg();
string res = sm.SendMssage("http://gw.api.taobao.com/router/rest", "000000", "000000");
Console.WriteLine(res);
Console.ReadKey();
}
}
}

 

 

附录:阿里大鱼官网:http://www.alidayu.com/ 

以上是关于阿里鱼注册短信发送代码的主要内容,如果未能解决你的问题,请参考以下文章

如何用 Flutter 实现混合开发?闲鱼公开源代码实例

阿里短信服务的使用流程

阿里云之如何使用阿里大鱼给喜欢的人发短信

Java之使用阿里云发短信项目案例以及源代码

Java之使用阿里云发短信项目案例以及源代码

go 发送短信研究