Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
lykops
lykchat
Repository navigation
Code
Issues
3
(3)
Pull requests
2
(2)
Actions
Projects
Wiki
Security and quality
Insights
More
items
Files
Expand file tree
v3.0
Breadcrumbs
lykchat
/
doc
/
help
/
微信接口.md
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
55 lines (31 loc) · 2.17 KB
v3.0
Breadcrumbs
lykchat
/
doc
/
help
/
微信接口.md
Copy path
Top
File metadata and controls
Code
Blame
55 lines (31 loc) · 2.17 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# 发送信息
## URL地址
http
:
//
项目服务器IP
/
wechat
/
sendmsg
## 参数说明
username
:
用户
,
不能为空
;
支持post和get方法传参
pwd
:
该用户的接口密码
;
注意该密码不是为登陆密码
;
支持post和get方法传参
friend
:
接受者的昵称
,
不能为空
;
支持post和get方法传参
content
:
发送内容
,
不能为空
;
支持post和get方法传参
wxid
:
发送者的昵称
,
能为空
;
支持post和get方法传参
file
:
发送文件
,
能为空
;
只支持post方式传参
注意
:
提供wxid
,
将指定发送者
,
如果该发送者不存在将直接返回失败
。
如果不提供
,
会试图向所有在线微信号发送信息
,
只要文字发送成功即返回成功
。
## 执行后返回结果
执行后返回一个json格式
(
执行结果
(
布尔型
),{
'ok'
:
单用户发送结果
(
字典
),'
ng
:{
nickname
:
单用户发送结果
,.....}})
ok表示文字发送成功的微信号
,
只能是一个
。
图片发送是否成功不会进行检测
。
ng表示文字发送失败的微信号
单用户发送结果
:
{
'nickname'
:
发送者的微信昵称
,
'uuid'
:
发送者的uuid
,
'status'
:
发送者的当前状态
,
'login_stamptime'
:
发送者的登陆时间戳
,
'ok'
:
执行结果
,
'text'
: {
'ok'
:
执行结果
,
'msg'
:
执行情况说明
,
'content'
:
文字发送内容
},
'file'
: {
'msg'
:
执行情况说明
,
'ok'
:
执行结果
,
'filename'
:
文件上传到服务器的位置
},
'friend'
:
接受者的微信昵称
}
## 例子
### curl
curl
'http://127.0.0.1/wechat/sendmsg?username=lykchat&pwd=123456&friend=MySQL&content=恭喜发财'
-
F
"file=@/root/给定的文件.txt"
*
*
发送文件时
,
必须在文件路径前加
@
*
*
### 系统提供的python脚本
该脚本位于项目的doc
/
example
/
test_sendfile
.
py
/
usr
/
local
/
python36
/
bin
/
python3
/
opt
/
lykchat
/
doc
/
example
/
test_sendfile
.
py
wxid
=
MySQL
username
=
lykchat
pwd
=
123456
friend
=
lykops
content
=
恭喜发财
file
=
/
root
/
a
.
py
# 计划任务
为了让微信保持登陆状态
,
需要每隔1
~
3
分钟访问登陆接口
。
本项目有一个接口
(
http
:
//
127.0
.
0.1
/
wechat
/
check
)
专用于巡检当前状态下所有处于登陆状态的微信号
。
只允许127
.
0.0
.1
访问该该接口
。
You can’t perform that action at this time.