Skip to main content
Add -session-<id> to your proxy username when related connections should reuse a session. Add the optional -ttl-<minutes> parameter to request its lifetime in minutes. Keep your proxy password unchanged.
30-minute sticky session
Use the same full username and gateway for related connections. Use a different session ID for a separate session.

Set the lifetime

  • TTL is optional. Leaving it out preserves the existing session behavior.
  • Supply one integer from 1 through 120, inclusive. The unit is minutes.
  • Include a nonempty -session-<id> whenever you supply TTL.
  • Keep the session ID, TTL, country, city, and gateway unchanged while reusing a session.
  • Adding, removing, or changing TTL creates a separate session, even when you reuse the same session ID. An explicit -ttl-120 is separate from omitting TTL.
Custom lifetimes require support for your requested product and location. If a supported connection is unavailable, the request is rejected.
Your requested lifetime also applies when the connection uses a shared residential pool. You can request a one-minute or 30-minute session there. Other sessions retain their own lifetimes.

What expiry means

TTL controls the sticky-session lifetime. It does not set an HTTP request timeout or disconnect an existing proxy tunnel when the lifetime ends. New connections after expiry can use another exit IP; a previously used IP can appear again. IP persistence is best effort. An exit IP can change before TTL expires if it becomes unavailable or the connection recovers through another route. Your application must manage website cookies and logins separately. To allow rotation when you open new proxy connections, omit both -session-<id> and -ttl-<minutes>. See Proxy formats and sessions for gateway and connection options.

Connect with curl

Store your proxy username and password in environment variables:
These requests use your live proxy credentials and consume traffic. Keep the credentials private.
The same TTL parameter works with HTTP, HTTPS, and SOCKS5 connections. The HTTPS example uses port 9999 and keeps certificate verification enabled. In the dashboard’s Proxy Generator, choose Sticky to generate session IDs. To set a custom lifetime, append -ttl-<minutes> to the generated username before using it. Reuse that complete username for related connections.

Invalid values

Fix the username before retrying. Rejected TTL values are not applied to your session.