> For the complete documentation index, see [llms.txt](https://docs.ipwo.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ipwo.net/gu-zhang-pai-chu/bai-ming-dan-bu-sheng-xiao.md).

# 白名单不生效

如果已经添加[ IP 白名单](/huo-qu-yu-pei-zhi-dai-li/ip-bai-ming-dan.md)，但 API 仍无法访问、请求失败或提示无权限，通常表示当前请求 IP 与白名单中的 IP 不一致，或白名单尚未正确生效。

👉 [API 提取方式](/huo-qu-yu-pei-zhi-dai-li/ru-he-huo-qu-dai-li/api-ti-qu.md)必须正确配置白名单后才能正常使用。

***

### 🔍 常见表现

出现以下情况时，通常属于白名单未生效：

* API 请求失败
* 返回无权限
* 无法获取代理 IP
* 返回为空
* 明明已添加白名单但仍无法使用

***

### ⚡ 快速检查（推荐）

请先确认：

* 当前服务器公网 IP
* 白名单中的 IP
* API 请求来源 IP

三者是否一致。

***

### 🌍 如何查看当前公网 IP？

请访问：

```
https://ipinfo.io
```

查看当前公网 IP。

👉 建议复制完整 IP 后再进行白名单配置。

***

### 🛠 常见原因与解决方法

***

#### 1️⃣ 添加了错误的 IP

这是最常见原因。

很多情况下：

* 本地 IP
* 内网 IP
* 云服务器内网地址

并不是实际请求 API 的公网 IP。

***

#### 正确示例

```
123.123.123.123
```

***

#### 错误示例

```
192.168.x.x
10.x.x.x
172.x.x.x
```

👉 白名单必须填写公网 IP。

***

#### 2️⃣ 当前网络 IP 已变化

如果使用：

* 家庭宽带
* 动态公网 IP
* 云服务器自动切换 IP

可能导致：

👉 当前请求 IP 与[白名单 IP](/huo-qu-yu-pei-zhi-dai-li/ip-bai-ming-dan.md) 不一致。

***

#### 建议：

重新检查公网 IP 后更新白名单。

***

#### 3️⃣ 白名单尚未生效

部分情况下：

* 刚添加白名单
* 系统尚未同步

可能需要等待短暂时间。

***

#### 建议：

* 等待几分钟后重试
* 重新请求 API

***

#### 4️⃣ 使用了多个服务器或代理环境

如果：

* API 请求来自不同服务器
* 程序部署在多台机器
* 使用了代理/VPN

可能导致请求 IP 不一致。

***

#### 建议：

确认实际请求 API 的出口 IP。

***

#### 5️⃣ API 请求未从预期服务器发出

部分程序：

* 本地调试
* Docker 环境
* 云函数环境

可能与想象中的出口 IP 不同。

***

#### 建议：

在实际运行环境中访问：

```
https://ipinfo.io
```

确认真实出口 IP。

***

### ⚙️ 白名单配置建议

推荐：

* 使用固定公网 IP
* 使用稳定服务器环境
* 不频繁切换网络

👉 可减少白名单失效问题。

***

### 💡 使用建议

* 添加白名单后建议立即测试 API
* 推荐直接复制公网 IP
* 不建议填写内网地址

***

### ❗ 常见问题速查

| 问题       | 可能原因       |
| -------- | ---------- |
| 白名单无效    | 添加了错误 IP   |
| API 无权限  | 当前 IP 不一致  |
| 已添加仍失败   | 网络 IP 已变化  |
| API 偶尔可用 | 动态公网 IP    |
| 多服务器失败   | 部分服务器未加白名单 |

***

### 🆘 仍未解决？

如果问题仍未解决，请联系官方客服。（[官网](https://www.ipwo.net/)右侧在线客服）

👉 建议提供：

* 当前公网 IP
* 白名单截图
* API 请求结果
* 使用环境（本地 / 云服务器）

***

### 总结

白名单不生效通常由以下原因导致：

```
公网 IP 错误
↓
网络 IP 变化
↓
请求来源不一致
↓
白名单未同步
```

👉 建议优先确认实际出口公网 IP

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ipwo.net/gu-zhang-pai-chu/bai-ming-dan-bu-sheng-xiao.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
