Documentation Index
Fetch the complete documentation index at: https://generaltranslation.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
이 가이드는 시간 역순 홈 타임라인 엔드포인트에 처음으로 요청을 보내는 과정을 단계별로 안내합니다.
사전 준비 사항시작하기 전에 다음이 필요합니다:
- 승인이 완료된 App이 포함된 개발자 계정
- 사용자 액세스 토큰(이 엔드포인트에는 사용자 인증이 필요합니다)
조회하려는 홈 타임라인의 계정 사용자 ID가 필요합니다. 사용자 이름 조회 엔드포인트를 사용해 확인하세요:
curl "https://api.x.com/2/users/by/username/XDevelopers" \
-H "Authorization: Bearer $BEARER_TOKEN"
응답에는 사용자 ID가 포함됩니다.
{
"data": {
"id": "2244994945",
"name": "X Developers",
"username": "XDevelopers"
}
}
Step 2: Request the home timeline
사용자 ID와 User Access Token을 사용하여 GET 요청을 수행합니다:
curl "https://api.x.com/2/users/2244994945/timelines/reverse_chronological" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN"
{
"data": [
{
"id": "1524796546306478083",
"text": "Today marks the launch of Devs in the Details...",
"edit_history_tweet_ids": ["1524796546306478083"]
},
{
"id": "1524468552404668416",
"text": "Join us tomorrow for a discussion about bots...",
"edit_history_tweet_ids": ["1524468552404668416"]
}
],
"meta": {
"result_count": 2,
"newest_id": "1524796546306478083",
"oldest_id": "1524468552404668416",
"next_token": "7140dibdnow9c7btw421dyz6jism75z99gyxd8egarsc4"
}
}
쿼리 매개변수를 사용해 추가 데이터를 요청합니다:
curl "https://api.x.com/2/users/2244994945/timelines/reverse_chronological?\
tweet.fields=created_at,public_metrics,author_id&\
expansions=author_id&\
user.fields=username,verified&\
max_results=10" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN"
SDK는 페이지네이션을 자동으로 처리합니다. cURL을 사용할 때는 응답에 포함된 next_token 값을 사용해 더 많은 결과를 가져오세요:
curl "https://api.x.com/2/users/2244994945/timelines/reverse_chronological?\
max_results=10&\
pagination_token=7140dibdnow9c7btw421dyz6jism75z99gyxd8egarsc4" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN"
| 파라미터 | 설명 | 기본값 |
|---|
max_results | 페이지당 결과 수 (1-100) | 10 |
start_time | 가장 오래된 게시물 타임스탬프 (ISO 8601) | — |
end_time | 가장 최신 게시물 타임스탬프 (ISO 8601) | — |
since_id | 이 ID 이후의 포스트 반환 | — |
until_id | 이 ID 이전의 포스트 반환 | — |
exclude | retweets, replies 또는 둘 다를 제외 | — |
페이지네이션 가이드
대용량 결과 집합을 탐색하기