> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lokiproxy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 获取訪問令牌

以下路徑均以您的服務地址為前綴。請先获取訪問令牌，再通過`Authorization`建議頭呼叫其他接口。請妥善保管帳號密碼和令牌；再次取得令牌後，舊令牌將失效。

1. `POST /wapi/token/`，請求體為 JSON：

```http theme={null}
Content-Type: application/json
```

```json theme={null}
{
  "username": "your_email@example.com",
  "passwd": "your_password"
}
```

<table>
  <colgroup>
    <col width="100" />

    <col width="238" />
  </colgroup>

  <thead>
    <tr>
      <th>**參數**</th>
      <th>**說明**</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`username`</td>
      <td>帳號郵箱，必填</td>
    </tr>

    <tr>
      <td>`passwd`</td>
      <td>帳號密碼，必填</td>
    </tr>
  </tbody>
</table>

2. 成功時，响應的`results.token`即為訪問令牌：

```json theme={null}
{
  "code": 200,
  "results": { "token": "YOUR_TOKEN" }
}
```

> [!TIP]
>
> 購買過動態住宅代理、高純度住宅代理或兌換過動態流量的帳號可獲得令牌。此接口有訪問頻率限制，收到 HTTP 429 時請稍後重試。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.