Overview
Real-time
Events delivered instantly
Comprehensive
Posts, likes, follows, DMs, and more
Subscription-based
Subscribe to user activity
Webhook delivery
Events delivered to your server
Event types
| Event | Description |
|---|---|
tweet_create_events | User posts a new Post |
favorite_events | User likes a Post |
follow_events | User follows or is followed |
direct_message_events | User sends or receives a DM |
block_events | User blocks or unblocks |
mute_events | User mutes or unmutes |
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /2/activity/stream | Connect to activity stream |
| POST | /2/activity/subscriptions | Create a subscription |
| GET | /2/activity/subscriptions | List subscriptions |
| PUT | /2/activity/subscriptions/:id | Update a subscription |
| DELETE | /2/activity/subscriptions/:id | Delete a subscription |
How it works
- Create subscription — Subscribe to a user’s activity
- Connect to stream — Establish persistent connection
- Receive events — Get real-time activity events
- Process events — Handle events in your application
Example: Connect to stream
Getting started
Prerequisites
- An approved developer account
- A Project and App in the Developer Console
- Your App’s Bearer Token