Foxtable(狐表)用户栏目专家坐堂 → [求助]阿里短信sdk引用【已解决】


  共有3971人关注过本帖树形打印复制链接

主题:[求助]阿里短信sdk引用【已解决】

帅哥哟,离线,有人找我吗?
chen37280600
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:六尾狐 帖子:1279 积分:7953 威望:0 精华:4 注册:2017/12/31 14:53:00
  发帖心情 Post By:2018/5/25 14:20:00 [显示全部帖子]

我回复一个最后能用的狐表代码

引用dll文件后, 

 

Dim product As String = "Dysmsapi"
Dim domain As String = "dysmsapi.aliyuncs.com"
Dim accessId As String = "xxx"'替换成你的
Dim accessSecret As String = "xxx"'替换成你的
Dim regionIdForPop As String = "cn-hangzhou"


Dim profile As Aliyun.Acs.Core.Profile.IClientProfile = Aliyun.Acs.Core.Profile.DefaultProfile.GetProfile(regionIdForPop, accessId, accessSecret)
Aliyun.Acs.Core.Profile.DefaultProfile.AddEndpoint(regionIdForPop, regionIdForPop, product, domain)
Dim acsClient As Aliyun.Acs.Core.IAcsClient = New Aliyun.Acs.Core.DefaultAcsClient(profile)
Dim request As Aliyun.Acs.Dysmsapi.Model.V20170525.SendSmsRequest = New Aliyun.Acs.Dysmsapi.Model.V20170525.SendSmsRequest()
Dim response As Aliyun.Acs.Dysmsapi.Model.V20170525.SendSmsResponse = Nothing

Try
    request.Ph
    request.SignName = "小桃儿网游"
    request.TemplateCode = "SMS_135796093"
    request.TemplateParam = "{""customer"":""123""}"
    request.OutId = "123"
    response = acsClient.GetAcsResponse(request)
    output.show(response.Message)
Catch ex As Exception
    output.show("error")
End Try

[此贴子已经被作者于2018/5/25 14:21:11编辑过]

 回到顶部