不错呦!smile@林凯西,确保“准备文件”中的几个文件都有安装,S...您好,看了您这篇帖子觉得很有帮助。但是有个问题想请...我的修改过了怎么还被恶意注册呢 @jjjjiiii 用PJ快9年了,主要是A...PJ3啊,貌似很少有人用PJ了,现在不是WP就是z...@332347365,我当时接入时错误码没有-10...楼主,ChkValue值应为-103是什么意思呢?...大哥 你最近能看到我发的信息,请跟我联系,我有个制...
阿里云短信验证码发送接口地址及调用示例
编辑:dnawo 日期:2019-10-22
一、阿里云短信验证码发送接口地址
阿里云短信验证码套餐:https://www.aliyun.com/acts/alicomcloud/new-discount
1、接口地址
2、请求参数
3、返回数据
4、错误码列表
二、阿里云短信验证码发送接口调用示例
相关链接
[1].阿里云通信-短信服务:https://www.aliyun.com/acts/alicomcloud/new-discount
[2].短信发送API SendSms:https://help.aliyun.com/document_detail/101414.html
[3].短信服务地址:https://help.aliyun.com/document_detail/101511.html
[4].短信服务API 错误码:https://help.aliyun.com/document_detail/101346.html
[5].安装.NET SDK:https://help.aliyun.com/document_detail/112145.html
阿里云短信验证码套餐:https://www.aliyun.com/acts/alicomcloud/new-discount
1、接口地址
引用内容
http(s)://dysmsapi.aliyuncs.com/?PhoneNumbers=13200000000&SignName=阿里云&TemplateCode=SMS_153055065&<公共请求参数>
2、请求参数
3、返回数据
复制内容到剪贴板 程序代码
{
"Message":"OK",
"RequestId":"2184201F-BFB3-446B-B1F2-C746B7BF0657",
"BizId":"197703245997295588^0",
"Code":"OK"
}
"Message":"OK",
"RequestId":"2184201F-BFB3-446B-B1F2-C746B7BF0657",
"BizId":"197703245997295588^0",
"Code":"OK"
}
4、错误码列表
二、阿里云短信验证码发送接口调用示例
复制内容到剪贴板 程序代码
//NuGet安装aliyun-net-sdk-core
using System;
using System.Text;
using Aliyun.Acs.Core;
using Aliyun.Acs.Core.Profile;
using Aliyun.Acs.Core.Exceptions;
using Aliyun.Acs.Core.Http;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
IClientProfile profile = DefaultProfile.GetProfile("cn-hangzhou", "<accessKeyId>", "<accessSecret>");
DefaultAcsClient client = new DefaultAcsClient(profile);
CommonRequest request = new CommonRequest();
request.Method = MethodType.POST;
request.Domain = "dysmsapi.aliyuncs.com";
request.Version = "2017-05-25";
request.Action = "SendSms";
// request.Protocol = ProtocolType.HTTP;
request.AddQueryParameters("PhoneNumbers", "13200000000");
request.AddQueryParameters("SignName", "MZWU_COM");
request.AddQueryParameters("TemplateCode", "SMS_123456789");
request.AddQueryParameters("TemplateParam", "{\"code\":\"1024\"}");
try
{
CommonResponse response = client.GetCommonResponse(request);
Console.WriteLine(Encoding.Default.GetString(response.HttpResponse.Content));
}
catch (ServerException e)
{
Console.WriteLine(e);
}
catch (ClientException e)
{
Console.WriteLine(e);
}
Console.ReadKey();
}
}
}
using System;
using System.Text;
using Aliyun.Acs.Core;
using Aliyun.Acs.Core.Profile;
using Aliyun.Acs.Core.Exceptions;
using Aliyun.Acs.Core.Http;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
IClientProfile profile = DefaultProfile.GetProfile("cn-hangzhou", "<accessKeyId>", "<accessSecret>");
DefaultAcsClient client = new DefaultAcsClient(profile);
CommonRequest request = new CommonRequest();
request.Method = MethodType.POST;
request.Domain = "dysmsapi.aliyuncs.com";
request.Version = "2017-05-25";
request.Action = "SendSms";
// request.Protocol = ProtocolType.HTTP;
request.AddQueryParameters("PhoneNumbers", "13200000000");
request.AddQueryParameters("SignName", "MZWU_COM");
request.AddQueryParameters("TemplateCode", "SMS_123456789");
request.AddQueryParameters("TemplateParam", "{\"code\":\"1024\"}");
try
{
CommonResponse response = client.GetCommonResponse(request);
Console.WriteLine(Encoding.Default.GetString(response.HttpResponse.Content));
}
catch (ServerException e)
{
Console.WriteLine(e);
}
catch (ClientException e)
{
Console.WriteLine(e);
}
Console.ReadKey();
}
}
}
相关链接
[1].阿里云通信-短信服务:https://www.aliyun.com/acts/alicomcloud/new-discount
[2].短信发送API SendSms:https://help.aliyun.com/document_detail/101414.html
[3].短信服务地址:https://help.aliyun.com/document_detail/101511.html
[4].短信服务API 错误码:https://help.aliyun.com/document_detail/101346.html
[5].安装.NET SDK:https://help.aliyun.com/document_detail/112145.html
上一篇: 建瓯市东游镇行政村户数和人口数
下一篇: Windows10删除此电脑3D对象/视频/图片/文档/下载/音乐/桌面7个文件夹
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
最新日志:
下一篇: Windows10删除此电脑3D对象/视频/图片/文档/下载/音乐/桌面7个文件夹
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
最新日志:
评论: 0 | 引用: 0 | 查看次数: 7184
发表评论
请登录后再发表评论!