企业微信接受消息 API 的设置

Server 可以用本地 VSCode 端口转发加 VSCode 自带的内网穿透来实现, 代码如下:

typescript 复制代码
import crypto from "node:crypto"
import { decrypt } from "@wecom/crypto"
export default defineEventHandler((event) => {
  const { msg_signature, timestamp, nonce, echostr } = getQuery(event)
  const shasum = crypto.createHash("sha1")
  const token = "---"
  const encodingAesKey = "---"
  shasum.update([token, timestamp, nonce, echostr].sort().join(""))
  const str = shasum.digest("hex")
  if (str !== msg_signature) {
    return "error"
  }
  const { message } = decrypt(encodingAesKey, echostr as string)
  return message
})
相关推荐
沉默王二2 天前
用Codex+iLink Bot API给Agent接入微信,基于这个开源Skill
微信·agent·claude
Szime2 天前
小批量电子元器件采购为什么更难?从研发打样到试产交付
微信
五月君_3 天前
安卓也支持了!微信链接 Claude Code 保姆级教程
android·微信
人道领域3 天前
为什么iPhone微信聊天记录搜不到“?“,而安卓可以。
android·微信·iphone
weikecms6 天前
消费返物业费 + 小区本地生活 CPS 系统|微客云(物业 / 社区 / 本地服务商首选)
人工智能·微信·微客云
Thomas_YXQ7 天前
Unity3D Addressable 深度优化热更性能消耗
开发语言·3d·unity·微信
@Ma7 天前
企业微信外部群机器人接入 AI:一套能落地的工程方案
微信·机器人
2601_961194028 天前
27考研资料|免费全套|电子版
考研·百度·微信·pdf·微信公众平台·facebook·新浪微博
凌奕9 天前
微信小程序接入微信 AI:让用户"说一句话"就能下单
微信·微信小程序·agent
弓乙图10 天前
弓乙歌/岐黄真源赋
经验分享·微信