유용한 도구
Postman
코드 샘플
서드파티 라이브러리
핵심 개념
인증
개발자 콘솔, Project 및 개발자 App
요청 한도
코드 예시
리스트 생성하기
cURL
리스트 업데이트하기
cURL
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
| 엔드포인트 | HTTP 메서드 | 요청 한도 |
| /2/lists | POST | 15분당 300건의 요청 |
| /2/lists/:id | DELETE / PUT | 15분당 300건의 요청 |
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"}'
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 list of interesting accounts"
)
print(response.data)
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 list of interesting accounts",
});
console.log(response.data);
curl -X PUT "https://api.x.com/2/lists/123456789" \
-H "Authorization: OAuth ..." \
-H "Content-Type: application/json" \
-d '{"name": "Updated List Name"}'
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.update(
list_id="123456789",
name="Updated List Name"
)
print(response.data)
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.update("123456789", {
name: "Updated List Name",
});
console.log(response.data);