> ## 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.

# Account Activity API

> 웹훅을 통한 실시간 계정 활동 수신

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>;
};

Account Activity API는 실시간 계정 활동 이벤트를 웹훅으로 전달합니다. 사용자 계정을 구독하여 사용자가 게시물을 올리거나 DM을 받거나 팔로우되는 등의 활동이 발생할 때 알림을 받을 수 있습니다.

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

<CardGroup cols={2}>
  <Card title="Webhook 전달" icon="webhook">
    서버로 전달되는 이벤트
  </Card>

  <Card title="실시간" icon="bolt">
    실시간 이벤트 알림
  </Card>

  <Card title="종합적" icon="list">
    포스트, DM, 팔로우, 좋아요 등
  </Card>

  <Card title="구독 기반" icon="bell">
    사용자 계정 구독
  </Card>
</CardGroup>

***

<div id="how-it-works">
  ## 동작 방식
</div>

1. **웹훅 등록** — 웹훅 URL을 등록합니다.
2. **사용자 구독 설정** — 사용자 구독을 설정합니다.
3. **이벤트 수신** — POST 요청으로 활동 이벤트를 수신합니다.
4. **이벤트 처리** — 애플리케이션에서 이벤트를 처리합니다.

***

<div id="event-types">
  ## 이벤트 유형
</div>

| 카테고리         | 이벤트                 |
| :----------- | :------------------ |
| **포스트**      | 생성, 삭제, 좋아요, 좋아요 취소 |
| **다이렉트 메시지** | 수신, 발신, 입력 상태 표시    |
| **팔로우**      | 팔로우, 언팔로우           |
| **차단**       | 차단, 차단 해제           |
| **뮤트**       | 뮤트, 뮤트 해제           |

***

<div id="webhook-security">
  ## Webhook 보안
</div>

모든 webhook 요청에는 다음이 포함됩니다:

* **CRC validation** — webhook의 진위 여부를 검증합니다
* **Signature header** — `x-twitter-webhooks-signature`
* **HTTPS required** — 모든 webhook URL은 HTTPS를 반드시 사용해야 합니다

***

<div id="example-register-a-webhook">
  ## 예제: 웹훅 등록
</div>

```bash theme={null}
curl -X POST "https://api.x.com/1.1/account_activity/all/env-name/webhooks.json?\
url=https%3A%2F%2Fyour-server.com%2Fwebhook" \
  -H "Authorization: OAuth oauth_consumer_key=..."
```

***

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

<Note>
  **사전 준비 사항**

  * 승인된 [개발자 계정](https://developer.x.com/en/portal/petition/essential/basic-info)
  * 개발자 콘솔의 [Project 및 App](/ko/resources/fundamentals/developer-apps)
  * 공개 HTTPS 웹훅 엔드포인트
</Note>

<CardGroup cols={2}>
  <Card title="Activity stream" icon="stream" href="/ko/x-api/activity/introduction">
    웹훅의 스트리밍 방식 대안
  </Card>

  <Card title="마이그레이션 가이드" icon="right-left" href="/ko/x-api/account-activity/migrate/overview">
    v1.1에서 마이그레이션
  </Card>

  <Card title="API 참조 문서" icon="code" href="/ko/x-api/account-activity/register-webhook">
    전체 엔드포인트에 대한 문서
  </Card>
</CardGroup>
