# 获取白名单 IP 列表

`GET https://api.oxylabs.io/v1/whitelisted_ips`

| 响应    | 描述                        |
| ----- | ------------------------- |
| `200` | 成功。响应体包含当前所有白名单 IP 及其 id。 |

#### 示例代码

{% tabs %}
{% tab title="cURL" %}

```shell
curl -u username:password "https://api.oxylabs.io/v1/whitelisted_ips"
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, "https://api.oxylabs.io/v1/whitelisted_ips");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_USERPWD, 'username:password');

$result = curl_exec($curl);
?>
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
requests.get('https://api.oxylabs.io/v1/whitelisted_ips', auth=('username', 'password'))
```

{% endtab %}
{% endtabs %}

#### 示例输出

```
{
    "data": [
        {
            "id": 9765,
            "address": "127.0.0.1"
        },
        {
            "id": 9766,
            "address": "127.0.0.2"
        }
    ]
}
```
