Skip to content

Commit

Permalink
feat: 开发设置IP白名单
Browse files Browse the repository at this point in the history
  • Loading branch information
mikewen committed Jan 5, 2024
1 parent 713b319 commit 6947cd4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,27 @@ QQ 机器人通过开放的平台承载机器人的定制化功能,让开发
兔小巢创建与使用详情可点击[用户反馈空间创建攻略](https://docs.qq.com/doc/DY0FBR0FUSm5lT0pn)
:::

#### 8.5 IP白名单配置
<img :src="$withBotBase('/images/introduce/ip_white_list.png')" alt="IP白名单配置">

为了防范接口调用安全风险,平台将支持机器人配置IP白名单。(当前只针对新增机器人默认启用ip白名单,后续会逐渐对旧的机器人进行灰度)

IP白名单功能启用之后,开放平台将会在正式环境对开发者的部署IP进行限制:只有白名单IP才能连接websocket和调用OPENAPI的接口。当前IP白名单只作用于正式环境,不影响机器人在沙箱环境的使用。接口域名如下:


- **获取调用凭证**https://bots.qq.com/app/getAppAccessToken, 不区分正式环境、沙箱环境
- **正式环境**https://api.sgroup.qq.com/
- **沙箱环境**https://sandbox.api.sgroup.qq.com 沙箱环境地址只会收到在开发者平台配置的沙箱频道、沙箱私信QQ号、沙箱群、沙箱单聊QQ号的事件,且调用openapi仅能操作沙箱环境


对于新增机器人,平台默认启用IP白名单功能,并限制只有填写了IP白名单才能提审和上线。

::: tip 温馨提示

IP白名单目的是保证开发者安全,请配置有效的公网唯一IP。

:::

### 9. 发布设置

开发者可以通过【发布设置】来配置机器人指令与服务,此处配置的指令与服务将会在C端指令面板、资料卡等处展示,以便用户与机器人快捷完成交互,后端逻辑均需通过代码开发实现。
Expand Down

0 comments on commit 6947cd4

Please sign in to comment.