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

# Custom Sticky Sessions

> Mobile Proxy Duration Specification

## Sticky Proxies

Decodo **sticky** sessions allow a proxy IP address to persist for up to **`24hours`** (**`1440`** minutes) before it's rotated to a different IP address.

<Note>
  The **default** sticky session time is `10minutes`.
</Note>

***

## Dashboard Proxy List Generation

To **generate** an endpoint list, navigate to the [**Dashboard → Proxy setup**](https://dashboard.decodo.com/mobile-proxies/proxy-setup) section.

<Note>
  On the Proxy setup page, you can select between `1`, `10`, `30`, or `60`-minute sessions from a drop-down menu or specify a **custom duration** of up to `24hours`.
</Note>

<img src="https://mintcdn.com/decodo/IsWPiMoisao6W8vC/images/docs/e26eac35c6c507b51c0ac196513fa6f7068d0d4250697c984dea83541685d83f-Group_427322980.png?fit=max&auto=format&n=IsWPiMoisao6W8vC&q=85&s=5b169b7f1fc761d4ffd85aa521a789fc" alt="" width="3448" height="1552" data-path="images/docs/e26eac35c6c507b51c0ac196513fa6f7068d0d4250697c984dea83541685d83f-Group_427322980.png" />

## Custom Session Duration

You can use the `sessionduration` parameter together with the proxy **username** or a **whitelisted IP** to extend the length of a session up to **`24hours`** (**`1440`** minutes).

<Note>
  * The `sessionduration` parameter accepts any **integer** (minute) value between `1` and `1440`.
  * A `1440` minute duration is the longest possible proxy session.
</Note>

<Warning>
  ### Premature Rotation

  The longer the session you have, the more chances there are that **the IP will rotate before** your specified time due to the mobile device at the end going offline.
</Warning>

## Multiple Concurrent Sticky Sessions

Adding the `session` variable to the proxy username or using a whitelisted IP will allow the proxy IP address to persist for multiple requests.

<Note>
  Different session parameter values are used to differentiate between active sessions and behave just like the different sticky proxy ports with our country endpoints.

  * `session-1`
  * `session-2`
</Note>

## Examples

### Username:password

A `cURL` example using a **`90-minute`** long `sessionduration` parameter used with a proxy **username** and `session` **ID** to allow the IP address to persist for multiple requests:

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -U "user-username-session-example1-sessionduration-90:password" -x "gate.decodo.com:7000" "ip.decodo.com"
  ```
</CodeGroup>

### Whitelisted IP

A `cURL` example using a **`90-minute`** long `sessionduration` parameter used with a **Whitelisted IP** and `session` **ID** to allow the IP address to persist for multiple requests:

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -x "https://session-example1-sessionduration-90.gate.decodo.com:7000" "https://ip.decodo.com"
  ```
</CodeGroup>

<Note>
  Check out the [**backconnect**](https://help.decodo.com/docs/mobile-proxy-user-pass-requests#sticky-session) guide for a more in-depth review of how to use a sticky session with `sessionduration` and `session` parameters.
</Note>

***

## IP Lock

With `session `parameter if IP is no longer available, it will automatically rotate to a new one. The `session_iplock` parameter is used in cases when IP rotation is not needed and same IP must be kept for entire session duration. With this parameter if IP is no longer available, proxy will result with 502 status code and will not grant you a new IP during desired session duration.

In order to format a request using `session_iplock` you must:

1. Use a username:password proxy connection.
2. Add `session_iplock-name` parameter (name - any string given to a session).
3. Add `sessionduration` parameter (sessionduration - value between `1` and `1440`).

## Example

### Username:password

A `cURL` example using a `90-minute` long `sessionduration` parameter used with a proxy username and `session_iplock-example1` to allow the IP address to persist for multiple requests:

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -U "user-username-session_iplock-example1-sessionduration-90:password" -x "gate.decodo.com:10000" "https://ip.decodo.com/json"
  ```
</CodeGroup>

***

<Columns cols={2}>
  <Card title="Support" href="https://direct.lc.chat/12092754" cta="Let's chat!">
    Need help or just want to say hello? Our support is available 24/7. \
    You can also reach us anytime via email at [support@decodo.com](mailto:support@decodo.com).
  </Card>

  <Card title="Feedback" href="mailto:feedback@decodo.com" cta="Share feedback">
    Can't find what you're looking for? Request an article! \
    Have feedback? Share your thoughts on how we can improve.
  </Card>
</Columns>
