基于gewechat制作第一个微信聊天机器人

Gewe 个微框架

GeWe(个微框架)是一个创新性的软件开发框架,为个人微信号以及企业信息安全提供了强大的功能和保障。GeWe的设计旨在简化开发过程,使开发者能够高效、灵活地构建和定制通信协议,以满足不同应用场景的需求。

请求参数

Header 参数

复制代码
export interface ApifoxModel {
    "X-GEWE-TOKEN": string;
    [property: string]: any;
}

Body 参数application/json

复制代码
export interface ApifoxModel {
    /**
     * 设备ID
     */
    appId: string;
    /**
     * 发送类接口返回的createTime
     */
    createTime: string;
    /**
     * 发送类接口返回的msgId
     */
    msgId: string;
    /**
     * 发送类接口返回的newMsgId
     */
    newMsgId: string;
    /**
     * 好友/群的ID
     */
    toWxid: string;
    [property: string]: any;
}

示例

复制代码
{
    "appId": "",
    "toWxid": "34757816141@chatroom",
    "msgId": "769533801",
    "newMsgId": "5271007655758710001",
    "createTime": "1704163145"
}

示例代码

复制代码
curl --location --request POST 'http://api.geweapi.com/gewe/v2/api/message/revokeMsg' \
--header 'X-GEWE-TOKEN: ' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Content-Type: application/json' \
--data-raw '{
    "appId": "",
    "toWxid": "34757816141@chatroom",
    "msgId": "769533801",
    "newMsgId": "5271007655758710001",
    "createTime": "1704163145"
}'

返回响应

成功(200)

HTTP 状态码: 200 内容格式: JSONapplication/json

数据结构

复制代码
export interface ApifoxModel {
    msg: string;
    ret: number;
    [property: string]: any;
}

示例

复制代码
{
    "ret": 200,
    "msg": "操作成功"
}
相关推荐
前端付豪21 小时前
LangChain链 写一篇完美推文?用SequencialChain链接不同的组件
人工智能·python·langchain
曲幽21 小时前
FastAPI实战:打造本地文生图接口,ollama+diffusers让AI绘画更听话
python·fastapi·web·cors·diffusers·lcm·ollama·dreamshaper8·txt2img
老赵全栈实战1 天前
Pydantic配置管理最佳实践(一)
python
考虑考虑1 天前
JDK25模块导入声明
java·后端·java ee
_小马快跑_1 天前
Java 的 8 大基本数据类型:为何是不可或缺的设计?
java
阿尔的代码屋1 天前
[大模型实战 07] 基于 LlamaIndex ReAct 框架手搓全自动博客监控 Agent
人工智能·python
Re_zero1 天前
线上日志被清空?这段仅10行的 IO 代码里竟然藏着3个毒瘤
java·后端
洋洋技术笔记1 天前
Spring Boot条件注解详解
java·spring boot
AI探索者2 天前
LangGraph StateGraph 实战:状态机聊天机器人构建指南
python
AI探索者2 天前
LangGraph 入门:构建带记忆功能的天气查询 Agent
python