# Using Proxies

### Formatting proxies for Token API.

You may optionally provide proxy for the Token API to use for solving the challenge.

The [!badge variant="primary" text="proxy"] parameter should be provided as a [!badge variant="danger" text="Dict"].

This guide shows you how to format this value.

---

Parameter                                  | Type                                     | Required                                      | Description { class="compact" }
:---                                       | :---:                                    | :---:                                         | :---
[!badge variant="primary" text="scheme"]   | [!badge variant="success" text="String"] | [!badge variant="success" text="Required"]    | Scheme of the proxy. Must be one of `http` `https` `socks4` `socks5`.
[!badge variant="primary" text="host"]     | [!badge variant="success" text="String"] | [!badge variant="success" text="Required"]    | IP address IPv4/IPv6 of the proxy.
[!badge variant="primary" text="port"]     | [!badge variant="success" text="String"] or [!badge variant="primary" text="Number"] | [!badge variant="success" text="Required"] | Port number of the proxy.
[!badge variant="primary" text="username"] | [!badge variant="success" text="String"] | [!badge variant="warning" text="Conditional"] | Required if proxy authorization is needed. Username of the proxy.
[!badge variant="primary" text="password"] | [!badge variant="success" text="String"] | [!badge variant="warning" text="Conditional"] | Required if proxy authorization is needed. Password of the proxy.

!!!warning
We currently do not support proxy authentication by IP origin.
!!!

=== Example Request with Proxy
```js POST https://api.nopecha.com/v1/token/recaptcha2
{
    'key': 'MY_NOPECHA_KEY',
    'sitekey': 'b4c45857-0e23-48e6-9017-e28fff99ffb2',
    'url': 'https://nopecha.com/demo/recaptcha#easy',
    'proxy': {
        'scheme': 'http',
        'host': '1.1.1.1',
        'port': 8000,
        'username': 'nopechauser',
        'password': 'hunter7'
    }
}
```
===

For more information, see our [API Reference](https://nopecha.com/api-reference/).
