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

# 会话

> Site Unblocker 会话

## 标头参数

要在多个请求中使用单个代理，只需包含 X-SU-Session-Id 标头，并使用随机生成的字符串作为会话 ID。此 ID 将与唯一代理关联，该代理将用于 10 分钟时间范围内的所有后续请求。10 分钟过后，将为该特定会话 ID 分配新的 IP。

<CodeGroup>
  ```shellscript cURL theme={null}
  curl -k -v -x unblock.decodo.com:60000 \
       -U "USERNAME:PASSWORD" "https://ip.decodo.com/" \
       -H "X-SU-Session-Id: random123"
  ```

  ```python Python theme={null}
  import requests

  proxies = {
      'http': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000',
      'https': 'http://USERNAME:PASSWORD@unblock.decodo.com:60000'
  }

  headers= {
      'X-SU-Session-Id': 'random123'
  }

  response = requests.request(
      'GET',
      'https://ip.decodo.com/',
      verify=False,
      proxies=proxies,
      headers=headers
  )

  print(response.text)
  ```

  ```javascript Node.js theme={null}
  import fetch from 'node-fetch';
  import createHttpsProxyAgent from 'https-proxy-agent'

  const username = 'YOUR_USERNAME';
  const password = 'YOUR_PASSWORD';

  const agent = createHttpsProxyAgent(
    `http://${username}:${password}@unblock.decodo.com:60000`
  );

  process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = 0;

  const headers = {
    'X-SU-Session-Id': 'random123'
  }

  const response = await fetch('https://ip.decodo.com/', {
    method: 'get',
    headers: headers,
    agent: agent
  });

  console.log(await response.text());
  ```
</CodeGroup>

## 用户名参数

会话 ID 也可以通过身份验证用户名设置。以下请求设置值为 `session1` 的会话：

<CodeGroup>
  ```bash cURL theme={null}
  curl -k -v -x unblock.decodo.com:60000 \
       -U "username-session_id-session1:password" "https://ip.decodo.com/"
  ```
</CodeGroup>

***

<Columns cols={2}>
  <Card title="支持" href="https://direct.lc.chat/12092754" cta="让我们聊聊！">
    需要帮助或只是想打个招呼？我们的支持团队全天候为您服务。 \
    您也可以随时通过电子邮件 [support@decodo.com](mailto:support@decodo.com) 联系我们。
  </Card>

  <Card title="反馈" href="mailto:feedback@decodo.com" cta="分享反馈">
    找不到您要找的内容？请求一篇文章！ \
    有反馈意见？分享您对我们如何改进的想法。
  </Card>
</Columns>
