Foxtable(狐表)用户栏目专家坐堂 → 腾讯云短信


  共有3110人关注过本帖平板打印复制链接

主题:腾讯云短信

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


加好友 发短信
等级:三尾狐 帖子:655 积分:7725 威望:0 精华:0 注册:2013/12/11 17:49:00
腾讯云短信  发帖心情 Post By:2021/5/7 9:07:00 [只看该作者]

请问老师 下面代码 在foxtable 要怎么写?

Imports System
Imports System.Threading.Tasks
Imports TencentCloud.Common
Imports TencentCloud.Common.Profile
Imports TencentCloud.Sms.V20190711
Imports TencentCloud.Sms.V20190711.Models

Namespace TencentCloudExamples
    Class SendSms
        Private Shared Sub Main1(ByVal args As String())
            Try
                Dim cred As Credential = New Credential With {
                    .SecretId = "xxx",
                    .SecretKey = "xxx"
                }
                Dim clientProfile As ClientProfile = New ClientProfile()
                clientProfile.SignMethod = ClientProfile.SIGN_TC3SHA256
                Dim httpProfile As HttpProfile = New HttpProfile()
                httpProfile.ReqMethod = "GET"
                httpProfile.Timeout = 10
                httpProfile.Endpoint = "sms.tencentcloudapi.com"
                httpProfile.WebProxy = Environment.GetEnvironmentVariable("HTTPS_PROXY")
                clientProfile.HttpProfile = httpProfile
                Dim client As SmsClient = New SmsClient(cred, "ap-guangzhou", clientProfile)
                Dim req As SendSmsRequest = New SendSmsRequest()
                req.SmsSdkAppid = "1400787878"
                req.Sign = "xxx"
                req.ExtendCode = "x"
                req.SenderId = ""
                req.SessionContext = ""
                req.PhoneNumberSet = New String() {"+8613711112222"}
                req.TemplateID = "449739"
                req.TemplateParamSet = New String() {"666"}
                Dim resp As SendSmsResponse = client.SendSmsSync(req)
                Console.WriteLine(AbstractModel.ToJsonString(resp))
            Catch e As Exception
                Console.WriteLine(e.ToString())
            End Try

            Console.Read()
        End Sub
    End Class
End Namespace

 回到顶部
总数 15 1 2 下一页