使用第三方平台发送短信
1、阿里云随便找个使用人数最多的接口,购买和开发文档接口参考:
2、购买之后,获取AppCode进行开发。
假定我们的AppCode为:7858a126750949e4a36371580f420413
3、先联系客服,创建短息模板,获取模板ID,假定模板ID为:908e94ccf08b4476ba6c876d13f084ad
现在要给手机号码13800138000发此模板的信息,参考代码为:
Dim s As String = "mobile=13800138000&templateId=908e94ccf08b4476ba6c876d13f084ad&smsSignId=2e65b1bb3d054466b82f0c9d125465e2¶m=**code**%3A12345%2C**minute**%3A5"
Dim hc As New HttpClient("http://gyytz.market.alicloudapi.com/sms/smsSend?" & s)
hc.Headers.Add("Authorization","APPCODE 7858a126750949e4a36371580f420413")
hc.Method = "POST"
Dim ret As String = hc.GetData
Output.Show(ret)