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

# 통합 가이드

> 이 페이지는 Lists 엔드포인트를 통합하기 위한 도구와 핵심 개념을 다룹니다. Manage lists를 다루는 X API v2 standard 티어 레퍼런스입니다.

export const Button = ({href, children}) => {
  return <div className="not-prose">
    <a href={href}>
      <button className="x-btn">
        <span>{children}</span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

이 페이지는 Lists 엔드포인트를 통합하기 위한 도구와 핵심 개념을 다룹니다.

## 유용한 도구

이 엔드포인트를 통합하는 데 도움이 되는 몇 가지 핵심 개념을 다루기 전에 다음 항목에 익숙해지실 것을 권장합니다:

#### Postman

Postman은 엔드포인트를 테스트하는 데 사용할 수 있는 훌륭한 도구입니다. 각 Postman 요청에는 사용 가능한 모든 항목을 빠르게 이해할 수 있도록 모든 경로와 본문 매개변수가 포함되어 있습니다. Postman 컬렉션에 대해 자세히 알아보려면 ["Postman 사용"](/tutorials/postman-getting-started) 페이지를 참조하세요.

#### 코드 샘플

원하는 코딩 언어로 이 엔드포인트를 사용하기 시작하는 데 관심이 있으신가요? [Github 페이지](https://github.com/xdevplatform/Twitter-API-v2-sample-code)에서 시작점으로 활용할 수 있는 다양한 코드 샘플을 제공합니다.

#### 서드파티 라이브러리

시작하는 데 도움이 되는 커뮤니티의 [서드파티 라이브러리](/tools-and-libraries) 중 하나를 활용하세요. 올바른 버전 태그를 찾아 v2 엔드포인트에서 동작하는 라이브러리를 찾을 수 있습니다.

### 핵심 개념

#### 인증

모든 X API v2 엔드포인트는 자격 증명(key와 token이라고도 함) 세트로 요청을 인증해야 합니다.

이 특정 엔드포인트는 [OAuth 1.0a User Context](/resources/fundamentals/authentication)를 사용해야 합니다. 즉, API key 세트와 사용자 Access Token을 사용하여 성공적으로 요청해야 합니다. Access Token은 대신 요청하려는 사용자와 연결되어 있어야 합니다. 다른 사용자를 위해 Access Token 세트를 생성하려면 해당 사용자가 [3-legged OAuth 흐름](/resources/fundamentals/authentication#obtaining-access-tokens-using-3-legged-oauth-flow)을 사용하여 App을 인가하거나 인증해야 합니다.

OAuth 1.0a는 사용하기 까다로울 수 있습니다. 이 인증 방식에 익숙하지 않은 경우 [라이브러리](/tools-and-libraries)나 Postman과 같은 도구를 사용하여 요청을 올바르게 인증하시길 권장합니다.

#### Developer Console, Project 및 developer App

X API v2 엔드포인트에서 동작하는 인증 자격 증명 세트를 검색하려면 [developer account에 가입](https://developer.x.com/en/portal/petition/essential/basic-info)하고, 해당 계정 내에 [Project](/resources/fundamentals/developer-apps)를 설정한 후, 해당 Project 내에 [developer App](/resources/fundamentals/developer-apps)을 만들어야 합니다. 그런 다음 developer App 내에서 key와 token을 찾을 수 있습니다.

#### Rate limit

매일 수천 명의 개발자가 X API에 요청을 보냅니다. 이러한 요청의 방대한 양을 관리하는 데 도움이 되도록, 각 엔드포인트에는 App 또는 인증된 사용자를 대신하여 요청할 수 있는 횟수를 제한하는 [rate limit](/x-api/fundamentals/rate-limits)이 설정되어 있습니다.

이러한 엔드포인트는 사용자 수준에서 rate limit이 적용됩니다. 즉, 요청을 대신 보내는 인증된 사용자가 어떤 developer App에서도 특정 횟수만큼만 엔드포인트를 호출할 수 있음을 의미합니다.

아래 표는 각 엔드포인트의 rate limit을 보여줍니다.

|              |                 |                |
| :----------- | :-------------- | :------------- |
| **Endpoint** | **HTTP method** | **Rate limit** |
| /2/lists     | POST            | 15분당 300회 요청   |
| /2/lists/:id | DELETE / PUT    | 15분당 300회 요청   |

***

### 코드 예제

#### List 생성

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl -X POST "https://api.x.com/2/lists" \
    -H "Authorization: OAuth ..." \
    -H "Content-Type: application/json" \
    -d '{"name": "My List", "description": "A list of interesting accounts"}'
  ```

  ```python title="Python SDK" lines wrap icon="python" theme={null}
  from xdk import Client
  from xdk.oauth1_auth import OAuth1

  oauth1 = OAuth1(
      api_key="YOUR_API_KEY",
      api_secret="YOUR_API_SECRET",
      access_token="YOUR_ACCESS_TOKEN",
      access_token_secret="YOUR_ACCESS_TOKEN_SECRET"
  )

  client = Client(auth=oauth1)

  # 새 List 생성
  response = client.lists.create(
      name="My List",
      description="A list of interesting accounts"
  )
  print(response.data)
  ```

  ```javascript title="JavaScript SDK" lines wrap icon="square-js" theme={null}
  import { Client, OAuth1 } from "@xdevplatform/xdk";

  const oauth1 = new OAuth1({
    apiKey: "YOUR_API_KEY",
    apiSecret: "YOUR_API_SECRET",
    accessToken: "YOUR_ACCESS_TOKEN",
    accessTokenSecret: "YOUR_ACCESS_TOKEN_SECRET",
  });

  const client = new Client({ oauth1 });

  // 새 List 생성
  const response = await client.lists.create({
    name: "My List",
  });
  console.log(response.data);
  ```
</CodeGroup>

#### List 업데이트

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl -X PUT "https://api.x.com/2/lists/123456789" \
    -H "Authorization: OAuth ..." \
    -H "Content-Type: application/json" \
    -d '{"name": "Updated List Name"}'
  ```

  ```python title="Python SDK" lines wrap icon="python" theme={null}
  from xdk import Client
  from xdk.oauth1_auth import OAuth1

  oauth1 = OAuth1(
      api_key="YOUR_API_KEY",
      api_secret="YOUR_API_SECRET",
      access_token="YOUR_ACCESS_TOKEN",
      access_token_secret="YOUR_ACCESS_TOKEN_SECRET"
  )

  client = Client(auth=oauth1)

  # List 업데이트
  response = client.lists.update(
      list_id="123456789",
      name="Updated List Name"
  )
  print(response.data)
  ```

  ```javascript title="JavaScript SDK" lines wrap icon="square-js" theme={null}
  import { Client, OAuth1 } from "@xdevplatform/xdk";

  const oauth1 = new OAuth1({
    apiKey: "YOUR_API_KEY",
    apiSecret: "YOUR_API_SECRET",
    accessToken: "YOUR_ACCESS_TOKEN",
    accessTokenSecret: "YOUR_ACCESS_TOKEN_SECRET",
  });

  const client = new Client({ oauth1 });

  // List 업데이트
  const response = await client.lists.update("123456789", {
    name: "Updated List Name",
  });
  console.log(response.data);
  ```
</CodeGroup>
