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.
이 가이드는 Spaces 조회 엔드포인트를 사용해 Space 정보를 조회하는 방법을 설명합니다.
사전 준비 사항시작하기 전에 다음이 필요합니다.
- 승인이 완료된 App이 연결된 개발자 계정
- App의 Bearer 토큰
특정 Space의 상세 정보를 조회합니다:
curl "https://api.x.com/2/spaces/1DXxyRYNejbKM?\
space.fields=title,host_ids,participant_count,scheduled_start,state,created_at" \
-H "Authorization: Bearer $BEARER_TOKEN"
{
"data": {
"id": "1DXxyRYNejbKM",
"state": "live",
"title": "Discussing AI and the Future",
"host_ids": ["2244994945"],
"participant_count": 245,
"created_at": "2024-01-15T09:00:00.000Z"
}
}
여러 Space를 한 번에 조회하려면:
curl "https://api.x.com/2/spaces?\
ids=1DXxyRYNejbKM,1YqJDqWYNQDGW&\
space.fields=title,state,participant_count" \
-H "Authorization: Bearer $BEARER_TOKEN"
특정 사용자가 호스팅한 Spaces를 조회합니다:
curl "https://api.x.com/2/spaces/by/creator_ids?\
user_ids=2244994945,783214&\
space.fields=title,state,scheduled_start" \
-H "Authorization: Bearer $BEARER_TOKEN"
호스트 사용자 데이터를 확장해 포함합니다:
curl "https://api.x.com/2/spaces/1DXxyRYNejbKM?\
space.fields=title,host_ids,state&\
expansions=host_ids&\
user.fields=username,verified" \
-H "Authorization: Bearer $BEARER_TOKEN"
{
"data": {
"id": "1DXxyRYNejbKM",
"state": "live",
"title": "Discussing AI and the Future",
"host_ids": ["2244994945"]
},
"includes": {
"users": [
{
"id": "2244994945",
"username": "XDevelopers",
"verified": true
}
]
}
}
| State | Description |
|---|
live | 현재 진행 중 |
scheduled | 예약됨 |
ended | 종료됨 |
| Field | Description |
|---|
title | Space의 제목 |
host_ids | 호스트 사용자 ID |
speaker_ids | 스피커 사용자 ID |
participant_count | 현재 참여자 수 |
scheduled_start | 예정된 시작 시간 |
started_at | 실제 시작 시간 |
ended_at | 종료 시간 |
is_ticketed | 티켓이 제공되는 Space인지 여부 |
state | 현재 상태 |