Proxies

In Unipile, a proxy is a secure intermediary that routes requests between Unipile and external providers. When interacting with an Account, requests don’t have to go directly from Unipile’s servers to the provider’s API — they can be routed through a proxy instead to protect Accounts.



Automatic protection

Some providers closely monitor IP addresses used to access their services. If too many accounts connect from the same IP (e.g., Unipile’s servers), it may raise flags or trigger security measures.

To prevent this, Unipile automatically assigns proxies to accounts for certain sensitive providers. This helps distribute traffic and reduce the risk of accounts being flagged.

By default, Unipile pick a proxy located in a country near the user's IP if it's available, but you can choose a specific country or infer from a specific IP if needed. See Custom country for automatic proxies section below.

Automatic proxy protection is only enabled for providers that require it, currently:

  • LinkedIn
  • WhatsApp
  • Instagram

For other providers, automatic protection is not necessary because they do not restrict access based on IP reuse.

In the dashboard, the proxy is shown as "Auto [COUNTRY]" in the list of Accounts.



Use a custom proxy

When linking an account, you can provide your own proxy configuration. We call this a custom proxy, as opposed to the automatic proxy assigned by Unipile.


Which proxy is applied follows a strict load order: the first match in the list is used, and the lookup stops there.

When using Hosted Auth with Create Auth Link

  1. Proxy entered by the user (if config.global.allow_user_proxy_override is true).
  2. Proxy explicitly set in config.{provider}.custom_proxy.
  3. Automatic proxy (if enabled for the provider).

When using Custom Auth with Start Auth Intent

  1. Proxy explicitly set in config.custom_proxy.
  2. Automatic proxy (if enabled for the provider).

Handling errors

If the given custom proxy (Not automatic proxy) fails to forward requests to the provider:

Unipile will automatically retry requests until the proxy works again. However, you can manually provide a new proxy to restart the account connection immediately. See Update a proxy section below.




Custom country for automatic proxies

When an automatic proxy is assigned, Unipile determines its country using the following lookup order. The first matching value stops the resolution.

When using Hosted Auth with Create Auth Link

  1. Country chosen by the user (if config.global.allow_user_country_override is true).
  2. Country inferred from the IP set in config.{provider}.auto_proxy_config.ip.
  3. Country explicitly set in config.{provider}.auto_proxy_config.country.
  4. Country inferred from the user’s own IP (default).

When using Custom Auth with Start Auth Intent

  1. Country inferred from the IP set in config.auto_proxy_config.ip.
  2. Country explicitly set in config.auto_proxy_config.country.
  3. Country inferred from the request’s IP (default).

❗️

Fallback

  • If no country can be determined, Unipile will assign the best available proxy at that moment, which may come from any region.
  • If the currently selected proxy has issues, we'll try to find another one from the same country. If none is available, Unipile will assign the best available proxy at that moment from any region.



Update a proxy

To manage the proxy configuration of an Account, use the Update an Account API endpoint.

You can:

  • Set or update a custom proxy for an Account.
  • Replace automatic protection with a custom proxy.
  • Remove a custom proxy — for providers with automatic protection, this will revert the Account to using Unipile’s automatic proxy. In this case, Unipile will assign the best available proxy at that moment, which may come from any region.

Note: You cannot remove the proxy entirely if automatic protection is required for the provider.