고정된 리스트 가져오기
1
내 사용자 ID 가져오기
인증된 사용자 ID가 필요합니다. user lookup endpoint를 사용하거나 액세스 토큰에서 확인할 수 있습니다(숫자 부분이 사용자 ID입니다).
2
고정된 리스트 요청 보내기
cURL
3
응답 확인
사용 가능한 리스트 필드
다음 단계
고정된 리스트 관리
리스트 고정/해제
리스트 조회
리스트 세부 정보 보기
API 참조 문서
전체 엔드포인트 문서
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
사용자의 고정된 리스트를 가져옵니다.
내 사용자 ID 가져오기
고정된 리스트 요청 보내기
curl "https://api.x.com/2/users/2244994945/pinned_lists?\
list.fields=follower_count,member_count,owner_id&\
expansions=owner_id&\
user.fields=created_at,username" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN"
from xdk import Client
client = Client(bearer_token="YOUR_USER_ACCESS_TOKEN")
# 고정된 리스트 가져오기
response = client.lists.get_pinned(
"2244994945",
list_fields=["follower_count", "member_count", "owner_id"],
expansions=["owner_id"],
user_fields=["created_at", "username"]
)
for lst in response.data:
print(f"{lst.name} - {lst.follower_count} followers")
import { Client } from "@xdevplatform/xdk";
const client = new Client({ accessToken: "YOUR_USER_ACCESS_TOKEN" });
// 고정된 리스트 가져오기
const response = await client.lists.getPinned("2244994945", {
listFields: ["follower_count", "member_count", "owner_id"],
expansions: ["owner_id"],
userFields: ["created_at", "username"],
});
response.data?.forEach((lst) => {
console.log(`${lst.name} - ${lst.follower_count} followers`);
});
응답 확인
{
"data": [
{
"id": "1454155907651158017",
"name": "Tech News",
"follower_count": 150,
"member_count": 25,
"owner_id": "2244994945"
}
],
"includes": {
"users": [
{
"id": "2244994945",
"username": "XDevelopers",
"name": "X Developers",
"created_at": "2013-12-14T04:35:55.000Z"
}
]
},
"meta": {
"result_count": 1
}
}
| 필드 | 설명 |
|---|---|
description | 리스트 설명 |
owner_id | 소유자의 사용자 ID |
private | 리스트가 비공개인지 여부 |
member_count | 멤버 수 |
follower_count | 팔로워 수 |
created_at | 리스트 생성 일시 |