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

# v1에서 v2로

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <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>;
};

<div id="manage-lists-standard-v11-compared-to-x-api-v2">
  ### 리스트 관리: Standard v1.1과 X API v2 비교
</div>

Standard v1.1의 [POST lists/create](https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/post-lists-create), [POST lists/destroy](https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/post-lists-destroy), [POST lists/update](https://developer.x.com/en/docs/twitter-api/v1/accounts-and-users/create-manage-lists/api-reference/post-lists-update) 엔드포인트를 사용해 왔다면, 이 가이드는 Standard v1.1과 X API v2의 리스트 관리 엔드포인트 간 유사점과 차이점을 이해하는 데 도움을 드리기 위한 것입니다.

* **유사점**
  * 인증
* **차이점**
  * 엔드포인트 URL
  * App 및 프로젝트 요구 사항
  * HTTP 메서드
  * 요청 한도
  * 요청 매개변수

<div id="similarities">
  #### 유사점
</div>

**인증**

두 엔드포인트 버전 모두 [OAuth 1.0a User Context](https://developer.x.com/content/developer-twitter/resources/fundamentals/authentication)를 지원합니다. 따라서 기존에 standard v1.1 리스트 관리용 엔드포인트 중 하나를 사용하고 있었다면, X API v2 버전으로 마이그레이션하더라도 동일한 인증 방식을 계속 사용할 수 있습니다.

<div id="differences">
  #### 차이점
</div>

**엔드포인트 URL**

* 표준 v1.1 엔드포인트:
  * POST [https://api.x.com/1.1/lists/create.json](https://api.x.com/1.1/lists/create.json)
    (리스트 생성)
  * POST [https://api.x.com/1.1/lists/destroy.json](https://api.x.com/1.1/lists/destroy.json)
    (리스트 삭제)
  * POST [https://api.x.com/1.1/lists/update.json](https://api.x.com/1.1/lists/update.json)
    (리스트 업데이트)
* X API v2 엔드포인트:
  * POST [https://api.x.com/2/lists](https://api.x.com/2/lists)
    (리스트 생성)

  * DELETE [https://api.x.com/2/lists/:id](https://api.x.com/2/lists/:id)
    (리스트 삭제)

  * PUT [https://api.x.com/2/lists/:id](https://api.x.com/2/lists/:id)
    (리스트 업데이트)

**요청 한도**

| **표준 v1.1**                           | **X API v2**                                                |
| :------------------------------------ | :---------------------------------------------------------- |
| /1.1/lists/create.json<br /><br />없음  | /2/lists<br /><br />OAuth 1.0a 사용자 컨텍스트 기준 15분당 300회 요청     |
| /1.1/lists/destroy.json<br /><br />없음 | /2/lists/:id<br /><br />OAuth 1.0a 사용자 컨텍스트 기준 15분당 300회 요청 |
| /1.1/lists/update.json<br /><br />없음  | /2/lists/:id<br /><br />OAuth 1.0a 사용자 컨텍스트 기준 15분당 300회 요청 |

**App 및 Project 요구 사항**

X API v2 엔드포인트를 사용하려면 요청을 인증할 때 [developer App](/ko/resources/fundamentals/developer-apps)과 [Project](/ko/resources/fundamentals/developer-apps)에 연결된 자격 증명을 사용해야 합니다. 모든 X API v1.1 엔드포인트는 App 또는 Project와 연결된 App의 자격 증명을 사용할 수 있습니다.

**요청 매개변수**

다음 표준 v1.1 요청 매개변수는 X API v2에서의 대응 항목입니다:

**리스트 생성**

| **표준**      | **X API v2** |
| :---------- | :----------- |
| name        | name         |
| mode        | private      |
| description | description  |

**리스트 삭제/업데이트**

| **표준**              | **X API v2** |
| :------------------ | :----------- |
| owner\_screen\_name | 해당 없음        |
| owner\_id           | 해당 없음        |
| list\_id            | id           |
| slug                | 해당 없음        |

<Note>
  **참고:** 표준 v1.1 매개변수는 쿼리 매개변수로 전달되지만, X API v2 매개변수는 POST 엔드포인트에서는 본문 매개변수로, DELETE 및 PUT 엔드포인트에서는 경로 매개변수로 전달됩니다.
</Note>

***

<div id="code-examples">
  ## 코드 예제
</div>

<div id="create-a-list-v2">
  ### 리스트 생성 (v2)
</div>

<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 great list"}'
  ```

  ```python Python theme={null}
  # OAuth 1.0a 사용자 컨텍스트 인증이 필요합니다.
  import requests
  from requests_oauthlib import OAuth1

  auth = OAuth1(
      "API_KEY", "API_SECRET",
      "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET"
  )

  url = "https://api.x.com/2/lists"
  data = {"name": "My List", "description": "A great list"}

  response = requests.post(url, auth=auth, json=data)
  print(response.json())
  ```

  ```python Python SDK 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)

  # 리스트 생성
  response = client.lists.create(name="My List", description="A great list")
  print(f"Created List: {response.data.id}")
  ```

  ```javascript JavaScript SDK 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 });

  // 리스트 생성
  const response = await client.lists.create({
    name: "My List",
    description: "A great list",
  });
  console.log(`Created List: ${response.data?.id}`);
  ```
</CodeGroup>

<div id="delete-a-list-v2">
  ### 리스트 삭제 (v2)
</div>

<CodeGroup dropdown>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.x.com/2/lists/123456789" \
    -H "Authorization: OAuth ..."
  ```

  ```python Python theme={null}
  # OAuth 1.0a 사용자 컨텍스트 인증이 필요합니다
  import requests
  from requests_oauthlib import OAuth1

  auth = OAuth1(
      "API_KEY", "API_SECRET",
      "ACCESS_TOKEN", "ACCESS_TOKEN_SECRET"
  )

  url = "https://api.x.com/2/lists/123456789"
  response = requests.delete(url, auth=auth)
  print(response.json())
  ```

  ```python Python SDK 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)

  # 리스트 삭제하기
  response = client.lists.delete("123456789")
  print(f"Deleted: {response.data.deleted}")
  ```

  ```javascript JavaScript SDK 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 });

  // 리스트 삭제하기
  const response = await client.lists.delete("123456789");
  console.log(`Deleted: ${response.data?.deleted}`);
  ```
</CodeGroup>
