1.2.2 • Published 3 years ago

wecom-msg-manage v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

wecom-msg-manage

企业微信应用接发消息控制

安装模块

npm install wecom-msg-manage

导入模块

  • js
WxCom = require('wecom-msg-manage');
  • ts
import { WxCom } from "wecom-msg-manage";

使用模块

  • 初始化企业微信应用对象
const wxcom = new WxCom(
    AgentId,         //应用AgentId
    Secret,          //应用Secret
    CId,             //企业ID
    token,           //接收消息服务器Token
    EncodingAESKey,  //接收消息服务器EncodingAESKey
    )                
  • 验证URL有效性
return await wxcom.MsgTest(echostr)//传入echostr
  • 解密传入信息(当请求方式为POST时可用)
const decode = await wxcom.MsgDecode(
    receBody,        //传入主体
    msg_signature,   //传入签名
    timestamp,       //传入时间戳
    nonce,           //传入nonce
    )
  • 获取Token
var Token = wxcom.GetToken()

TODO

  • 添加发送消息功能
1.2.0

3 years ago

1.2.2-beta5

3 years ago

1.2.2-beta4

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.2-beta1

3 years ago

1.2.2-beta3

3 years ago

1.2.2-beta2

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago