메인 콘텐츠로 건너뛰기
Follows 엔드포인트를 사용하면 사용자를 팔로우하거나 언팔로우하고, 임의의 사용자의 팔로워 및 팔로잉 리스트를 조회할 수 있습니다.

개요

팔로우

인증된 사용자를 대신해 사용자를 팔로우합니다

언팔로우

사용자를 언팔로우합니다

팔로워

사용자의 팔로워를 조회합니다

팔로잉

사용자가 팔로우하는 계정을 조회합니다

엔드포인트

팔로우 조회

MethodEndpointDescription
GET/2/users/:id/followers사용자의 팔로워를 조회합니다
GET/2/users/:id/following사용자가 팔로우하는 계정을 조회합니다

팔로우 관리

MethodEndpointDescription
POST/2/users/:id/following사용자를 팔로우합니다
DELETE/2/users/:source_user_id/following/:target_user_id사용자 팔로우를 취소합니다

예제: 팔로워 가져오기

curl "https://api.x.com/2/users/2244994945/followers?\
user.fields=username,verified,public_metrics" \
  -H "Authorization: Bearer $BEARER_TOKEN"

예제: 사용자를 팔로우하기

curl -X POST "https://api.x.com/2/users/123456789/following" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"target_user_id": "2244994945"}'

시작하기

사전 준비 사항

빠른 시작

팔로우 기능 시작하기

API 참조 문서

전체 엔드포인트 설명서

샘플 코드

실행 가능한 코드 예제