Comments (9)
const { default: Dysmsapi20170525 } = require("@alicloud/dysmsapi20170525");
const { Config } = require("@alicloud/openapi-client");
const { default: Credential } = require("@alicloud/credentials");
const config = new Config({
credential: new Credential(),
regionId: "cn-shanghai",
protocol: "http",
accessKeyId: process.env.ACCESS_KEY_ID,
accessKeySecret: process.env.ACCESS_KEY_SECRET,
});
const dysmsapiClient = new Dysmsapi20170525(config);
let ts = await dysmsapiClient.sendSms({
phoneNumbers: 111111111,
signName: "xxx",
templateCode: "SMS_111111",
templateParam: `{"code":"${c.code}"}`,
});
经过测试,能跑。
把头部三个包装下。
@yqz0203 @Ccheng2729111 @JacksonTian @denverdino
from alibabacloud-typescript-sdk.
阿里云的文档和客户端都非常差,不介意可以试试最近封装的一个 client,基础功能有了,接口定义还在开发生成工具
https://github.com/wenerme/wode/tree/main/packages/client#alicloud
from alibabacloud-typescript-sdk.
笑死
同感,阿里真是没落了,很简单东西,搞得巨复杂,文档写得一坨ss
from alibabacloud-typescript-sdk.
同感
from alibabacloud-typescript-sdk.
同感,一个那么简单的东西写的比专利还难懂,牛逼
from alibabacloud-typescript-sdk.
试了半天,终于跑起来了,文档确实一坨屎。 @Ccheng2729111
import dingtalk from '@alicloud/dingtalk';
// @ts-ignore
let client = new dingtalk.oauth2_1_0.default({
protocol: 'https',
regionId: 'central',
});
const getAccessTokenRequest = new dingtalk.oauth2_1_0.GetAccessTokenRequest({
appKey: 'xxx',
appSecret:
'xxxx',
});
try {
const res = await client.getAccessToken(getAccessTokenRequest);
console.log(res.body.accessToken,res.body.expireIn);
} catch (err) {
console.log(err);
}
from alibabacloud-typescript-sdk.
同感,一个那么简单的东西写的比专利还难懂,牛逼
可能我们的水平都太低了。 😄
from alibabacloud-typescript-sdk.
能把一个短信包封装这么好,文档写的如此专业化,我相信阿里会引领世界100年不动摇
from alibabacloud-typescript-sdk.
阿里的确走下坡路了,就如同现在的淘宝,上比不了JD下比不了拼多多
from alibabacloud-typescript-sdk.
Related Issues (18)
- afs package error: ENOENT: no such file or directory, open '/package.json'
- where can I find cas-20210222 HOT 1
- proxy 无效 HOT 2
- 太坑了,没有 `.toMap()` 永远小写参数传过去 HOT 1
- TS版SDK完全无法使用,可以补一下文档吗 HOT 3
- dingtalk的nodejs sdk无法按照示例代码run HOT 1
- Alibaba Cloud Sts SDK for NodeJS === TypeScript/Node.js SDK instructions ? HOT 1
- 钉钉outgoing机器人如何快速回复? HOT 1
- 上传媒体文件没做接口吗 HOT 2
- 调用SDK报错:nodejs.TypeError: Cannot read properties of undefined (reading 'getAccessKeyId')
- 编译cjs, esm 产物 HOT 1
- @alicloud/bailian20230601 包在next.js14的框架中,进行流式数据请求之前获取token的时候会进行报错 HOT 1
- 有些不理解为什么v2.0版本调用一个发送短信接口需要引入4个包
- SLS 没有 PutLogs 接口
- oss ListObjects 服务器响应的是 xml,gateway-oss 在只有一个对象时 parseXml 解析结果的不是数组,会报错 type of contents is mismatch, expect array, but object
- oss PutObject 需要使用 commonHeaders 中的 Content-Type 作为参数,但是 gateway-oss 会强行设为 application/octet-stream
- @alicloud/cdn20180510 2.7w行不给文档,恶心谁呢?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alibabacloud-typescript-sdk.