We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 465ad72 commit de3412cCopy full SHA for de3412c
docs/encrypt.rst
docs/index.rst
@@ -16,7 +16,6 @@ WeRoBot 是一个微信公众号开发框架。
16
replies
17
session
18
config
19
- encrypt
20
contrib
21
error-page
22
client
docs/start.rst
@@ -16,4 +16,18 @@ Hello World
robot.run()
+消息加密
+--------------
+
+WeRoBot 支持对消息的加密,即微信公众号的安全模式。
23
+为 WeRoBot 开启消息加密功能,首先需要安装 ``cryptography`` ::
24
25
+ pip install cryptography
26
27
+之后需要在微信公众平台的基本配置中将消息加解密方式选择为安全模式,随机生成 `EncodingAESKey`,并且把它传给 WeRoBot 或者 WeRoBot 实例的 config 或者创建相对应的 Config 类 ::
28
29
+ from werobot import WeRoBot
30
+ robot = WeRoBot(token='2333',
31
+ encoding_aes_key='your_encoding_aes_key',
32
+ app_id='your_app_id')
33
0 commit comments