> ## Documentation Index
> Fetch the complete documentation index at: https://generaltranslation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 차단

> 사용자를 차단하거나 차단 해제하고, 차단된 사용자 목록을 가져옵니다

export const Button = ({href, children}) => {
  return <div className="not-prose group">
    <a href={href}>
      <button className="flex items-center space-x-2.5 py-1 px-4 bg-primary-dark dark:bg-white text-white dark:text-gray-950 rounded-full group-hover:opacity-[0.9] font-medium">
        <span>
          {children}
        </span>
        <svg width="3" height="24" viewBox="0 -9 3 24" class="h-6 rotate-0 overflow-visible"><path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"></path></svg>
      </button>
    </a>
  </div>;
};

Blocks 엔드포인트를 사용하면 사용자를 차단하거나 차단 해제하고, 인증된 사용자가 차단한 사용자 목록을 조회할 수 있습니다.

<div id="overview">
  ## 개요
</div>

<CardGroup cols={2}>
  <Card title="차단" icon="ban">
    사용자를 차단합니다
  </Card>

  <Card title="차단 해제" icon="circle-check">
    사용자 차단을 해제합니다
  </Card>

  <Card title="차단된 사용자" icon="list">
    차단한 사용자 리스트를 조회합니다
  </Card>
</CardGroup>

***

<div id="endpoints">
  ## 엔드포인트
</div>

| Method | Endpoint                                                | Description   |
| :----- | :------------------------------------------------------ | :------------ |
| GET    | [`/2/users/:id/blocking`](/ko/x-api/users/get-blocking) | 차단한 사용자 목록 조회 |
| POST   | [`/2/users/:id/blocking`](/ko/x-api/users/block-dms)    | 사용자 차단        |
| DELETE | `/2/users/:source_user_id/blocking/:target_user_id`     | 사용자 차단 해제     |

***

<div id="example-get-blocked-users">
  ## 예시: 차단된 사용자 조회
</div>

```bash theme={null}
curl "https://api.x.com/2/users/123456789/blocking?\
user.fields=username,description" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN"
```

<div id="example-block-a-user">
  ## 예시: 사용자 차단
</div>

```bash theme={null}
curl -X POST "https://api.x.com/2/users/123456789/blocking" \
  -H "Authorization: Bearer $USER_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"target_user_id": "9876543210"}'
```

***

<div id="getting-started">
  ## 시작하기
</div>

<Note>
  **사전 요구 사항**

  * 승인된 [개발자 계정](https://developer.x.com/en/portal/petition/essential/basic-info)
  * 개발자 콘솔의 [Project and App](/ko/resources/fundamentals/developer-apps)
  * [OAuth 2.0 PKCE](/ko/resources/fundamentals/authentication#oauth-2-0-authorization-code-flow-with-pkce-2)를 통한 사용자 액세스 토큰
</Note>

<CardGroup cols={2}>
  <Card title="빠른 시작" icon="rocket" href="/ko/x-api/users/blocks/quickstart">
    차단 기능 사용을 시작해 보세요
  </Card>

  <Card title="통합 가이드" icon="book" href="/ko/x-api/users/blocks/integrate">
    핵심 개념과 모범 사례
  </Card>

  <Card title="API 참조 문서" icon="code" href="/ko/x-api/users/blocks-lookup">
    모든 엔드포인트 문서
  </Card>
</CardGroup>
