> ## 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.

# Get an access token

Prefix the paths below with your service URL. Obtain an access token first, then send it in the `Authorization` header when calling other endpoints. Keep your credentials and token secure. Obtaining a new token invalidates the previous one.

1. `POST /wapi/token/` with a JSON body:

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

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

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

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

  <thead>
    <tr>
      <td>Field</td>
      <td>Description</td>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>`username`</td>
      <td>Account email; required</td>
    </tr>

    <tr>
      <td>`passwd`</td>
      <td>Account password; required</td>
    </tr>
  </tbody>
</table>

2. On success, use `results.token` as your access token:

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

> [!TIP]
>
> Accounts that have purchased **rotating** **residential proxies**, **high-purity residential proxies**, or redeemed **rotating** traffic, can obtain a token. This endpoint is rate-limited; retry later if you receive HTTP 429.


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