# ai-wechat-bot **Repository Path**: jetaoou/ai-wechat-bot ## Basic Information - **Project Name**: ai-wechat-bot - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-02-07 - **Last Updated**: 2025-02-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
## 基本用法(java示例)
- 其他语言执行restful接口可实现相同功能,支持各类语言接入。
```
//1、程序部署完成后先获取接口token
JSONObject token = LoginApi.getToken();
//2、token获取成功后将token值放入header即可访问api,每个api都需要校验token
header.put("X-GEWE-TOKEN",token);
/**
*3、 获取登录二维码
* @param appId 设备id 首次登录传空,后续登录传返回的appid
*/
JSONObject qr = LoginApi.getQr(appid, proxy);
/**
* 4、确认登陆
* @param appId
* @param uuid 取码返回的uuid
* @param captchCode 登录验证码(必须同省登录才能避免此问题,也能使账号更加稳定)
*/
JSONObject jsonObject = LoginApi.checkQr(appId, proxyIp, uuid, captchCode);
//5、第四步执行完成则表示微信已登录,执行下列类中的方法可实现不同功能
LoginApi.class //登录模块
PersonalApi.class //个人账号模块
ContactApi.class //联系人模块
GroupApi.class //微信群模块
MessageApi.class //消息模块
LabelApi.class //标签模块
FavorApi.class //收藏夹模块
```
## 注意事项:
- 1、系统环境推荐:Centos7或Ubantu2204
- 2、硬件环境推荐:4核8G
- 3、由于容器需要用到2531和2532端口,要保证服务器这两个端口没有被占用
- 4、容器启动后会访问腾讯服务,因此要保证服务器能够访问外网,并且出网没有被限制,否则会导致容器无法正常启动
- 5、使用者必须搭建服务到同省服务器或者电脑里方可正常使用
- 6、本框架面向个人娱乐使用,请勿用于任何商用场景
[//]: # (## 交流群:)
[//]: # ()
[//]: # ()
[//]: # (
)
[//]: # (
) [//]: # ( 添加好友备注GW加群交流) [//]: # (
) ## 后续有新版本如何更新 ### 更新流程 ``` 1、选择更新版本下载 2、将文件解压至服务器root目录 3、执行命令 chmod +x install-gewe.sh ./install-gewe.sh ``` ## 友情链接 - [gewechaty](https://github.com/mikoshu/gewechaty) 基于nodejs二次封装gewechat的易用框架 - [rgewe-api](https://github.com/momo402/rgewe-api) 基于rust语言封装gewechat的api接口,同步API web页面文档 - [gewechat-python](https://github.com/hanfangyuan4396/gewechat-python) python实现的gewechat api接口 - [dify-on-wechat](https://github.com/hanfangyuan4396/dify-on-wechat) 对chatgpt-on-wechat项目扩展,实现了gewechat channel ## 特别鸣谢 * [gewe](https://github.com/Devo919/Gewechat)该项目的大力支持 ## 版本更新 ### 1.0.1 * 兼容图片下载 * 更新方式:重新拉镜像部署即可,需注意,本次更新后是新设备登录 ### 1.0.0 * 正式1.0版本发布